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

Side by Side Diff: chrome/renderer/autofill/password_autofill_manager.h

Issue 9600038: Add Password Autofill Manager to New Autofill (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Hiding renderer popup Created 8 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_RENDERER_AUTOFILL_PASSWORD_AUTOFILL_MANAGER_H_ 5 #ifndef CHROME_RENDERER_AUTOFILL_PASSWORD_AUTOFILL_MANAGER_H_
6 #define CHROME_RENDERER_AUTOFILL_PASSWORD_AUTOFILL_MANAGER_H_ 6 #define CHROME_RENDERER_AUTOFILL_PASSWORD_AUTOFILL_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 bool DidAcceptAutofillSuggestion(const WebKit::WebNode& node, 43 bool DidAcceptAutofillSuggestion(const WebKit::WebNode& node,
44 const WebKit::WebString& value); 44 const WebKit::WebString& value);
45 // A no-op. No filling happens for selection. But this method returns 45 // A no-op. No filling happens for selection. But this method returns
46 // true when |node| is fillable by password Autofill. 46 // true when |node| is fillable by password Autofill.
47 bool DidSelectAutofillSuggestion(const WebKit::WebNode& node); 47 bool DidSelectAutofillSuggestion(const WebKit::WebNode& node);
48 // A no-op. Password forms are not previewed, so they do not need to be 48 // A no-op. Password forms are not previewed, so they do not need to be
49 // cleared when the selection changes. However, this method returns 49 // cleared when the selection changes. However, this method returns
50 // true when |node| is fillable by password Autofill. 50 // true when |node| is fillable by password Autofill.
51 bool DidClearAutofillSelection(const WebKit::WebNode& node); 51 bool DidClearAutofillSelection(const WebKit::WebNode& node);
52 52
53 // For browser side Password Manager.
54 void HandleKeyDown(const WebKit::WebInputElement& node, int key_code);
55
56 // Disable the popup and never show it.
57 void DisablePopup();
58
53 private: 59 private:
54 friend class PasswordAutofillManagerTest; 60 friend class PasswordAutofillManagerTest;
55 61
56 struct PasswordInfo { 62 struct PasswordInfo {
57 WebKit::WebInputElement password_field; 63 WebKit::WebInputElement password_field;
58 webkit::forms::PasswordFormFillData fill_data; 64 webkit::forms::PasswordFormFillData fill_data;
59 bool backspace_pressed_last; 65 bool backspace_pressed_last;
60 PasswordInfo() : backspace_pressed_last(false) {} 66 PasswordInfo() : backspace_pressed_last(false) {}
61 }; 67 };
62 typedef std::map<WebKit::WebElement, PasswordInfo> LoginToPasswordInfoMap; 68 typedef std::map<WebKit::WebElement, PasswordInfo> LoginToPasswordInfoMap;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 void FrameClosing(const WebKit::WebFrame* frame); 113 void FrameClosing(const WebKit::WebFrame* frame);
108 114
109 // Finds login information for a |node| that was previously filled. 115 // Finds login information for a |node| that was previously filled.
110 bool FindLoginInfo(const WebKit::WebNode& node, 116 bool FindLoginInfo(const WebKit::WebNode& node,
111 WebKit::WebInputElement* found_input, 117 WebKit::WebInputElement* found_input,
112 PasswordInfo* found_password); 118 PasswordInfo* found_password);
113 119
114 // The logins we have filled so far with their associated info. 120 // The logins we have filled so far with their associated info.
115 LoginToPasswordInfoMap login_to_password_info_; 121 LoginToPasswordInfoMap login_to_password_info_;
116 122
123 // Used to disable and hide the popup.
124 bool disable_popup_;
125
117 base::WeakPtrFactory<PasswordAutofillManager> weak_ptr_factory_; 126 base::WeakPtrFactory<PasswordAutofillManager> weak_ptr_factory_;
118 127
119 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillManager); 128 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillManager);
120 }; 129 };
121 130
122 } // namespace autofill 131 } // namespace autofill
123 132
124 #endif // CHROME_RENDERER_AUTOFILL_PASSWORD_AUTOFILL_MANAGER_H_ 133 #endif // CHROME_RENDERER_AUTOFILL_PASSWORD_AUTOFILL_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698