OLD | NEW |
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_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ |
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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. Password forms are not previewed, so they do not need to be | 45 // A no-op. Password forms are not previewed, so they do not need to be |
46 // cleared when the selection changes. However, this method returns | 46 // cleared when the selection changes. However, this method returns |
47 // true when |node| is fillable by password Autofill. | 47 // true when |node| is fillable by password Autofill. |
48 bool DidClearAutofillSelection(const WebKit::WebNode& node); | 48 bool DidClearAutofillSelection(const WebKit::WebNode& node); |
49 // Shows an Autofill popup with username suggestions for |element|. | 49 // Shows an Autofill popup with username suggestions for |element|. |
50 // Returns true if any suggestions were shown, false otherwise. | 50 // Returns true if any suggestions were shown, false otherwise. |
51 bool ShowSuggestions(const WebKit::WebInputElement& element); | 51 bool ShowSuggestions(const WebKit::WebInputElement& element); |
52 | 52 |
| 53 // Called when new form controls are inserted. |
| 54 void OnDynamicFormsSeen(WebKit::WebFrame* frame); |
| 55 |
53 protected: | 56 protected: |
54 virtual bool OriginCanAccessPasswordManager( | 57 virtual bool OriginCanAccessPasswordManager( |
55 const WebKit::WebSecurityOrigin& origin); | 58 const WebKit::WebSecurityOrigin& origin); |
56 | 59 |
57 private: | 60 private: |
58 friend class PasswordAutofillAgentTest; | 61 friend class PasswordAutofillAgentTest; |
59 | 62 |
60 enum OtherPossibleUsernamesUsage { | 63 enum OtherPossibleUsernamesUsage { |
61 NOTHING_TO_AUTOFILL, | 64 NOTHING_TO_AUTOFILL, |
62 OTHER_POSSIBLE_USERNAMES_ABSENT, | 65 OTHER_POSSIBLE_USERNAMES_ABSENT, |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 FrameToPasswordFormMap provisionally_saved_forms_; | 144 FrameToPasswordFormMap provisionally_saved_forms_; |
142 | 145 |
143 base::WeakPtrFactory<PasswordAutofillAgent> weak_ptr_factory_; | 146 base::WeakPtrFactory<PasswordAutofillAgent> weak_ptr_factory_; |
144 | 147 |
145 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); | 148 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); |
146 }; | 149 }; |
147 | 150 |
148 } // namespace autofill | 151 } // namespace autofill |
149 | 152 |
150 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ | 153 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ |
OLD | NEW |