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

Side by Side Diff: ios/public/provider/chrome/browser/signin/chrome_identity_service.h

Issue 2274163002: Allow ChromeIdentityService in ChromeBrowserProvider to be overriden. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_SERVICE_H_ 5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_SERVICE_H_
6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_SERVICE_H_ 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_SERVICE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/mac/scoped_nsobject.h" 12 #include "base/mac/scoped_nsobject.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/observer_list.h" 14 #include "base/observer_list.h"
15 15
16 @class ChromeIdentity; 16 @class ChromeIdentity;
17 @protocol ChromeIdentityBrowserOpener; 17 @protocol ChromeIdentityBrowserOpener;
18 @class ChromeIdentityInteractionManager; 18 @class ChromeIdentityInteractionManager;
19 @protocol ChromeIdentityInteractionManagerDelegate; 19 @protocol ChromeIdentityInteractionManagerDelegate;
20 @class NSArray; 20 @class NSArray;
21 @class NSDate; 21 @class NSDate;
22 @class NSDictionary;
22 @class NSError; 23 @class NSError;
23 @class NSString; 24 @class NSString;
25 @class NSURL;
26 @class UIApplication;
24 @class UIImage; 27 @class UIImage;
25 @class UINavigationController; 28 @class UINavigationController;
26 29
27 namespace ios { 30 namespace ios {
28 31
29 class ChromeBrowserState; 32 class ChromeBrowserState;
33 class ChromeIdentityService;
30 34
31 // Callback passed to method |GetAccessTokenForScopes()| that returns the 35 // Callback passed to method |GetAccessTokenForScopes()| that returns the
32 // information of the obtained access token to the caller. 36 // information of the obtained access token to the caller.
33 typedef void (^AccessTokenCallback)(NSString* token, 37 typedef void (^AccessTokenCallback)(NSString* token,
34 NSDate* expiration, 38 NSDate* expiration,
35 NSError* error); 39 NSError* error);
36 40
37 // Callback passed to method |ForgetIdentity()|. |error| is nil if the operation 41 // Callback passed to method |ForgetIdentity()|. |error| is nil if the operation
38 // completed with success. 42 // completed with success.
39 typedef void (^ForgetIdentityCallback)(NSError* error); 43 typedef void (^ForgetIdentityCallback)(NSError* error);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // Called when the ChromeIdentityService will be destroyed. 83 // Called when the ChromeIdentityService will be destroyed.
80 virtual void OnChromeIdentityServiceWillBeDestroyed() {} 84 virtual void OnChromeIdentityServiceWillBeDestroyed() {}
81 85
82 private: 86 private:
83 DISALLOW_COPY_AND_ASSIGN(Observer); 87 DISALLOW_COPY_AND_ASSIGN(Observer);
84 }; 88 };
85 89
86 ChromeIdentityService(); 90 ChromeIdentityService();
87 virtual ~ChromeIdentityService(); 91 virtual ~ChromeIdentityService();
88 92
93 // Handles open URL authentication callback. Returns whether the URL was
94 // actually handled. This should be called within
95 // UIApplicationDelegate application:openURL:options:.
96 virtual bool HandleApplicationOpenURL(UIApplication* application,
97 NSURL* url,
98 NSDictionary* options);
99
100 // Dismisses all the dialogs created by the abstracted flows.
101 virtual void DismissDialogs();
102
89 // Returns a new account details controller to present. A cancel button is 103 // Returns a new account details controller to present. A cancel button is
90 // present as leading navigation item. 104 // present as leading navigation item.
91 virtual base::scoped_nsobject<UINavigationController> NewAccountDetails( 105 virtual base::scoped_nsobject<UINavigationController> NewAccountDetails(
92 ChromeIdentity* identity, 106 ChromeIdentity* identity,
93 id<ChromeIdentityBrowserOpener> browser_opener); 107 id<ChromeIdentityBrowserOpener> browser_opener);
94 108
95 // Returns a new Web and App Setting Details controller to present. 109 // Returns a new Web and App Setting Details controller to present.
96 virtual base::scoped_nsobject<UINavigationController> 110 virtual base::scoped_nsobject<UINavigationController>
97 NewWebAndAppSettingDetails(ChromeIdentity* identity, 111 NewWebAndAppSettingDetails(ChromeIdentity* identity,
98 id<ChromeIdentityBrowserOpener> browser_opener); 112 id<ChromeIdentityBrowserOpener> browser_opener);
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 219
206 private: 220 private:
207 base::ObserverList<Observer, true> observer_list_; 221 base::ObserverList<Observer, true> observer_list_;
208 222
209 DISALLOW_COPY_AND_ASSIGN(ChromeIdentityService); 223 DISALLOW_COPY_AND_ASSIGN(ChromeIdentityService);
210 }; 224 };
211 225
212 } // namespace ios 226 } // namespace ios
213 227
214 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_SERVICE_H_ 228 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698