Chromium Code Reviews| Index: chrome/browser/webshare/share_service_impl.h |
| diff --git a/chrome/browser/webshare/share_service_impl.h b/chrome/browser/webshare/share_service_impl.h |
| index bcc2a5575544da2e6dd01c0c0d4a2a1b935206f1..0a3cecf656830184fd1a447ae93483386ee5f694 100644 |
| --- a/chrome/browser/webshare/share_service_impl.h |
| +++ b/chrome/browser/webshare/share_service_impl.h |
| @@ -14,11 +14,6 @@ |
| class GURL; |
| -enum class SharePickerResult { |
| - CANCEL, |
| - SHARE |
| -}; |
| - |
| // Desktop implementation of the ShareService Mojo service. |
| class ShareServiceImpl : public blink::mojom::ShareService { |
| public: |
| @@ -37,11 +32,12 @@ class ShareServiceImpl : public blink::mojom::ShareService { |
| FRIEND_TEST_ALL_PREFIXES(ShareServiceImplUnittest, ReplacePlaceholders); |
| // Shows the share picker dialog with |targets| as the list of applications |
| - // presented to the user. Passes the result to |callback|. Virtual for |
| - // testing. |
| + // presented to the user. Passes the result to |callback|. If the user picks a |
| + // target, the result passed to |callback| is the manifest URL of the chosen |
| + // target, and is null if the user cancelled the share. Virtual for testing. |
|
Matt Giuca
2017/02/01 07:04:33
s/and/or :)
constantina
2017/02/01 23:24:21
Done :)
|
| virtual void ShowPickerDialog( |
| const std::vector<base::string16>& targets, |
| - const base::Callback<void(SharePickerResult)>& callback); |
| + const base::Callback<void(base::Optional<base::string16>)>& callback); |
| // Opens a new tab and navigates to |target_url|. |
| // Virtual for testing purposes. |
| @@ -65,7 +61,7 @@ class ShareServiceImpl : public blink::mojom::ShareService { |
| const std::string& text, |
| const GURL& share_url, |
| const ShareCallback& callback, |
| - SharePickerResult result); |
| + base::Optional<base::string16> result); |
| DISALLOW_COPY_AND_ASSIGN(ShareServiceImpl); |
| }; |