OLD | NEW |
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 COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 const std::vector<base::string16>& values, | 48 const std::vector<base::string16>& values, |
49 const std::vector<base::string16>& labels) override; | 49 const std::vector<base::string16>& labels) override; |
50 void HideAutofillPopup() override; | 50 void HideAutofillPopup() override; |
51 bool IsAutocompleteEnabled() override; | 51 bool IsAutocompleteEnabled() override; |
52 void PropagateAutofillPredictions( | 52 void PropagateAutofillPredictions( |
53 content::RenderFrameHost* rfh, | 53 content::RenderFrameHost* rfh, |
54 const std::vector<autofill::FormStructure*>& forms) override; | 54 const std::vector<autofill::FormStructure*>& forms) override; |
55 void DidFillOrPreviewField(const base::string16& autofilled_value, | 55 void DidFillOrPreviewField(const base::string16& autofilled_value, |
56 const base::string16& profile_full_name) override; | 56 const base::string16& profile_full_name) override; |
57 void OnFirstUserGestureObserved() override; | 57 void OnFirstUserGestureObserved() override; |
58 void LinkClicked(const GURL& url, WindowOpenDisposition disposition) override; | |
59 bool IsContextSecure(const GURL& form_origin) override; | 58 bool IsContextSecure(const GURL& form_origin) override; |
60 | 59 |
61 void set_is_context_secure(bool is_context_secure) { | 60 void set_is_context_secure(bool is_context_secure) { |
62 is_context_secure_ = is_context_secure; | 61 is_context_secure_ = is_context_secure; |
63 }; | 62 }; |
64 | 63 |
65 void SetPrefs(scoped_ptr<PrefService> prefs) { prefs_ = prefs.Pass(); } | 64 void SetPrefs(scoped_ptr<PrefService> prefs) { prefs_ = prefs.Pass(); } |
66 | 65 |
67 rappor::TestRapporService* test_rappor_service() { | 66 rappor::TestRapporService* test_rappor_service() { |
68 return rappor_service_.get(); | 67 return rappor_service_.get(); |
69 } | 68 } |
70 | 69 |
71 private: | 70 private: |
72 // NULL by default. | 71 // NULL by default. |
73 scoped_ptr<PrefService> prefs_; | 72 scoped_ptr<PrefService> prefs_; |
74 scoped_ptr<FakeOAuth2TokenService> token_service_; | 73 scoped_ptr<FakeOAuth2TokenService> token_service_; |
75 scoped_ptr<FakeIdentityProvider> identity_provider_; | 74 scoped_ptr<FakeIdentityProvider> identity_provider_; |
76 scoped_ptr<rappor::TestRapporService> rappor_service_; | 75 scoped_ptr<rappor::TestRapporService> rappor_service_; |
77 | 76 |
78 bool is_context_secure_; | 77 bool is_context_secure_; |
79 | 78 |
80 DISALLOW_COPY_AND_ASSIGN(TestAutofillClient); | 79 DISALLOW_COPY_AND_ASSIGN(TestAutofillClient); |
81 }; | 80 }; |
82 | 81 |
83 } // namespace autofill | 82 } // namespace autofill |
84 | 83 |
85 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ | 84 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ |
OLD | NEW |