Index: content/renderer/installedapp/web_installed_app_impl.h |
diff --git a/content/renderer/installedapp/web_installed_app_impl.h b/content/renderer/installedapp/web_installed_app_impl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ce888242ab5b0e8f6bae06a2520ada09ff8a9062 |
--- /dev/null |
+++ b/content/renderer/installedapp/web_installed_app_impl.h |
@@ -0,0 +1,49 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_RENDERER_INSTALLEDAPP_WEB_INSTALLED_APP_IMPL |
+#define CONTENT_RENDERER_INSTALLEDAPP_WEB_INSTALLED_APP_IMPL |
+ |
+#include <string> |
+ |
+#include "base/compiler_specific.h" |
+#include "content/common/content_export.h" |
+#include "components/installedapp/installed_app_provider.mojom.h" |
+#include "third_party/WebKit/public/platform/modules/installedapp/WebInstalledApp.h" |
+#include "third_party/WebKit/public/web/WebInstalledAppVerificationManager.h" |
+ |
+namespace content { |
+ |
+class CONTENT_EXPORT WebInstalledAppImpl |
+ : NON_EXPORTED_BASE(public blink::WebInstalledApp) { |
+ public: |
+ explicit WebInstalledAppImpl(); |
+ ~WebInstalledAppImpl(); |
+ |
+ // blink::WebInstalledApp interface: |
+ void isAppInstalled(const blink::WebString&, |
+ const blink::WebString&, |
+ const blink::WebString&, |
+ blink::AppInstalledCallbacks*); |
+ |
+ void isNativeAppInstalled(const blink::WebInstalledAppVerificationManager&, |
+ const blink::WebString&, |
+ blink::AppInstalledCallbacks*); |
+ |
+ private: |
+ components::InstalledAppProviderPtr& GetProvider(); |
+ void OnIsAppInstalled(scoped_ptr<blink::AppInstalledCallbacks> callbacks, |
+ bool result); |
+ void OnIsNativeAppInstalled( |
+ scoped_ptr<blink::AppInstalledCallbacks> callbacks, |
+ bool result); |
+ // Handle to the InstalledApp mojo service. |
+ components::InstalledAppProviderPtr provider_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(WebInstalledAppImpl); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_RENDERER_INSTALLEDAPP_WEB_INSTALLED_APP_IMPL |