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

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

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
« no previous file with comments | « content/browser/webshare/share_service_impl.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/webshare/share_service_impl.cc
diff --git a/content/browser/webshare/share_service_impl.cc b/content/browser/webshare/share_service_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5ce871cbcbd9e674bfd3004143a2a30d6e5f8046
--- /dev/null
+++ b/content/browser/webshare/share_service_impl.cc
@@ -0,0 +1,31 @@
+// 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.
+
+#include "content/browser/webshare/share_service_impl.h"
+
+namespace content {
+
+ShareServiceImpl::ShareServiceImpl(BrowserContext* context,
+ mojo::InterfaceRequest<ShareService> request)
+ : context_(context), binding_(this, std::move(request)) {}
+
+ShareServiceImpl::~ShareServiceImpl() = default;
+
+// static
+void ShareServiceImpl::Create(BrowserContext* context,
+ mojo::InterfaceRequest<ShareService> request) {
+ new ShareServiceImpl(context, std::move(request));
+}
+
+void ShareServiceImpl::Share(const mojo::String& title,
+ const mojo::String& text,
+ const ShareCallback& callback) {
+ NOTIMPLEMENTED() << ": \"" << title << "\", \"" << text << "\"";
+
+ callback.Run("Not implemented: navigator.share");
+
+ static_cast<void>(context_);
+}
+
+} // namespace content
« no previous file with comments | « content/browser/webshare/share_service_impl.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698