OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_TAB_AUTOFILL_MANAGER_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_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/autofill/autofill_dialog_types.h" | 12 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" |
13 #include "components/autofill/content/browser/autocheckout_steps.h" | 13 #include "components/autofill/content/browser/autocheckout_steps.h" |
14 #include "components/autofill/core/browser/autocheckout_bubble_state.h" | 14 #include "components/autofill/core/browser/autocheckout_bubble_state.h" |
15 #include "components/autofill/core/browser/autofill_manager_delegate.h" | 15 #include "components/autofill/core/browser/autofill_manager_delegate.h" |
16 #include "content/public/browser/web_contents_observer.h" | 16 #include "content/public/browser/web_contents_observer.h" |
17 #include "content/public/browser/web_contents_user_data.h" | 17 #include "content/public/browser/web_contents_user_data.h" |
18 | 18 |
19 namespace content { | 19 namespace content { |
20 struct FrameNavigateParams; | 20 struct FrameNavigateParams; |
21 struct LoadCommittedDetails; | 21 struct LoadCommittedDetails; |
22 class WebContents; | 22 class WebContents; |
23 } | 23 } |
24 | 24 |
25 namespace autofill { | 25 namespace autofill { |
26 | 26 |
27 class AutocheckoutBubble; | 27 class AutocheckoutBubble; |
28 class AutofillDialogControllerImpl; | 28 class AutofillDialogController; |
29 class AutofillPopupControllerImpl; | 29 class AutofillPopupControllerImpl; |
30 struct FormData; | 30 struct FormData; |
31 | 31 |
32 // Chrome implementation of AutofillManagerDelegate. | 32 // Chrome implementation of AutofillManagerDelegate. |
33 class TabAutofillManagerDelegate | 33 class TabAutofillManagerDelegate |
34 : public AutofillManagerDelegate, | 34 : public AutofillManagerDelegate, |
35 public content::WebContentsUserData<TabAutofillManagerDelegate>, | 35 public content::WebContentsUserData<TabAutofillManagerDelegate>, |
36 public content::WebContentsObserver { | 36 public content::WebContentsObserver { |
37 public: | 37 public: |
38 virtual ~TabAutofillManagerDelegate(); | 38 virtual ~TabAutofillManagerDelegate(); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 // content::WebContentsObserver implementation. | 86 // content::WebContentsObserver implementation. |
87 virtual void DidNavigateMainFrame( | 87 virtual void DidNavigateMainFrame( |
88 const content::LoadCommittedDetails& details, | 88 const content::LoadCommittedDetails& details, |
89 const content::FrameNavigateParams& params) OVERRIDE; | 89 const content::FrameNavigateParams& params) OVERRIDE; |
90 virtual void WebContentsDestroyed( | 90 virtual void WebContentsDestroyed( |
91 content::WebContents* web_contents) OVERRIDE; | 91 content::WebContents* web_contents) OVERRIDE; |
92 virtual void WasShown() OVERRIDE; | 92 virtual void WasShown() OVERRIDE; |
93 | 93 |
94 // Exposed for testing. | 94 // Exposed for testing. |
95 AutofillDialogControllerImpl* GetDialogControllerForTesting() { | 95 AutofillDialogController* GetDialogControllerForTesting() { |
96 return dialog_controller_.get(); | 96 return dialog_controller_.get(); |
97 } | 97 } |
98 | 98 |
99 private: | 99 private: |
100 explicit TabAutofillManagerDelegate(content::WebContents* web_contents); | 100 explicit TabAutofillManagerDelegate(content::WebContents* web_contents); |
101 friend class content::WebContentsUserData<TabAutofillManagerDelegate>; | 101 friend class content::WebContentsUserData<TabAutofillManagerDelegate>; |
102 | 102 |
103 content::WebContents* const web_contents_; | 103 content::WebContents* const web_contents_; |
104 base::WeakPtr<AutofillDialogControllerImpl> dialog_controller_; | 104 base::WeakPtr<AutofillDialogController> dialog_controller_; |
105 base::WeakPtr<AutocheckoutBubble> autocheckout_bubble_; | 105 base::WeakPtr<AutocheckoutBubble> autocheckout_bubble_; |
106 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_; | 106 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_; |
107 | 107 |
108 DISALLOW_COPY_AND_ASSIGN(TabAutofillManagerDelegate); | 108 DISALLOW_COPY_AND_ASSIGN(TabAutofillManagerDelegate); |
109 }; | 109 }; |
110 | 110 |
111 } // namespace autofill | 111 } // namespace autofill |
112 | 112 |
113 #endif // CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ | 113 #endif // CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ |
OLD | NEW |