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

Side by Side Diff: ios/chrome/browser/ui/activity_services/share_protocol.h

Issue 2752643004: Stop showing snackbar with success message when sharing with Chrome iOS. (Closed)
Patch Set: Addressed comments. Created 3 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_SHARE_PROTOCOL_H_ 5 #ifndef IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_SHARE_PROTOCOL_H_
6 #define IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_SHARE_PROTOCOL_H_ 6 #define IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_SHARE_PROTOCOL_H_
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 #import <UIKit/UIKit.h> 9 #import <UIKit/UIKit.h>
10 10
(...skipping 14 matching lines...) Expand all
25 // The share was attempted, but failed with an unspecified error. 25 // The share was attempted, but failed with an unspecified error.
26 SHARE_ERROR, 26 SHARE_ERROR,
27 // The share was attempted, and the result is unknown. 27 // The share was attempted, and the result is unknown.
28 SHARE_UNKNOWN_RESULT, 28 SHARE_UNKNOWN_RESULT,
29 }; 29 };
30 30
31 } // namespace ShareTo 31 } // namespace ShareTo
32 32
33 // This protocol provides callbacks for sharing events. 33 // This protocol provides callbacks for sharing events.
34 @protocol ShareToDelegate<NSObject> 34 @protocol ShareToDelegate<NSObject>
35 // Callback triggered on completion of sharing. |successMessage| gives the 35 // Callback triggered on completion of sharing. |completionMessage| gives the
36 // message to be displayed on successful completion. If |successMessage| is nil, 36 // message to be displayed on completion. If |completionMessage| is nil, no
37 // no message is displayed. 37 // message is displayed.
38 - (void)shareDidComplete:(ShareTo::ShareResult)shareStatus 38 - (void)shareDidComplete:(ShareTo::ShareResult)shareStatus
39 successMessage:(NSString*)message; 39 completionMessage:(NSString*)message;
40 40
41 // Callback triggered if user invoked a Password Management App Extension. 41 // Callback triggered if user invoked a Password Management App Extension.
42 // If |shareStatus| is a successful status, delegate implementing this method 42 // If |shareStatus| is a successful status, delegate implementing this method
43 // should find a login form on the current page and autofills it with the 43 // should find a login form on the current page and autofills it with the
44 // |username| and |password|. |successMessage|, if non-nil, is the message to 44 // |username| and |password|. |completionMessage|, if non-nil, is the message to
45 // be displayed on successful completion. 45 // be displayed on completion.
46 - (void)passwordAppExDidFinish:(ShareTo::ShareResult)shareStatus 46 - (void)passwordAppExDidFinish:(ShareTo::ShareResult)shareStatus
47 username:(NSString*)username 47 username:(NSString*)username
48 password:(NSString*)password 48 password:(NSString*)password
49 successMessage:(NSString*)message; 49 completionMessage:(NSString*)message;
50 @end 50 @end
51 51
52 namespace ios { 52 namespace ios {
53 class ChromeBrowserState; 53 class ChromeBrowserState;
54 } 54 }
55 55
56 @protocol ShareProtocol<NSObject> 56 @protocol ShareProtocol<NSObject>
57 57
58 // Returns YES if a share is currently in progress. 58 // Returns YES if a share is currently in progress.
59 - (BOOL)isActive; 59 - (BOOL)isActive;
(...skipping 10 matching lines...) Expand all
70 // zero. 70 // zero.
71 - (void)shareWithData:(ShareToData*)data 71 - (void)shareWithData:(ShareToData*)data
72 controller:(UIViewController*)controller 72 controller:(UIViewController*)controller
73 browserState:(ios::ChromeBrowserState*)browserState 73 browserState:(ios::ChromeBrowserState*)browserState
74 shareToDelegate:(id<ShareToDelegate>)delegate 74 shareToDelegate:(id<ShareToDelegate>)delegate
75 fromRect:(CGRect)rect 75 fromRect:(CGRect)rect
76 inView:(UIView*)inView; 76 inView:(UIView*)inView;
77 @end 77 @end
78 78
79 #endif // IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_SHARE_PROTOCOL_H_ 79 #endif // IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_SHARE_PROTOCOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698