| 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" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 namespace content { | 39 namespace content { |
| 40 class WebContents; | 40 class WebContents; |
| 41 } | 41 } |
| 42 | 42 |
| 43 namespace autofill { | 43 namespace autofill { |
| 44 | 44 |
| 45 class AutofillDialogView; | 45 class AutofillDialogView; |
| 46 class DataModelWrapper; | 46 class DataModelWrapper; |
| 47 | 47 |
| 48 namespace risk { |
| 49 class Fingerprint; |
| 50 } |
| 51 |
| 48 // This class drives the dialog that appears when a site uses the imperative | 52 // This class drives the dialog that appears when a site uses the imperative |
| 49 // autocomplete API to fill out a form. | 53 // autocomplete API to fill out a form. |
| 50 class AutofillDialogControllerImpl : public AutofillDialogController, | 54 class AutofillDialogControllerImpl : public AutofillDialogController, |
| 51 public AutofillPopupDelegate, | 55 public AutofillPopupDelegate, |
| 52 public content::NotificationObserver, | 56 public content::NotificationObserver, |
| 53 public SuggestionsMenuModelDelegate, | 57 public SuggestionsMenuModelDelegate, |
| 54 public wallet::WalletClientObserver, | 58 public wallet::WalletClientObserver, |
| 55 public PersonalDataManagerObserver { | 59 public PersonalDataManagerObserver { |
| 56 public: | 60 public: |
| 57 AutofillDialogControllerImpl( | 61 AutofillDialogControllerImpl( |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 233 |
| 230 // Returns the PersonalDataManager for |profile_|. | 234 // Returns the PersonalDataManager for |profile_|. |
| 231 PersonalDataManager* GetManager(); | 235 PersonalDataManager* GetManager(); |
| 232 | 236 |
| 233 // Like RequestedFieldsForSection, but returns a pointer. | 237 // Like RequestedFieldsForSection, but returns a pointer. |
| 234 DetailInputs* MutableRequestedFieldsForSection(DialogSection section); | 238 DetailInputs* MutableRequestedFieldsForSection(DialogSection section); |
| 235 | 239 |
| 236 // Hides |popup_controller_|'s popup view, if it exists. | 240 // Hides |popup_controller_|'s popup view, if it exists. |
| 237 void HidePopup(); | 241 void HidePopup(); |
| 238 | 242 |
| 243 // Asks risk module to asynchronously load fingerprint data. Data will be |
| 244 // returned via OnDidLoadRiskFingerprintData. |
| 245 void LoadRiskFingerprintData(); |
| 246 void OnDidLoadRiskFingerprintData(scoped_ptr<risk::Fingerprint> fingerprint); |
| 247 |
| 239 // The |profile| for |contents_|. | 248 // The |profile| for |contents_|. |
| 240 Profile* const profile_; | 249 Profile* const profile_; |
| 241 | 250 |
| 242 // The WebContents where the Autofill action originated. | 251 // The WebContents where the Autofill action originated. |
| 243 content::WebContents* const contents_; | 252 content::WebContents* const contents_; |
| 244 | 253 |
| 245 FormStructure form_structure_; | 254 FormStructure form_structure_; |
| 246 | 255 |
| 247 // Whether the URL visible to the user when this dialog was requested to be | 256 // Whether the URL visible to the user when this dialog was requested to be |
| 248 // invoked is the same as |source_url_|. | 257 // invoked is the same as |source_url_|. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 | 310 |
| 302 // The section for which |popup_controller_| is currently showing a popup | 311 // The section for which |popup_controller_| is currently showing a popup |
| 303 // (if any). | 312 // (if any). |
| 304 DialogSection section_showing_popup_; | 313 DialogSection section_showing_popup_; |
| 305 | 314 |
| 306 scoped_ptr<AutofillDialogView> view_; | 315 scoped_ptr<AutofillDialogView> view_; |
| 307 | 316 |
| 308 // A NotificationRegistrar for tracking the completion of sign-in. | 317 // A NotificationRegistrar for tracking the completion of sign-in. |
| 309 content::NotificationRegistrar registrar_; | 318 content::NotificationRegistrar registrar_; |
| 310 | 319 |
| 320 base::WeakPtrFactory<AutofillDialogControllerImpl> weak_ptr_factory_; |
| 321 |
| 311 // For logging UMA metrics. | 322 // For logging UMA metrics. |
| 312 const AutofillMetrics& metric_logger_; | 323 const AutofillMetrics& metric_logger_; |
| 313 base::Time dialog_shown_timestamp_; | 324 base::Time dialog_shown_timestamp_; |
| 314 DialogType dialog_type_; | 325 DialogType dialog_type_; |
| 315 | 326 |
| 316 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); | 327 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); |
| 317 }; | 328 }; |
| 318 | 329 |
| 319 } // namespace autofill | 330 } // namespace autofill |
| 320 | 331 |
| 321 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 332 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
| OLD | NEW |