summaryrefslogtreecommitdiffstats
path: root/WebCore/page
diff options
context:
space:
mode:
authorAndrei Popescu <andreip@google.com>2010-02-09 04:25:48 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-02-09 04:25:48 -0800
commitece0a38a9778edd2ae7a550df7dcd38d1e11e7d0 (patch)
tree68ebac8b5ff2d29cab406565aa5ad9f815204911 /WebCore/page
parent354222b9bea6bc30d0639780b6d527ae7e9cfb76 (diff)
parent151150803320bb522017b71c36e1855764d640f8 (diff)
downloadexternal_webkit-ece0a38a9778edd2ae7a550df7dcd38d1e11e7d0.zip
external_webkit-ece0a38a9778edd2ae7a550df7dcd38d1e11e7d0.tar.gz
external_webkit-ece0a38a9778edd2ae7a550df7dcd38d1e11e7d0.tar.bz2
Merge "Implement navigator.isApplicationInstalled() API"
Diffstat (limited to 'WebCore/page')
-rw-r--r--WebCore/page/Navigator.cpp16
-rw-r--r--WebCore/page/Navigator.h12
-rw-r--r--WebCore/page/Navigator.idl5
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