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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
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 [JavaPackage="org.chromium.webshare.mojom"] 5 [JavaPackage="org.chromium.webshare.mojom"]
6 module blink.mojom; 6 module blink.mojom;
7 7
8 import "url/mojo/url.mojom"; 8 import "url/mojo/url.mojom";
9 9
10 enum ShareError {
11 // Share successful.
12 OK,
13 // Something went wrong in the implementation.
14 INTERNAL_ERROR,
15 // Share was canceled by user.
16 CANCELED,
17 // The URL template was invalid (e.g., mismatching braces).
18 // TODO(mgiuca): This error should not be possible at share time, because
19 // targets with invalid templates should not be chooseable.
20 // https://crbug.com/694380
21 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.
22 };
23
10 interface ShareService { 24 interface ShareService {
11 // The web contents has requested to send a share text action. Returns null on 25 // The web contents has requested to send a share text action.
12 // success, or an error message on failure. 26 Share(string title, string text, url.mojom.Url url) => (ShareError error);
13 // TODO(mgiuca): Return an error enum, instead of a string (so the actual
14 // error messages are generated in a single place, rather than many service
15 // handlers).
16 Share(string title, string text, url.mojom.Url url) => (string? error);
17 }; 27 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698