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

Unified Diff: third_party/WebKit/public/platform/modules/webshare/webshare.mojom

Issue 2703333002: Web Share: Refactor Mojo interface to now return an enum error. (Closed)
Patch Set: Fix assignment statement. #oops Created 3 years, 10 months 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
« no previous file with comments | « third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ef49d1aa3b7ec1e0712116d4ac6ec07262c20474 100644
--- a/third_party/WebKit/public/platform/modules/webshare/webshare.mojom
+++ b/third_party/WebKit/public/platform/modules/webshare/webshare.mojom
@@ -7,11 +7,16 @@ 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,
+};
+
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);
};
« no previous file with comments | « third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698