Chromium Code Reviews| Index: chrome/browser/webshare/share_service_impl.cc |
| diff --git a/chrome/browser/webshare/share_service_impl.cc b/chrome/browser/webshare/share_service_impl.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..597eaaecd30bc73e894eff85403ac12fdfa9e45a |
| --- /dev/null |
| +++ b/chrome/browser/webshare/share_service_impl.cc |
| @@ -0,0 +1,26 @@ |
| +// 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 "chrome/browser/webshare/share_service_impl.h" |
| + |
| +ShareServiceImpl::ShareServiceImpl(blink::mojom::ShareServiceRequest request) |
| + : binding_(this) { |
| + binding_.Bind(std::move(request)); |
| +} |
| + |
| +ShareServiceImpl::~ShareServiceImpl() {} |
|
Sam McNally
2016/12/09 04:23:45
= default;
constantina
2016/12/12 02:50:32
Done.
Matt Giuca
2016/12/12 04:33:04
I think this still has to be in the .cc file to av
|
| + |
| +// static |
| +void ShareServiceImpl::Create(mojo::InterfaceRequest<ShareService> request) { |
|
Sam McNally
2016/12/09 04:23:45
s/mojo::InterfaceRequest<ShareService>/ShareServic
constantina
2016/12/12 02:50:32
Done.
|
| + new ShareServiceImpl(std::move(request)); |
|
Sam McNally
2016/12/09 04:23:45
This will leak the ShareServiceImpl. Use StrongBin
constantina
2016/12/12 02:50:32
Done.
|
| +} |
| + |
| +void ShareServiceImpl::Share(const std::string& title, |
| + const std::string& text, |
| + const GURL& url, |
| + const ShareCallback& callback) { |
| + // TODO(constantina): Implement Web Share Target here. |
| + NOTIMPLEMENTED(); |
| + callback.Run(base::Optional<std::string>("Not implemented: navigator.share")); |
| +} |