Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(437)

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_controller_impl.h

Issue 12212057: [Autofill] Add ability to load Risk fingerprint data in AutofillDialogControllerImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 10 matching lines...) Expand all
32 class Profile; 33 class Profile;
33 34
34 namespace content { 35 namespace content {
35 class WebContents; 36 class WebContents;
36 } 37 }
37 38
38 namespace autofill { 39 namespace autofill {
39 40
40 class AutofillDialogView; 41 class AutofillDialogView;
41 42
43 namespace risk {
44 class Fingerprint;
45 }
46
42 // This class drives the dialog that appears when a site uses the imperative 47 // This class drives the dialog that appears when a site uses the imperative
43 // autocomplete API to fill out a form. 48 // autocomplete API to fill out a form.
44 class AutofillDialogControllerImpl : public AutofillDialogController, 49 class AutofillDialogControllerImpl : public AutofillDialogController,
45 public AutofillPopupDelegate, 50 public AutofillPopupDelegate,
46 public content::NotificationObserver, 51 public content::NotificationObserver,
47 public SuggestionsMenuModelDelegate, 52 public SuggestionsMenuModelDelegate,
48 public wallet::WalletClientObserver { 53 public wallet::WalletClientObserver {
49 public: 54 public:
50 AutofillDialogControllerImpl( 55 AutofillDialogControllerImpl(
51 content::WebContents* contents, 56 content::WebContents* contents,
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 202
198 // Returns the PersonalDataManager for |profile_|. 203 // Returns the PersonalDataManager for |profile_|.
199 PersonalDataManager* GetManager(); 204 PersonalDataManager* GetManager();
200 205
201 // Like RequestedFieldsForSection, but returns a pointer. 206 // Like RequestedFieldsForSection, but returns a pointer.
202 DetailInputs* MutableRequestedFieldsForSection(DialogSection section); 207 DetailInputs* MutableRequestedFieldsForSection(DialogSection section);
203 208
204 // Hides |popup_controller_|'s popup view, if it exists. 209 // Hides |popup_controller_|'s popup view, if it exists.
205 void HidePopup(); 210 void HidePopup();
206 211
212 // Asynchronously loads fingerprint data to be sent to the Risk server, and
213 // calls OnDidLoadRiskFingerprintData() with the data once it's loaded.
Evan Stade 2013/02/07 01:34:53 this function does not actually call OnDidLoadRisk
Ilya Sherman 2013/02/07 01:58:29 Done.
214 void LoadRiskFingerprintData();
215
216 // Callback from LoadRiskFingerprintData().
217 void OnDidLoadRiskFingerprintData(scoped_ptr<risk::Fingerprint> fingerprint);
218
207 // The |profile| for |contents_|. 219 // The |profile| for |contents_|.
208 Profile* const profile_; 220 Profile* const profile_;
209 221
210 // The WebContents where the Autofill action originated. 222 // The WebContents where the Autofill action originated.
211 content::WebContents* const contents_; 223 content::WebContents* const contents_;
212 224
213 FormStructure form_structure_; 225 FormStructure form_structure_;
214 226
215 // Whether the URL visible to the user when this dialog was requested to be 227 // Whether the URL visible to the user when this dialog was requested to be
216 // invoked is the same as |source_url_|. 228 // invoked is the same as |source_url_|.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 272
261 // The section for which |popup_controller_| is currently showing a popup 273 // The section for which |popup_controller_| is currently showing a popup
262 // (if any). 274 // (if any).
263 DialogSection section_showing_popup_; 275 DialogSection section_showing_popup_;
264 276
265 scoped_ptr<AutofillDialogView> view_; 277 scoped_ptr<AutofillDialogView> view_;
266 278
267 // A NotificationRegistrar for tracking the completion of sign-in. 279 // A NotificationRegistrar for tracking the completion of sign-in.
268 content::NotificationRegistrar registrar_; 280 content::NotificationRegistrar registrar_;
269 281
282 base::WeakPtrFactory<AutofillDialogControllerImpl> weak_ptr_factory_;
283
270 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); 284 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl);
271 }; 285 };
272 286
273 } // namespace autofill 287 } // namespace autofill
274 288
275 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ 289 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698