Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(533)

Unified Diff: content/renderer/installedapp/web_installed_app_impl.h

Issue 1586563009: IsNativeAppInstalled Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698