OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/webshare/share_service_impl.h" | 5 #include "chrome/browser/webshare/share_service_impl.h" |
6 | 6 |
| 7 #include "base/memory/ptr_util.h" |
7 #include "mojo/public/cpp/bindings/strong_binding.h" | 8 #include "mojo/public/cpp/bindings/strong_binding.h" |
8 | 9 |
9 // static | 10 // static |
10 void ShareServiceImpl::Create(blink::mojom::ShareServiceRequest request) { | 11 void ShareServiceImpl::Create(blink::mojom::ShareServiceRequest request) { |
11 mojo::MakeStrongBinding(base::MakeUnique<ShareServiceImpl>(), | 12 mojo::MakeStrongBinding(base::MakeUnique<ShareServiceImpl>(), |
12 std::move(request)); | 13 std::move(request)); |
13 } | 14 } |
14 | 15 |
15 void ShareServiceImpl::Share(const std::string& title, | 16 void ShareServiceImpl::Share(const std::string& title, |
16 const std::string& text, | 17 const std::string& text, |
17 const GURL& url, | 18 const GURL& url, |
18 const ShareCallback& callback) { | 19 const ShareCallback& callback) { |
19 // TODO(constantina): Implement Web Share Target here. | 20 // TODO(constantina): Implement Web Share Target here. |
20 NOTIMPLEMENTED(); | 21 NOTIMPLEMENTED(); |
21 callback.Run(base::Optional<std::string>("Not implemented: navigator.share")); | 22 callback.Run(base::Optional<std::string>("Not implemented: navigator.share")); |
22 } | 23 } |
OLD | NEW |