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 "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "chrome/browser/ui/zoom/zoom_observer.h" | 12 #include "chrome/browser/ui/zoom/zoom_observer.h" |
13 #include "components/autofill/core/browser/autofill_client.h" | 13 #include "components/autofill/core/browser/autofill_client.h" |
14 #include "content/public/browser/web_contents_observer.h" | 14 #include "content/public/browser/web_contents_observer.h" |
15 #include "content/public/browser/web_contents_user_data.h" | 15 #include "content/public/browser/web_contents_user_data.h" |
16 | 16 |
17 namespace content { | 17 namespace content { |
18 struct FrameNavigateParams; | 18 struct FrameNavigateParams; |
19 struct LoadCommittedDetails; | 19 struct LoadCommittedDetails; |
20 class WebContents; | 20 class WebContents; |
21 } | 21 } |
22 | 22 |
23 namespace autofill { | 23 namespace autofill { |
24 | 24 |
25 class AutofillDialogController; | 25 class AutofillDialogController; |
| 26 class AutofillDriver; |
26 class AutofillKeystoneBridgeWrapper; | 27 class AutofillKeystoneBridgeWrapper; |
27 class AutofillPopupControllerImpl; | 28 class AutofillPopupControllerImpl; |
28 struct FormData; | 29 struct FormData; |
29 | 30 |
30 // Chrome implementation of AutofillClient. | 31 // Chrome implementation of AutofillClient. |
31 class ChromeAutofillClient | 32 class ChromeAutofillClient |
32 : public AutofillClient, | 33 : public AutofillClient, |
33 public content::WebContentsUserData<ChromeAutofillClient>, | 34 public content::WebContentsUserData<ChromeAutofillClient>, |
34 public content::WebContentsObserver, | 35 public content::WebContentsObserver, |
35 public ZoomObserver { | 36 public ZoomObserver { |
36 public: | 37 public: |
37 ~ChromeAutofillClient() override; | 38 ~ChromeAutofillClient() override; |
38 | 39 |
39 // Called when the tab corresponding to |this| instance is activated. | 40 // Called when the tab corresponding to |this| instance is activated. |
40 void TabActivated(); | 41 void TabActivated(); |
41 | 42 |
42 // AutofillClient: | 43 // AutofillClient: |
43 PersonalDataManager* GetPersonalDataManager() override; | 44 PersonalDataManager* GetPersonalDataManager() override; |
44 scoped_refptr<AutofillWebDataService> GetDatabase() override; | 45 scoped_refptr<AutofillWebDataService> GetDatabase() override; |
45 PrefService* GetPrefs() override; | 46 PrefService* GetPrefs() override; |
46 void HideRequestAutocompleteDialog() override; | 47 void HideRequestAutocompleteDialog() override; |
47 void ShowAutofillSettings() override; | 48 void ShowAutofillSettings() override; |
48 void ConfirmSaveCreditCard(const AutofillMetrics& metric_logger, | 49 void ConfirmSaveCreditCard(const AutofillDriver& autofill_driver, |
| 50 const AutofillMetrics& metric_logger, |
49 const base::Closure& save_card_callback) override; | 51 const base::Closure& save_card_callback) override; |
50 void ShowRequestAutocompleteDialog(const FormData& form, | 52 void ShowRequestAutocompleteDialog(const FormData& form, |
51 const GURL& source_url, | 53 const GURL& source_url, |
52 const ResultCallback& callback) override; | 54 const ResultCallback& callback) override; |
53 void ShowAutofillPopup( | 55 void ShowAutofillPopup( |
54 const gfx::RectF& element_bounds, | 56 const gfx::RectF& element_bounds, |
55 base::i18n::TextDirection text_direction, | 57 base::i18n::TextDirection text_direction, |
56 const std::vector<base::string16>& values, | 58 const std::vector<base::string16>& values, |
57 const std::vector<base::string16>& labels, | 59 const std::vector<base::string16>& labels, |
58 const std::vector<base::string16>& icons, | 60 const std::vector<base::string16>& icons, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 // scoped_ptr. | 112 // scoped_ptr. |
111 AutofillKeystoneBridgeWrapper* bridge_wrapper_; | 113 AutofillKeystoneBridgeWrapper* bridge_wrapper_; |
112 #endif // defined(OS_MACOSX) && !defined(OS_IOS) | 114 #endif // defined(OS_MACOSX) && !defined(OS_IOS) |
113 | 115 |
114 DISALLOW_COPY_AND_ASSIGN(ChromeAutofillClient); | 116 DISALLOW_COPY_AND_ASSIGN(ChromeAutofillClient); |
115 }; | 117 }; |
116 | 118 |
117 } // namespace autofill | 119 } // namespace autofill |
118 | 120 |
119 #endif // CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_ | 121 #endif // CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_ |
OLD | NEW |