Chromium Code Reviews| Index: third_party/WebKit/public/platform/modules/webshare/webshare.mojom |
| diff --git a/third_party/WebKit/public/platform/modules/webshare/webshare.mojom b/third_party/WebKit/public/platform/modules/webshare/webshare.mojom |
| index 71512f8308e0950d11d0ddbf042b257d3d9b1e6a..80b3db664e96d2a0db9431bfba3ed07812005cac 100644 |
| --- a/third_party/WebKit/public/platform/modules/webshare/webshare.mojom |
| +++ b/third_party/WebKit/public/platform/modules/webshare/webshare.mojom |
| @@ -7,11 +7,21 @@ module blink.mojom; |
| import "url/mojo/url.mojom"; |
| +enum ShareError { |
| + // Share successful. |
| + OK, |
| + // Something went wrong in the implementation. |
| + INTERNAL_ERROR, |
| + // Share was canceled by user. |
| + CANCELED, |
| + // The URL template was invalid (e.g., mismatching braces). |
| + // TODO(mgiuca): This error should not be possible at share time, because |
| + // targets with invalid templates should not be chooseable. |
| + // https://crbug.com/694380 |
| + INVALID_TEMPLATE, |
|
Sam McNally
2017/02/21 23:02:40
With the impending removal of this error, can we s
Matt Giuca
2017/02/23 04:18:37
Done.
|
| +}; |
| + |
| interface ShareService { |
| - // The web contents has requested to send a share text action. Returns null on |
| - // success, or an error message on failure. |
| - // TODO(mgiuca): Return an error enum, instead of a string (so the actual |
| - // error messages are generated in a single place, rather than many service |
| - // handlers). |
| - Share(string title, string text, url.mojom.Url url) => (string? error); |
| + // The web contents has requested to send a share text action. |
| + Share(string title, string text, url.mojom.Url url) => (ShareError error); |
| }; |