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

Unified Diff: content/browser/webshare/share_service_impl.h

Issue 1880003002: Added browser-side service for navigator.actions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ballista-share-requester-mojo-blink
Patch Set: Only add ShareService if experimental flag is on. Created 4 years, 5 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/browser/webshare/share_service_impl.h
diff --git a/content/browser/webshare/share_service_impl.h b/content/browser/webshare/share_service_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..1be38282a1edd0275a36dcc5b04f3edff1a410b4
--- /dev/null
+++ b/content/browser/webshare/share_service_impl.h
@@ -0,0 +1,37 @@
+// Copyright 2016 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_BROWSER_WEBSHARE_SHARE_SERVICE_IMPL_H_
+#define CONTENT_BROWSER_WEBSHARE_SHARE_SERVICE_IMPL_H_
+
+#include "mojo/public/cpp/bindings/interface_request.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
+#include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h"
+
+namespace content {
+
+class BrowserContext;
+
+class ShareServiceImpl : public blink::mojom::ShareService {
+ public:
+ ShareServiceImpl(BrowserContext* context,
+ mojo::InterfaceRequest<ShareService> request);
+
+ ~ShareServiceImpl() override;
+
+ static void Create(BrowserContext* context,
+ mojo::InterfaceRequest<ShareService> request);
+
+ void Share(const mojo::String& title,
+ const mojo::String& text,
+ const ShareCallback& callback) override;
+
+ private:
+ BrowserContext* context_;
+ mojo::StrongBinding<ShareService> binding_;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_WEBSHARE_SHARE_SERVICE_IMPL_H_
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/webshare/share_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698