| 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_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
| 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/memory/weak_ptr.h" |
| 12 #include "base/string16.h" | 13 #include "base/string16.h" |
| 13 #include "chrome/browser/autofill/field_types.h" | 14 #include "chrome/browser/autofill/field_types.h" |
| 14 #include "chrome/browser/autofill/form_structure.h" | 15 #include "chrome/browser/autofill/form_structure.h" |
| 15 #include "chrome/browser/autofill/personal_data_manager.h" | 16 #include "chrome/browser/autofill/personal_data_manager.h" |
| 16 #include "chrome/browser/autofill/wallet/required_action.h" | 17 #include "chrome/browser/autofill/wallet/required_action.h" |
| 17 #include "chrome/browser/autofill/wallet/wallet_client.h" | 18 #include "chrome/browser/autofill/wallet/wallet_client.h" |
| 18 #include "chrome/browser/autofill/wallet/wallet_client_observer.h" | 19 #include "chrome/browser/autofill/wallet/wallet_client_observer.h" |
| 19 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" | 20 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" |
| 20 #include "chrome/browser/ui/autofill/autofill_dialog_models.h" | 21 #include "chrome/browser/ui/autofill/autofill_dialog_models.h" |
| 21 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" | 22 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 const content::NativeWebKeyboardEvent& event) OVERRIDE; | 92 const content::NativeWebKeyboardEvent& event) OVERRIDE; |
| 92 virtual void FocusMoved() OVERRIDE; | 93 virtual void FocusMoved() OVERRIDE; |
| 93 virtual void ViewClosed(DialogAction action) OVERRIDE; | 94 virtual void ViewClosed(DialogAction action) OVERRIDE; |
| 94 virtual DialogNotification CurrentNotification() const OVERRIDE; | 95 virtual DialogNotification CurrentNotification() const OVERRIDE; |
| 95 virtual void StartSignInFlow() OVERRIDE; | 96 virtual void StartSignInFlow() OVERRIDE; |
| 96 virtual void EndSignInFlow() OVERRIDE; | 97 virtual void EndSignInFlow() OVERRIDE; |
| 97 virtual Profile* profile() OVERRIDE; | 98 virtual Profile* profile() OVERRIDE; |
| 98 virtual content::WebContents* web_contents() OVERRIDE; | 99 virtual content::WebContents* web_contents() OVERRIDE; |
| 99 | 100 |
| 100 // AutofillPopupDelegate implementation. | 101 // AutofillPopupDelegate implementation. |
| 102 virtual void OnPopupShown(content::KeyboardListener* listener) OVERRIDE; |
| 103 virtual void OnPopupHidden(content::KeyboardListener* listener) OVERRIDE; |
| 101 virtual void DidSelectSuggestion(int identifier) OVERRIDE; | 104 virtual void DidSelectSuggestion(int identifier) OVERRIDE; |
| 102 virtual void DidAcceptSuggestion(const string16& value, | 105 virtual void DidAcceptSuggestion(const string16& value, |
| 103 int identifier) OVERRIDE; | 106 int identifier) OVERRIDE; |
| 104 virtual void RemoveSuggestion(const string16& value, | 107 virtual void RemoveSuggestion(const string16& value, |
| 105 int identifier) OVERRIDE; | 108 int identifier) OVERRIDE; |
| 106 virtual void ClearPreviewedForm() OVERRIDE; | 109 virtual void ClearPreviewedForm() OVERRIDE; |
| 107 virtual void ControllerDestroyed() OVERRIDE; | |
| 108 | 110 |
| 109 // content::NotificationObserver implementation: | 111 // content::NotificationObserver implementation: |
| 110 virtual void Observe(int type, | 112 virtual void Observe(int type, |
| 111 const content::NotificationSource& source, | 113 const content::NotificationSource& source, |
| 112 const content::NotificationDetails& details) OVERRIDE; | 114 const content::NotificationDetails& details) OVERRIDE; |
| 113 | 115 |
| 114 // SuggestionsMenuModelDelegate implementation. | 116 // SuggestionsMenuModelDelegate implementation. |
| 115 virtual void SuggestionItemSelected(const SuggestionsMenuModel& model) | 117 virtual void SuggestionItemSelected(const SuggestionsMenuModel& model) |
| 116 OVERRIDE; | 118 OVERRIDE; |
| 117 | 119 |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 SuggestionsMenuModel suggested_billing_; | 249 SuggestionsMenuModel suggested_billing_; |
| 248 SuggestionsMenuModel suggested_shipping_; | 250 SuggestionsMenuModel suggested_shipping_; |
| 249 | 251 |
| 250 // A map from DialogSection to editing state (true for editing, false for | 252 // A map from DialogSection to editing state (true for editing, false for |
| 251 // not editing). This only tracks if the user has clicked the edit link. | 253 // not editing). This only tracks if the user has clicked the edit link. |
| 252 std::map<DialogSection, bool> section_editing_state_; | 254 std::map<DialogSection, bool> section_editing_state_; |
| 253 | 255 |
| 254 // The GUIDs for the currently showing unverified profiles popup. | 256 // The GUIDs for the currently showing unverified profiles popup. |
| 255 std::vector<PersonalDataManager::GUIDPair> popup_guids_; | 257 std::vector<PersonalDataManager::GUIDPair> popup_guids_; |
| 256 | 258 |
| 257 // If non-NULL, the controller for the currently showing popup (which helps | 259 // The controller for the currently showing popup (which helps users when |
| 258 // users when they're manually filling the dialog). | 260 // they're manually filling the dialog). |
| 259 AutofillPopupControllerImpl* popup_controller_; | 261 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_; |
| 260 | 262 |
| 261 // The section for which |popup_controller_| is currently showing a popup | 263 // The section for which |popup_controller_| is currently showing a popup |
| 262 // (if any). | 264 // (if any). |
| 263 DialogSection section_showing_popup_; | 265 DialogSection section_showing_popup_; |
| 264 | 266 |
| 265 scoped_ptr<AutofillDialogView> view_; | 267 scoped_ptr<AutofillDialogView> view_; |
| 266 | 268 |
| 267 // A NotificationRegistrar for tracking the completion of sign-in. | 269 // A NotificationRegistrar for tracking the completion of sign-in. |
| 268 content::NotificationRegistrar registrar_; | 270 content::NotificationRegistrar registrar_; |
| 269 | 271 |
| 270 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); | 272 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); |
| 271 }; | 273 }; |
| 272 | 274 |
| 273 } // namespace autofill | 275 } // namespace autofill |
| 274 | 276 |
| 275 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 277 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
| OLD | NEW |