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 COMPONENTS_AUTOFILL_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ | 5 #ifndef COMPONENTS_AUTOFILL_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ |
6 #define COMPONENTS_AUTOFILL_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ | 6 #define COMPONENTS_AUTOFILL_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // username and password fields were filled, false otherwise. | 42 // username and password fields were filled, false otherwise. |
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 // Shows an Autofill popup with username suggestions for |element|. |
| 53 // Returns true if any suggestions were shown, false otherwise. |
| 54 bool ShowSuggestions(const WebKit::WebInputElement& element); |
52 | 55 |
53 private: | 56 private: |
54 friend class PasswordAutofillAgentTest; | 57 friend class PasswordAutofillAgentTest; |
55 | 58 |
56 struct PasswordInfo { | 59 struct PasswordInfo { |
57 WebKit::WebInputElement password_field; | 60 WebKit::WebInputElement password_field; |
58 PasswordFormFillData fill_data; | 61 PasswordFormFillData fill_data; |
59 bool backspace_pressed_last; | 62 bool backspace_pressed_last; |
60 PasswordInfo() : backspace_pressed_last(false) {} | 63 PasswordInfo() : backspace_pressed_last(false) {} |
61 }; | 64 }; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 WebKit::WebView* web_view_; | 125 WebKit::WebView* web_view_; |
123 | 126 |
124 base::WeakPtrFactory<PasswordAutofillAgent> weak_ptr_factory_; | 127 base::WeakPtrFactory<PasswordAutofillAgent> weak_ptr_factory_; |
125 | 128 |
126 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); | 129 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); |
127 }; | 130 }; |
128 | 131 |
129 } // namespace autofill | 132 } // namespace autofill |
130 | 133 |
131 #endif // COMPONENTS_AUTOFILL_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ | 134 #endif // COMPONENTS_AUTOFILL_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ |
OLD | NEW |