OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CHROME_BROWSER_PROVIDER_H_ | 5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_CHROME_BROWSER_PROVIDER_H_ |
6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_CHROME_BROWSER_PROVIDER_H_ | 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_CHROME_BROWSER_PROVIDER_H_ |
7 | 7 |
8 #include <CoreGraphics/CoreGraphics.h> | 8 #include <CoreGraphics/CoreGraphics.h> |
9 #import <Foundation/Foundation.h> | 9 #import <Foundation/Foundation.h> |
10 #include <stddef.h> | 10 #include <stddef.h> |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 @class UITextField; | 51 @class UITextField; |
52 @class UIView; | 52 @class UIView; |
53 typedef UIView<InfoBarViewProtocol>* InfoBarViewPlaceholder; | 53 typedef UIView<InfoBarViewProtocol>* InfoBarViewPlaceholder; |
54 | 54 |
55 namespace ios { | 55 namespace ios { |
56 | 56 |
57 class ChromeBrowserProvider; | 57 class ChromeBrowserProvider; |
58 class ChromeBrowserState; | 58 class ChromeBrowserState; |
59 class ChromeIdentityService; | 59 class ChromeIdentityService; |
60 class GeolocationUpdaterProvider; | 60 class GeolocationUpdaterProvider; |
61 class SigninErrorProvider; | |
62 class SigninResourcesProvider; | 61 class SigninResourcesProvider; |
63 class LiveTabContextProvider; | 62 class LiveTabContextProvider; |
64 class UpdatableResourceProvider; | 63 class UpdatableResourceProvider; |
65 | 64 |
66 // Setter and getter for the provider. The provider should be set early, before | 65 // Setter and getter for the provider. The provider should be set early, before |
67 // any browser code is called. | 66 // any browser code is called. |
68 void SetChromeBrowserProvider(ChromeBrowserProvider* provider); | 67 void SetChromeBrowserProvider(ChromeBrowserProvider* provider); |
69 ChromeBrowserProvider* GetChromeBrowserProvider(); | 68 ChromeBrowserProvider* GetChromeBrowserProvider(); |
70 | 69 |
71 // A class that allows embedding iOS-specific functionality in the | 70 // A class that allows embedding iOS-specific functionality in the |
72 // ios_chrome_browser target. | 71 // ios_chrome_browser target. |
73 class ChromeBrowserProvider { | 72 class ChromeBrowserProvider { |
74 public: | 73 public: |
75 ChromeBrowserProvider(); | 74 ChromeBrowserProvider(); |
76 virtual ~ChromeBrowserProvider(); | 75 virtual ~ChromeBrowserProvider(); |
77 | 76 |
78 // Asserts all iOS-specific |BrowserContextKeyedServiceFactory| are built. | 77 // Asserts all iOS-specific |BrowserContextKeyedServiceFactory| are built. |
79 virtual void AssertBrowserContextKeyedFactoriesBuilt(); | 78 virtual void AssertBrowserContextKeyedFactoriesBuilt(); |
80 // Registers all prefs that will be used via a PrefService attached to a | 79 // Registers all prefs that will be used via a PrefService attached to a |
81 // Profile. | 80 // Profile. |
82 virtual void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 81 virtual void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
83 // Returns an UpdatableResourceProvider instance. | 82 // Returns an UpdatableResourceProvider instance. |
84 virtual UpdatableResourceProvider* GetUpdatableResourceProvider(); | 83 virtual UpdatableResourceProvider* GetUpdatableResourceProvider(); |
85 // Returns an infobar view conforming to the InfoBarViewProtocol. The returned | 84 // Returns an infobar view conforming to the InfoBarViewProtocol. The returned |
86 // object is retained. | 85 // object is retained. |
87 virtual InfoBarViewPlaceholder CreateInfoBarView( | 86 virtual InfoBarViewPlaceholder CreateInfoBarView( |
88 CGRect frame, | 87 CGRect frame, |
89 InfoBarViewDelegate* delegate) NS_RETURNS_RETAINED; | 88 InfoBarViewDelegate* delegate) NS_RETURNS_RETAINED; |
90 // Returns an instance of a signing error provider. | |
91 virtual SigninErrorProvider* GetSigninErrorProvider(); | |
92 // Returns an instance of a signin resources provider. | 89 // Returns an instance of a signin resources provider. |
93 virtual SigninResourcesProvider* GetSigninResourcesProvider(); | 90 virtual SigninResourcesProvider* GetSigninResourcesProvider(); |
94 // Sets the current instance of Chrome identity service. Used for testing. | 91 // Sets the current instance of Chrome identity service. Used for testing. |
95 virtual void SetChromeIdentityServiceForTesting( | 92 virtual void SetChromeIdentityServiceForTesting( |
96 std::unique_ptr<ChromeIdentityService> service); | 93 std::unique_ptr<ChromeIdentityService> service); |
97 // Returns an instance of a Chrome identity service. | 94 // Returns an instance of a Chrome identity service. |
98 virtual ChromeIdentityService* GetChromeIdentityService(); | 95 virtual ChromeIdentityService* GetChromeIdentityService(); |
99 // Returns an instance of a LiveTabContextProvider. | 96 // Returns an instance of a LiveTabContextProvider. |
100 virtual LiveTabContextProvider* GetLiveTabContextProvider(); | 97 virtual LiveTabContextProvider* GetLiveTabContextProvider(); |
101 virtual GeolocationUpdaterProvider* GetGeolocationUpdaterProvider(); | 98 virtual GeolocationUpdaterProvider* GetGeolocationUpdaterProvider(); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 virtual VoiceSearchProvider* GetVoiceSearchProvider() const; | 149 virtual VoiceSearchProvider* GetVoiceSearchProvider() const; |
153 | 150 |
154 // Returns the SyncedWindowDelegatesGetter implementation. | 151 // Returns the SyncedWindowDelegatesGetter implementation. |
155 virtual std::unique_ptr<sync_sessions::SyncedWindowDelegatesGetter> | 152 virtual std::unique_ptr<sync_sessions::SyncedWindowDelegatesGetter> |
156 CreateSyncedWindowDelegatesGetter(ios::ChromeBrowserState* browser_state); | 153 CreateSyncedWindowDelegatesGetter(ios::ChromeBrowserState* browser_state); |
157 }; | 154 }; |
158 | 155 |
159 } // namespace ios | 156 } // namespace ios |
160 | 157 |
161 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_CHROME_BROWSER_PROVIDER_H_ | 158 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_CHROME_BROWSER_PROVIDER_H_ |
OLD | NEW |