| 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_TEST_CHROME_BROWSER_PROVIDER_H_ | 5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_TEST_CHROME_BROWSER_PROVIDER_H_ |
| 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_TEST_CHROME_BROWSER_PROVIDER_H_ | 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_TEST_CHROME_BROWSER_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" | 11 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" |
| 12 #include "ios/public/provider/chrome/browser/ui/text_field_styling.h" | 12 #include "ios/public/provider/chrome/browser/ui/text_field_styling.h" |
| 13 | 13 |
| 14 namespace ios { | 14 namespace ios { |
| 15 | 15 |
| 16 class TestChromeBrowserProvider : public ChromeBrowserProvider { | 16 class TestChromeBrowserProvider : public ChromeBrowserProvider { |
| 17 public: | 17 public: |
| 18 TestChromeBrowserProvider(); | 18 TestChromeBrowserProvider(); |
| 19 ~TestChromeBrowserProvider() override; | 19 ~TestChromeBrowserProvider() override; |
| 20 | 20 |
| 21 // Returns the current provider as a |TestChromeBrowserProvider|. | 21 // Returns the current provider as a |TestChromeBrowserProvider|. |
| 22 static TestChromeBrowserProvider* GetTestProvider(); | 22 static TestChromeBrowserProvider* GetTestProvider(); |
| 23 | 23 |
| 24 // ChromeBrowserProvider: | 24 // ChromeBrowserProvider: |
| 25 SigninResourcesProvider* GetSigninResourcesProvider() override; |
| 25 void SetChromeIdentityServiceForTesting( | 26 void SetChromeIdentityServiceForTesting( |
| 26 std::unique_ptr<ChromeIdentityService> service) override; | 27 std::unique_ptr<ChromeIdentityService> service) override; |
| 27 ChromeIdentityService* GetChromeIdentityService() override; | 28 ChromeIdentityService* GetChromeIdentityService() override; |
| 28 UITextField<TextFieldStyling>* CreateStyledTextField( | 29 UITextField<TextFieldStyling>* CreateStyledTextField( |
| 29 CGRect frame) const override NS_RETURNS_RETAINED; | 30 CGRect frame) const override NS_RETURNS_RETAINED; |
| 30 NSArray* GetAvailableVoiceSearchLanguages() const override; | 31 NSArray* GetAvailableVoiceSearchLanguages() const override; |
| 31 VoiceSearchProvider* GetVoiceSearchProvider() const override; | 32 VoiceSearchProvider* GetVoiceSearchProvider() const override; |
| 32 AppDistributionProvider* GetAppDistributionProvider() const override; | 33 AppDistributionProvider* GetAppDistributionProvider() const override; |
| 33 OmahaServiceProvider* GetOmahaServiceProvider() const override; | 34 OmahaServiceProvider* GetOmahaServiceProvider() const override; |
| 34 id<NativeAppWhitelistManager> GetNativeAppWhitelistManager() const override; | 35 id<NativeAppWhitelistManager> GetNativeAppWhitelistManager() const override; |
| 35 | 36 |
| 36 private: | 37 private: |
| 37 std::unique_ptr<AppDistributionProvider> app_distribution_provider_; | 38 std::unique_ptr<AppDistributionProvider> app_distribution_provider_; |
| 38 std::unique_ptr<ChromeIdentityService> chrome_identity_service_; | 39 std::unique_ptr<ChromeIdentityService> chrome_identity_service_; |
| 39 std::unique_ptr<OmahaServiceProvider> omaha_service_provider_; | 40 std::unique_ptr<OmahaServiceProvider> omaha_service_provider_; |
| 41 std::unique_ptr<SigninResourcesProvider> signin_resources_provider_; |
| 40 std::unique_ptr<VoiceSearchProvider> voice_search_provider_; | 42 std::unique_ptr<VoiceSearchProvider> voice_search_provider_; |
| 41 | 43 |
| 42 DISALLOW_COPY_AND_ASSIGN(TestChromeBrowserProvider); | 44 DISALLOW_COPY_AND_ASSIGN(TestChromeBrowserProvider); |
| 43 }; | 45 }; |
| 44 | 46 |
| 45 } // namespace ios | 47 } // namespace ios |
| 46 | 48 |
| 47 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_TEST_CHROME_BROWSER_PROVIDER_H_ | 49 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_TEST_CHROME_BROWSER_PROVIDER_H_ |
| OLD | NEW |