| 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 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 namespace content { | 36 namespace content { |
| 37 class WebContents; | 37 class WebContents; |
| 38 } | 38 } |
| 39 | 39 |
| 40 namespace autofill { | 40 namespace autofill { |
| 41 | 41 |
| 42 class AutofillDialogView; | 42 class AutofillDialogView; |
| 43 class DataModelWrapper; | 43 class DataModelWrapper; |
| 44 | 44 |
| 45 namespace risk { |
| 46 class Fingerprint; |
| 47 } |
| 48 |
| 45 // This class drives the dialog that appears when a site uses the imperative | 49 // This class drives the dialog that appears when a site uses the imperative |
| 46 // autocomplete API to fill out a form. | 50 // autocomplete API to fill out a form. |
| 47 class AutofillDialogControllerImpl : public AutofillDialogController, | 51 class AutofillDialogControllerImpl : public AutofillDialogController, |
| 48 public AutofillPopupDelegate, | 52 public AutofillPopupDelegate, |
| 49 public content::NotificationObserver, | 53 public content::NotificationObserver, |
| 50 public SuggestionsMenuModelDelegate, | 54 public SuggestionsMenuModelDelegate, |
| 51 public wallet::WalletClientObserver, | 55 public wallet::WalletClientObserver, |
| 52 public PersonalDataManagerObserver { | 56 public PersonalDataManagerObserver { |
| 53 public: | 57 public: |
| 54 AutofillDialogControllerImpl( | 58 AutofillDialogControllerImpl( |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 | 224 |
| 221 // Returns the PersonalDataManager for |profile_|. | 225 // Returns the PersonalDataManager for |profile_|. |
| 222 PersonalDataManager* GetManager(); | 226 PersonalDataManager* GetManager(); |
| 223 | 227 |
| 224 // Like RequestedFieldsForSection, but returns a pointer. | 228 // Like RequestedFieldsForSection, but returns a pointer. |
| 225 DetailInputs* MutableRequestedFieldsForSection(DialogSection section); | 229 DetailInputs* MutableRequestedFieldsForSection(DialogSection section); |
| 226 | 230 |
| 227 // Hides |popup_controller_|'s popup view, if it exists. | 231 // Hides |popup_controller_|'s popup view, if it exists. |
| 228 void HidePopup(); | 232 void HidePopup(); |
| 229 | 233 |
| 234 // Asks risk module to asynchronously load fingerprint data. Data will be |
| 235 // returned via OnDidLoadRiskFingerprintData. |
| 236 void LoadRiskFingerprintData(); |
| 237 void OnDidLoadRiskFingerprintData(scoped_ptr<risk::Fingerprint> fingerprint); |
| 238 |
| 230 // The |profile| for |contents_|. | 239 // The |profile| for |contents_|. |
| 231 Profile* const profile_; | 240 Profile* const profile_; |
| 232 | 241 |
| 233 // The WebContents where the Autofill action originated. | 242 // The WebContents where the Autofill action originated. |
| 234 content::WebContents* const contents_; | 243 content::WebContents* const contents_; |
| 235 | 244 |
| 236 FormStructure form_structure_; | 245 FormStructure form_structure_; |
| 237 | 246 |
| 238 // Whether the URL visible to the user when this dialog was requested to be | 247 // Whether the URL visible to the user when this dialog was requested to be |
| 239 // invoked is the same as |source_url_|. | 248 // invoked is the same as |source_url_|. |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 | 299 |
| 291 // The section for which |popup_controller_| is currently showing a popup | 300 // The section for which |popup_controller_| is currently showing a popup |
| 292 // (if any). | 301 // (if any). |
| 293 DialogSection section_showing_popup_; | 302 DialogSection section_showing_popup_; |
| 294 | 303 |
| 295 scoped_ptr<AutofillDialogView> view_; | 304 scoped_ptr<AutofillDialogView> view_; |
| 296 | 305 |
| 297 // A NotificationRegistrar for tracking the completion of sign-in. | 306 // A NotificationRegistrar for tracking the completion of sign-in. |
| 298 content::NotificationRegistrar registrar_; | 307 content::NotificationRegistrar registrar_; |
| 299 | 308 |
| 309 base::WeakPtrFactory<AutofillDialogControllerImpl> weak_ptr_factory_; |
| 310 |
| 300 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); | 311 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); |
| 301 }; | 312 }; |
| 302 | 313 |
| 303 } // namespace autofill | 314 } // namespace autofill |
| 304 | 315 |
| 305 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 316 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
| OLD | NEW |