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

Side by Side Diff: components/autofill/core/browser/password_autofill_manager.h

Issue 208453002: Add "previewing on hover" support for password field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update code as per Ilya's comment. Created 6 years, 9 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 COMPONENTS_AUTOFILL_CORE_BROWSER_PASSWORD_AUTOFILL_MANAGER_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_PASSWORD_AUTOFILL_MANAGER_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_PASSWORD_AUTOFILL_MANAGER_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_PASSWORD_AUTOFILL_MANAGER_H_
7 7
8 // This file was contains some repeated code from 8 // This file was contains some repeated code from
9 // chrome/renderer/autofill/password_autofill_manager because as we move to the 9 // chrome/renderer/autofill/password_autofill_manager because as we move to the
10 // new Autofill UI we needs these functions in both the browser and renderer. 10 // new Autofill UI we needs these functions in both the browser and renderer.
11 // Once the move is completed the repeated code in the renderer half should be 11 // Once the move is completed the repeated code in the renderer half should be
12 // removed. 12 // removed.
13 // http://crbug.com/51644 13 // http://crbug.com/51644
14 14
15 #include <map> 15 #include <map>
16 16
17 #include "components/autofill/core/common/password_form_fill_data.h" 17 #include "components/autofill/core/common/password_form_fill_data.h"
18 18
19 namespace autofill { 19 namespace autofill {
20 20
21 class AutofillDriver; 21 class AutofillDriver;
22 22
23 // This class is responsible for filling password forms. 23 // This class is responsible for filling password forms.
24 class PasswordAutofillManager { 24 class PasswordAutofillManager {
25 public: 25 public:
26 explicit PasswordAutofillManager(AutofillDriver* autofill_driver); 26 explicit PasswordAutofillManager(AutofillDriver* autofill_driver);
27 virtual ~PasswordAutofillManager(); 27 virtual ~PasswordAutofillManager();
28 28
29 // Previews the password associated with user name |username|. Returns true if
30 // the username and password fields were previewed, false otherwise.
31 bool DidSelectSuggestion(const FormFieldData& field,
32 const base::string16& username);
33
29 // Fills the password associated with user name |username|. Returns true if 34 // Fills the password associated with user name |username|. Returns true if
30 // the username and password fields were filled, false otherwise. 35 // the username and password fields were filled, false otherwise.
31 bool DidAcceptAutofillSuggestion(const FormFieldData& field, 36 bool DidAcceptSuggestion(const FormFieldData& field,
32 const base::string16& username); 37 const base::string16& username);
33 38
34 // Invoked when a password mapping is added. 39 // Invoked when a password mapping is added.
35 void AddPasswordFormMapping( 40 void AddPasswordFormMapping(
36 const FormFieldData& username_element, 41 const FormFieldData& username_element,
37 const PasswordFormFillData& password); 42 const PasswordFormFillData& password);
38 43
39 // Invoked to clear any page specific cached values. 44 // Invoked to clear any page specific cached values.
40 void Reset(); 45 void Reset();
41 46
42 private: 47 private:
(...skipping 20 matching lines...) Expand all
63 // Provides driver-level context to the shared code of the component. Must 68 // Provides driver-level context to the shared code of the component. Must
64 // outlive |this|. 69 // outlive |this|.
65 AutofillDriver* const autofill_driver_; // weak 70 AutofillDriver* const autofill_driver_; // weak
66 71
67 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillManager); 72 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillManager);
68 }; 73 };
69 74
70 } // namespace autofill 75 } // namespace autofill
71 76
72 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PASSWORD_AUTOFILL_MANAGER_H_ 77 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PASSWORD_AUTOFILL_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698