diff options
author | Andrei Popescu <andreip@google.com> | 2010-02-08 21:23:18 +0000 |
---|---|---|
committer | Andrei Popescu <andreip@google.com> | 2010-02-09 12:23:35 +0000 |
commit | 151150803320bb522017b71c36e1855764d640f8 (patch) | |
tree | 8fc8ce4e94510d3d280561b798231bfbfbbc751e /WebCore/page | |
parent | 8ff7f98227af2858af086841a95a89458921dbbc (diff) | |
download | external_webkit-151150803320bb522017b71c36e1855764d640f8.zip external_webkit-151150803320bb522017b71c36e1855764d640f8.tar.gz external_webkit-151150803320bb522017b71c36e1855764d640f8.tar.bz2 |
Implement navigator.isApplicationInstalled() API
This CL contains the V8 DOM bindings and IDL changes.
Fix b:2371005
Diffstat (limited to 'WebCore/page')
-rw-r--r-- | WebCore/page/Navigator.cpp | 16 | ||||
-rw-r--r-- | WebCore/page/Navigator.h | 12 | ||||
-rw-r--r-- | WebCore/page/Navigator.idl | 5 |
3 files changed, 27 insertions, 6 deletions
diff --git a/WebCore/page/Navigator.cpp b/WebCore/page/Navigator.cpp index bcc302f..3c0424f 100644 --- a/WebCore/page/Navigator.cpp +++ b/WebCore/page/Navigator.cpp @@ -25,9 +25,6 @@ #include "Chrome.h" #include "CookieJar.h" -#if PLATFORM(ANDROID) -#include "Connection.h" -#endif #include "ExceptionCode.h" #include "Frame.h" #include "FrameLoader.h" @@ -45,6 +42,11 @@ #include "Settings.h" #include "StorageNamespace.h" +#if PLATFORM(ANDROID) +#include "ApplicationInstalledCallback.h" +#include "Connection.h" +#endif + namespace WebCore { Navigator::Navigator(Frame* frame) @@ -168,6 +170,14 @@ Connection* Navigator::connection() const } #endif +#if PLATFORM(ANDROID) && ENABLE(APPLICATION_INSTALLED) +void Navigator::isApplicationInstalled(const String& name, PassRefPtr<ApplicationInstalledCallback> callback) +{ + //TODO(implement); + callback->handleEvent(false); +} +#endif + #if ENABLE(DOM_STORAGE) void Navigator::getStorageUpdates() { diff --git a/WebCore/page/Navigator.h b/WebCore/page/Navigator.h index 9967fba..83ed83f 100644 --- a/WebCore/page/Navigator.h +++ b/WebCore/page/Navigator.h @@ -27,15 +27,17 @@ namespace WebCore { -#if PLATFORM(ANDROID) - class Connection; -#endif class Frame; class Geolocation; class MimeTypeArray; class PluginData; class PluginArray; class String; +#if PLATFORM(ANDROID) + class ApplicationInstalledCallback; + class Connection; +#endif + typedef int ExceptionCode; @@ -64,6 +66,10 @@ namespace WebCore { Connection* connection() const; #endif +#if PLATFORM(ANDROID) && ENABLE(APPLICATION_INSTALLED) + void isApplicationInstalled(const String& name, PassRefPtr<ApplicationInstalledCallback> callback); +#endif + #if ENABLE(DOM_STORAGE) // Relinquishes the storage lock, if one exists. void getStorageUpdates(); diff --git a/WebCore/page/Navigator.idl b/WebCore/page/Navigator.idl index 215316f..8eae9d6 100644 --- a/WebCore/page/Navigator.idl +++ b/WebCore/page/Navigator.idl @@ -45,6 +45,11 @@ module window { readonly attribute Connection connection; #endif +#if defined(ENABLE_APPLICATION_INSTALLED) && ENABLE_APPLICATION_INSTALLED + // ANDROID-only for now. + [Custom] void isApplicationInstalled(in DOMString applicationName, in ApplicationInstalledCallback callback); +#endif + #if defined(ENABLE_GEOLOCATION) && ENABLE_GEOLOCATION readonly attribute [EnabledAtRuntime] Geolocation geolocation; #endif |