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

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

Issue 2545323002: Implemented stub ShareService mojo service, for navigator.share. (Closed)
Patch Set: Created 4 years 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.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..917db4fb1deeea472ec933829855faa4628fb4ee
--- /dev/null
+++ b/content/browser/webshare/share_service_impl.cc
@@ -0,0 +1,29 @@
+// 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(blink::mojom::ShareServiceRequest request)
+ : binding_(this) {
+ binding_.Bind(std::move(request));
+}
+
+ShareServiceImpl::~ShareServiceImpl() {}
+
+// static
+void ShareServiceImpl::Create(mojo::InterfaceRequest<ShareService> request) {
+ new ShareServiceImpl(std::move(request));
+}
+
+void ShareServiceImpl::Share(const std::string& title,
+ const std::string& text,
+ const GURL& url,
+ const ShareCallback& callback) {
+
+ NOTIMPLEMENTED() << "Share called";
+ callback.Run(base::Optional<std::string>("Not implemented: navigator.share"));
+}
+}

Powered by Google App Engine
This is Rietveld 408576698