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 #include <stddef.h> | 9 #include <stddef.h> |
10 #include <string> | 10 #include <string> |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #else | 48 #else |
49 class InfoBarViewPlaceholderClass; | 49 class InfoBarViewPlaceholderClass; |
50 typedef InfoBarViewPlaceholderClass* InfoBarViewPlaceholder; | 50 typedef InfoBarViewPlaceholderClass* InfoBarViewPlaceholder; |
51 class UIView; | 51 class UIView; |
52 #endif | 52 #endif |
53 | 53 |
54 namespace ios { | 54 namespace ios { |
55 | 55 |
56 class ChromeBrowserProvider; | 56 class ChromeBrowserProvider; |
57 class ChromeBrowserState; | 57 class ChromeBrowserState; |
58 class ChromeBrowserStateManager; | |
59 class ChromeIdentityService; | 58 class ChromeIdentityService; |
60 class GeolocationUpdaterProvider; | 59 class GeolocationUpdaterProvider; |
61 class SigninResourcesProvider; | 60 class SigninResourcesProvider; |
62 class LiveTabContextProvider; | 61 class LiveTabContextProvider; |
63 class UpdatableResourceProvider; | 62 class UpdatableResourceProvider; |
64 | 63 |
65 // Setter and getter for the provider. The provider should be set early, before | 64 // Setter and getter for the provider. The provider should be set early, before |
66 // any browser code is called. | 65 // any browser code is called. |
67 void SetChromeBrowserProvider(ChromeBrowserProvider* provider); | 66 void SetChromeBrowserProvider(ChromeBrowserProvider* provider); |
68 ChromeBrowserProvider* GetChromeBrowserProvider(); | 67 ChromeBrowserProvider* GetChromeBrowserProvider(); |
69 | 68 |
70 // A class that allows embedding iOS-specific functionality in the | 69 // A class that allows embedding iOS-specific functionality in the |
71 // ios_chrome_browser target. | 70 // ios_chrome_browser target. |
72 class ChromeBrowserProvider { | 71 class ChromeBrowserProvider { |
73 public: | 72 public: |
74 ChromeBrowserProvider(); | 73 ChromeBrowserProvider(); |
75 virtual ~ChromeBrowserProvider(); | 74 virtual ~ChromeBrowserProvider(); |
76 | 75 |
77 // Asserts all iOS-specific |BrowserContextKeyedServiceFactory| are built. | 76 // Asserts all iOS-specific |BrowserContextKeyedServiceFactory| are built. |
78 virtual void AssertBrowserContextKeyedFactoriesBuilt(); | 77 virtual void AssertBrowserContextKeyedFactoriesBuilt(); |
79 // Registers all prefs that will be used via a PrefService attached to a | 78 // Registers all prefs that will be used via a PrefService attached to a |
80 // Profile. | 79 // Profile. |
81 virtual void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 80 virtual void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
82 // Returns an instance of profile OAuth2 token service provider. | 81 // Returns an instance of profile OAuth2 token service provider. |
83 virtual ProfileOAuth2TokenServiceIOSProvider* | 82 virtual ProfileOAuth2TokenServiceIOSProvider* |
84 GetProfileOAuth2TokenServiceIOSProvider(); | 83 GetProfileOAuth2TokenServiceIOSProvider(); |
85 // Returns an UpdatableResourceProvider instance. | 84 // Returns an UpdatableResourceProvider instance. |
86 virtual UpdatableResourceProvider* GetUpdatableResourceProvider(); | 85 virtual UpdatableResourceProvider* GetUpdatableResourceProvider(); |
87 // Creates a new ChromeBrowserStateManager instance. | |
88 virtual scoped_ptr<ChromeBrowserStateManager> | |
89 CreateChromeBrowserStateManager(); | |
90 // Returns an infobar view conforming to the InfoBarViewProtocol. The returned | 86 // Returns an infobar view conforming to the InfoBarViewProtocol. The returned |
91 // object is retained. | 87 // object is retained. |
92 virtual InfoBarViewPlaceholder CreateInfoBarView( | 88 virtual InfoBarViewPlaceholder CreateInfoBarView( |
93 CGRect frame, | 89 CGRect frame, |
94 InfoBarViewDelegate* delegate); | 90 InfoBarViewDelegate* delegate); |
95 // Returns an instance of a signin resources provider. | 91 // Returns an instance of a signin resources provider. |
96 virtual SigninResourcesProvider* GetSigninResourcesProvider(); | 92 virtual SigninResourcesProvider* GetSigninResourcesProvider(); |
97 // Returns an instance of a Chrome identity service. | 93 // Returns an instance of a Chrome identity service. |
98 virtual ChromeIdentityService* GetChromeIdentityService(); | 94 virtual ChromeIdentityService* GetChromeIdentityService(); |
99 // Returns an instance of a LiveTabContextProvider. | 95 // Returns an instance of a LiveTabContextProvider. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 CreateSyncedWindowDelegatesGetter(ios::ChromeBrowserState* browser_state); | 130 CreateSyncedWindowDelegatesGetter(ios::ChromeBrowserState* browser_state); |
135 | 131 |
136 // Gets the URLRequestContextGetter used by the SafeBrowsing service. Returns | 132 // Gets the URLRequestContextGetter used by the SafeBrowsing service. Returns |
137 // null if there is no SafeBrowsing service. | 133 // null if there is no SafeBrowsing service. |
138 virtual net::URLRequestContextGetter* GetSafeBrowsingURLRequestContext(); | 134 virtual net::URLRequestContextGetter* GetSafeBrowsingURLRequestContext(); |
139 }; | 135 }; |
140 | 136 |
141 } // namespace ios | 137 } // namespace ios |
142 | 138 |
143 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_CHROME_BROWSER_PROVIDER_H_ | 139 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_CHROME_BROWSER_PROVIDER_H_ |
OLD | NEW |