| 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 <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 DialogSection section) OVERRIDE; | 122 DialogSection section) OVERRIDE; |
| 123 virtual void EditClickedForSection(DialogSection section) OVERRIDE; | 123 virtual void EditClickedForSection(DialogSection section) OVERRIDE; |
| 124 virtual void EditCancelledForSection(DialogSection section) OVERRIDE; | 124 virtual void EditCancelledForSection(DialogSection section) OVERRIDE; |
| 125 virtual gfx::Image IconForField(AutofillFieldType type, | 125 virtual gfx::Image IconForField(AutofillFieldType type, |
| 126 const string16& user_input) const OVERRIDE; | 126 const string16& user_input) const OVERRIDE; |
| 127 virtual bool InputIsValid(AutofillFieldType type, | 127 virtual bool InputIsValid(AutofillFieldType type, |
| 128 const string16& value) const OVERRIDE; | 128 const string16& value) const OVERRIDE; |
| 129 virtual std::vector<AutofillFieldType> InputsAreValid( | 129 virtual std::vector<AutofillFieldType> InputsAreValid( |
| 130 const DetailOutputMap& inputs, | 130 const DetailOutputMap& inputs, |
| 131 ValidationType validation_type) const OVERRIDE; | 131 ValidationType validation_type) const OVERRIDE; |
| 132 virtual void UserEditedOrActivatedInput(const DetailInput* input, | 132 virtual void UserEditedOrActivatedInput(DialogSection section, |
| 133 AutofillFieldType type, |
| 133 gfx::NativeView parent_view, | 134 gfx::NativeView parent_view, |
| 134 const gfx::Rect& content_bounds, | 135 const gfx::Rect& content_bounds, |
| 135 const string16& field_contents, | 136 const string16& field_contents, |
| 136 bool was_edit) OVERRIDE; | 137 bool was_edit) OVERRIDE; |
| 137 virtual bool HandleKeyPressEventInInput( | 138 virtual bool HandleKeyPressEventInInput( |
| 138 const content::NativeWebKeyboardEvent& event) OVERRIDE; | 139 const content::NativeWebKeyboardEvent& event) OVERRIDE; |
| 139 virtual void FocusMoved() OVERRIDE; | 140 virtual void FocusMoved() OVERRIDE; |
| 140 virtual void ViewClosed() OVERRIDE; | 141 virtual void ViewClosed() OVERRIDE; |
| 141 virtual std::vector<DialogNotification> CurrentNotifications() const OVERRIDE; | 142 virtual std::vector<DialogNotification> CurrentNotifications() const OVERRIDE; |
| 142 virtual void StartSignInFlow() OVERRIDE; | 143 virtual void StartSignInFlow() OVERRIDE; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 content::WebContents* contents, | 226 content::WebContents* contents, |
| 226 const FormData& form_structure, | 227 const FormData& form_structure, |
| 227 const GURL& source_url, | 228 const GURL& source_url, |
| 228 const DialogType dialog_type, | 229 const DialogType dialog_type, |
| 229 const base::Callback<void(const FormStructure*, | 230 const base::Callback<void(const FormStructure*, |
| 230 const std::string&)>& callback); | 231 const std::string&)>& callback); |
| 231 | 232 |
| 232 // Exposed for testing. | 233 // Exposed for testing. |
| 233 AutofillDialogView* view() { return view_.get(); } | 234 AutofillDialogView* view() { return view_.get(); } |
| 234 virtual AutofillDialogView* CreateView(); | 235 virtual AutofillDialogView* CreateView(); |
| 235 const DetailInput* input_showing_popup() const { | 236 AutofillFieldType input_showing_popup_type() const { |
| 236 return input_showing_popup_; | 237 return input_showing_popup_type_; |
| 237 } | 238 } |
| 238 | 239 |
| 239 // Returns the PersonalDataManager for |profile_|. | 240 // Returns the PersonalDataManager for |profile_|. |
| 240 virtual PersonalDataManager* GetManager(); | 241 virtual PersonalDataManager* GetManager(); |
| 241 | 242 |
| 242 // Returns the WalletClient* this class uses to talk to Online Wallet. Exposed | 243 // Returns the WalletClient* this class uses to talk to Online Wallet. Exposed |
| 243 // for testing. | 244 // for testing. |
| 244 virtual wallet::WalletClient* GetWalletClient(); | 245 virtual wallet::WalletClient* GetWalletClient(); |
| 245 | 246 |
| 246 // Call to disable communication to Online Wallet for this dialog. | 247 // Call to disable communication to Online Wallet for this dialog. |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 | 516 |
| 516 // The GUIDs for the currently showing unverified profiles popup. | 517 // The GUIDs for the currently showing unverified profiles popup. |
| 517 std::vector<PersonalDataManager::GUIDPair> popup_guids_; | 518 std::vector<PersonalDataManager::GUIDPair> popup_guids_; |
| 518 | 519 |
| 519 // The controller for the currently showing popup (which helps users when | 520 // The controller for the currently showing popup (which helps users when |
| 520 // they're manually filling the dialog). | 521 // they're manually filling the dialog). |
| 521 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_; | 522 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_; |
| 522 | 523 |
| 523 // The input for which |popup_controller_| is currently showing a popup | 524 // The input for which |popup_controller_| is currently showing a popup |
| 524 // (if any). | 525 // (if any). |
| 525 const DetailInput* input_showing_popup_; | 526 AutofillFieldType input_showing_popup_type_; |
| 526 | 527 |
| 527 scoped_ptr<AutofillDialogView> view_; | 528 scoped_ptr<AutofillDialogView> view_; |
| 528 | 529 |
| 529 // A NotificationRegistrar for tracking the completion of sign-in. | 530 // A NotificationRegistrar for tracking the completion of sign-in. |
| 530 content::NotificationRegistrar registrar_; | 531 content::NotificationRegistrar registrar_; |
| 531 | 532 |
| 532 base::WeakPtrFactory<AutofillDialogControllerImpl> weak_ptr_factory_; | 533 base::WeakPtrFactory<AutofillDialogControllerImpl> weak_ptr_factory_; |
| 533 | 534 |
| 534 // Whether this is the first time this profile has seen the Autofill dialog. | 535 // Whether this is the first time this profile has seen the Autofill dialog. |
| 535 bool is_first_run_; | 536 bool is_first_run_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 546 | 547 |
| 547 // Whether the latency to display to the UI was logged to UMA yet. | 548 // Whether the latency to display to the UI was logged to UMA yet. |
| 548 bool was_ui_latency_logged_; | 549 bool was_ui_latency_logged_; |
| 549 | 550 |
| 550 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); | 551 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); |
| 551 }; | 552 }; |
| 552 | 553 |
| 553 } // namespace autofill | 554 } // namespace autofill |
| 554 | 555 |
| 555 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 556 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
| OLD | NEW |