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 CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_ |
6 #define CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/i18n/rtl.h" | 13 #include "base/i18n/rtl.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "components/autofill/core/browser/autofill_client.h" | 16 #include "components/autofill/core/browser/autofill_client.h" |
17 #include "components/autofill/core/browser/ui/card_unmask_prompt_controller_impl
.h" | 17 #include "components/autofill/core/browser/ui/card_unmask_prompt_controller_impl
.h" |
18 #include "components/ui/zoom/zoom_observer.h" | 18 #include "components/zoom/zoom_observer.h" |
19 #include "content/public/browser/web_contents_observer.h" | 19 #include "content/public/browser/web_contents_observer.h" |
20 #include "content/public/browser/web_contents_user_data.h" | 20 #include "content/public/browser/web_contents_user_data.h" |
21 | 21 |
22 namespace content { | 22 namespace content { |
23 struct FrameNavigateParams; | 23 struct FrameNavigateParams; |
24 struct LoadCommittedDetails; | 24 struct LoadCommittedDetails; |
25 class WebContents; | 25 class WebContents; |
26 } | 26 } |
27 | 27 |
28 namespace autofill { | 28 namespace autofill { |
29 | 29 |
30 class AutofillPopupControllerImpl; | 30 class AutofillPopupControllerImpl; |
31 class CreditCardScannerController; | 31 class CreditCardScannerController; |
32 struct FormData; | 32 struct FormData; |
33 | 33 |
34 // Chrome implementation of AutofillClient. | 34 // Chrome implementation of AutofillClient. |
35 class ChromeAutofillClient | 35 class ChromeAutofillClient |
36 : public AutofillClient, | 36 : public AutofillClient, |
37 public content::WebContentsUserData<ChromeAutofillClient>, | 37 public content::WebContentsUserData<ChromeAutofillClient>, |
38 public content::WebContentsObserver, | 38 public content::WebContentsObserver, |
39 public ui_zoom::ZoomObserver { | 39 public zoom::ZoomObserver { |
40 public: | 40 public: |
41 ~ChromeAutofillClient() override; | 41 ~ChromeAutofillClient() override; |
42 | 42 |
43 // AutofillClient: | 43 // AutofillClient: |
44 PersonalDataManager* GetPersonalDataManager() override; | 44 PersonalDataManager* GetPersonalDataManager() override; |
45 scoped_refptr<AutofillWebDataService> GetDatabase() override; | 45 scoped_refptr<AutofillWebDataService> GetDatabase() override; |
46 PrefService* GetPrefs() override; | 46 PrefService* GetPrefs() override; |
47 sync_driver::SyncService* GetSyncService() override; | 47 sync_driver::SyncService* GetSyncService() override; |
48 IdentityProvider* GetIdentityProvider() override; | 48 IdentityProvider* GetIdentityProvider() override; |
49 rappor::RapporService* GetRapporService() override; | 49 rappor::RapporService* GetRapporService() override; |
(...skipping 29 matching lines...) Expand all Loading... |
79 const base::string16& profile_full_name) override; | 79 const base::string16& profile_full_name) override; |
80 void OnFirstUserGestureObserved() override; | 80 void OnFirstUserGestureObserved() override; |
81 bool IsContextSecure(const GURL& form_origin) override; | 81 bool IsContextSecure(const GURL& form_origin) override; |
82 | 82 |
83 // content::WebContentsObserver implementation. | 83 // content::WebContentsObserver implementation. |
84 void MainFrameWasResized(bool width_changed) override; | 84 void MainFrameWasResized(bool width_changed) override; |
85 void WebContentsDestroyed() override; | 85 void WebContentsDestroyed() override; |
86 | 86 |
87 // ZoomObserver implementation. | 87 // ZoomObserver implementation. |
88 void OnZoomChanged( | 88 void OnZoomChanged( |
89 const ui_zoom::ZoomController::ZoomChangedEventData& data) override; | 89 const zoom::ZoomController::ZoomChangedEventData& data) override; |
90 | 90 |
91 private: | 91 private: |
92 explicit ChromeAutofillClient(content::WebContents* web_contents); | 92 explicit ChromeAutofillClient(content::WebContents* web_contents); |
93 friend class content::WebContentsUserData<ChromeAutofillClient>; | 93 friend class content::WebContentsUserData<ChromeAutofillClient>; |
94 | 94 |
95 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_; | 95 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_; |
96 CardUnmaskPromptControllerImpl unmask_controller_; | 96 CardUnmaskPromptControllerImpl unmask_controller_; |
97 | 97 |
98 // The identity provider, used for Payments integration. | 98 // The identity provider, used for Payments integration. |
99 std::unique_ptr<IdentityProvider> identity_provider_; | 99 std::unique_ptr<IdentityProvider> identity_provider_; |
100 | 100 |
101 DISALLOW_COPY_AND_ASSIGN(ChromeAutofillClient); | 101 DISALLOW_COPY_AND_ASSIGN(ChromeAutofillClient); |
102 }; | 102 }; |
103 | 103 |
104 } // namespace autofill | 104 } // namespace autofill |
105 | 105 |
106 #endif // CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_ | 106 #endif // CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_ |
OLD | NEW |