| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 virtual void FrameDetached(blink::WebFrame* frame) OVERRIDE; | 117 virtual void FrameDetached(blink::WebFrame* frame) OVERRIDE; |
| 118 virtual void FrameWillClose(blink::WebFrame* frame) OVERRIDE; | 118 virtual void FrameWillClose(blink::WebFrame* frame) OVERRIDE; |
| 119 virtual void WillSendSubmitEvent(blink::WebFrame* frame, | 119 virtual void WillSendSubmitEvent(blink::WebFrame* frame, |
| 120 const blink::WebFormElement& form) OVERRIDE; | 120 const blink::WebFormElement& form) OVERRIDE; |
| 121 virtual void WillSubmitForm(blink::WebFrame* frame, | 121 virtual void WillSubmitForm(blink::WebFrame* frame, |
| 122 const blink::WebFormElement& form) OVERRIDE; | 122 const blink::WebFormElement& form) OVERRIDE; |
| 123 virtual void WillProcessUserGesture() OVERRIDE; | 123 virtual void WillProcessUserGesture() OVERRIDE; |
| 124 | 124 |
| 125 // RenderView IPC handlers: | 125 // RenderView IPC handlers: |
| 126 void OnFillPasswordForm(const PasswordFormFillData& form_data); | 126 void OnFillPasswordForm(const PasswordFormFillData& form_data); |
| 127 void OnRemovePasswordSuggestion(const base::string16& username_to_remove); |
| 127 | 128 |
| 128 // Scans the given frame for password forms and sends them up to the browser. | 129 // Scans the given frame for password forms and sends them up to the browser. |
| 129 // If |only_visible| is true, only forms visible in the layout are sent. | 130 // If |only_visible| is true, only forms visible in the layout are sent. |
| 130 void SendPasswordForms(blink::WebFrame* frame, bool only_visible); | 131 void SendPasswordForms(blink::WebFrame* frame, bool only_visible); |
| 131 | 132 |
| 132 void GetSuggestions(const PasswordFormFillData& fill_data, | 133 void GetSuggestions(const PasswordFormFillData& fill_data, |
| 133 const base::string16& input, | 134 const base::string16& input, |
| 134 std::vector<base::string16>* suggestions, | 135 std::vector<base::string16>* suggestions, |
| 135 std::vector<base::string16>* realms); | 136 std::vector<base::string16>* realms); |
| 136 | 137 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 | 177 |
| 177 // The logins we have filled so far with their associated info. | 178 // The logins we have filled so far with their associated info. |
| 178 LoginToPasswordInfoMap login_to_password_info_; | 179 LoginToPasswordInfoMap login_to_password_info_; |
| 179 | 180 |
| 180 // Used for UMA stats. | 181 // Used for UMA stats. |
| 181 OtherPossibleUsernamesUsage usernames_usage_; | 182 OtherPossibleUsernamesUsage usernames_usage_; |
| 182 | 183 |
| 183 // Pointer to the WebView. Used to access page scale factor. | 184 // Pointer to the WebView. Used to access page scale factor. |
| 184 blink::WebView* web_view_; | 185 blink::WebView* web_view_; |
| 185 | 186 |
| 187 // Currently selected form |
| 188 blink::WebFormElement current_form_; |
| 189 |
| 186 // Set if the user might be submitting a password form on the current page, | 190 // Set if the user might be submitting a password form on the current page, |
| 187 // but the submit may still fail (i.e. doesn't pass JavaScript validation). | 191 // but the submit may still fail (i.e. doesn't pass JavaScript validation). |
| 188 FrameToPasswordFormMap provisionally_saved_forms_; | 192 FrameToPasswordFormMap provisionally_saved_forms_; |
| 189 | 193 |
| 190 PasswordValueGatekeeper gatekeeper_; | 194 PasswordValueGatekeeper gatekeeper_; |
| 191 | 195 |
| 192 base::WeakPtrFactory<PasswordAutofillAgent> weak_ptr_factory_; | 196 base::WeakPtrFactory<PasswordAutofillAgent> weak_ptr_factory_; |
| 193 | 197 |
| 194 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); | 198 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); |
| 195 }; | 199 }; |
| 196 | 200 |
| 197 } // namespace autofill | 201 } // namespace autofill |
| 198 | 202 |
| 199 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ | 203 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ |
| OLD | NEW |