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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
84 AutocheckoutStepStatus step_status) OVERRIDE; | 84 AutocheckoutStepStatus step_status) OVERRIDE; |
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 | 92 |
93 // Exposed for testing. | 93 // Exposed for testing. |
94 AutofillDialogControllerImpl* GetDialogControllerForTesting() { | 94 AutofillDialogController* GetDialogdControllerForTesting() { |
aruslan
2013/08/07 21:07:00
Typo, wouldn't compile.
aruslan
2013/08/07 21:21:23
Done.
| |
95 return dialog_controller_.get(); | 95 return dialog_controller_.get(); |
96 } | 96 } |
97 | 97 |
98 private: | 98 private: |
99 explicit TabAutofillManagerDelegate(content::WebContents* web_contents); | 99 explicit TabAutofillManagerDelegate(content::WebContents* web_contents); |
100 friend class content::WebContentsUserData<TabAutofillManagerDelegate>; | 100 friend class content::WebContentsUserData<TabAutofillManagerDelegate>; |
101 | 101 |
102 content::WebContents* const web_contents_; | 102 content::WebContents* const web_contents_; |
103 base::WeakPtr<AutofillDialogControllerImpl> dialog_controller_; | 103 base::WeakPtr<AutofillDialogController> dialog_controller_; |
104 base::WeakPtr<AutocheckoutBubble> autocheckout_bubble_; | 104 base::WeakPtr<AutocheckoutBubble> autocheckout_bubble_; |
105 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_; | 105 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_; |
106 | 106 |
107 DISALLOW_COPY_AND_ASSIGN(TabAutofillManagerDelegate); | 107 DISALLOW_COPY_AND_ASSIGN(TabAutofillManagerDelegate); |
108 }; | 108 }; |
109 | 109 |
110 } // namespace autofill | 110 } // namespace autofill |
111 | 111 |
112 #endif // CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ | 112 #endif // CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ |
OLD | NEW |