| 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_AUTOFILL_AGENT_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ |
| 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 // PasswordAutofillAgent is guaranteed to outlive AutofillAgent. | 52 // PasswordAutofillAgent is guaranteed to outlive AutofillAgent. |
| 53 // PasswordGenerationAgent may be NULL. If it is not, then it is also | 53 // PasswordGenerationAgent may be NULL. If it is not, then it is also |
| 54 // guaranteed to outlive AutofillAgent. | 54 // guaranteed to outlive AutofillAgent. |
| 55 AutofillAgent(content::RenderFrame* render_frame, | 55 AutofillAgent(content::RenderFrame* render_frame, |
| 56 PasswordAutofillAgent* password_autofill_manager, | 56 PasswordAutofillAgent* password_autofill_manager, |
| 57 PasswordGenerationAgent* password_generation_agent); | 57 PasswordGenerationAgent* password_generation_agent); |
| 58 ~AutofillAgent() override; | 58 ~AutofillAgent() override; |
| 59 | 59 |
| 60 void BindRequest(mojom::AutofillAgentRequest request); | 60 void BindRequest(mojom::AutofillAgentRequest request); |
| 61 | 61 |
| 62 protected: |
| 63 // blink::WebAutofillClient: |
| 64 void didAssociateFormControls( |
| 65 const blink::WebVector<blink::WebNode>& nodes) override; |
| 66 |
| 62 private: | 67 private: |
| 63 // Functor used as a simplified comparison function for FormData. Only | 68 // Functor used as a simplified comparison function for FormData. Only |
| 64 // compares forms at a high level (notably name, origin, action). | 69 // compares forms at a high level (notably name, origin, action). |
| 65 struct FormDataCompare { | 70 struct FormDataCompare { |
| 66 bool operator()(const FormData& lhs, const FormData& rhs) const; | 71 bool operator()(const FormData& lhs, const FormData& rhs) const; |
| 67 }; | 72 }; |
| 68 | 73 |
| 69 // Thunk class for RenderViewObserver methods that haven't yet been migrated | 74 // Thunk class for RenderViewObserver methods that haven't yet been migrated |
| 70 // to RenderFrameObserver. Should eventually be removed. | 75 // to RenderFrameObserver. Should eventually be removed. |
| 71 // http://crbug.com/433486 | 76 // http://crbug.com/433486 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 void FormControlElementClicked(const blink::WebFormControlElement& element, | 154 void FormControlElementClicked(const blink::WebFormControlElement& element, |
| 150 bool was_focused) override; | 155 bool was_focused) override; |
| 151 | 156 |
| 152 // blink::WebAutofillClient: | 157 // blink::WebAutofillClient: |
| 153 void textFieldDidEndEditing(const blink::WebInputElement& element) override; | 158 void textFieldDidEndEditing(const blink::WebInputElement& element) override; |
| 154 void textFieldDidChange(const blink::WebFormControlElement& element) override; | 159 void textFieldDidChange(const blink::WebFormControlElement& element) override; |
| 155 void textFieldDidReceiveKeyDown( | 160 void textFieldDidReceiveKeyDown( |
| 156 const blink::WebInputElement& element, | 161 const blink::WebInputElement& element, |
| 157 const blink::WebKeyboardEvent& event) override; | 162 const blink::WebKeyboardEvent& event) override; |
| 158 void setIgnoreTextChanges(bool ignore) override; | 163 void setIgnoreTextChanges(bool ignore) override; |
| 159 void didAssociateFormControls( | |
| 160 const blink::WebVector<blink::WebNode>& nodes) override; | |
| 161 void openTextDataListChooser(const blink::WebInputElement& element) override; | 164 void openTextDataListChooser(const blink::WebInputElement& element) override; |
| 162 void dataListOptionsChanged(const blink::WebInputElement& element) override; | 165 void dataListOptionsChanged(const blink::WebInputElement& element) override; |
| 163 void firstUserGestureObserved() override; | 166 void firstUserGestureObserved() override; |
| 164 void ajaxSucceeded() override; | 167 void ajaxSucceeded() override; |
| 165 | 168 |
| 166 void OnFieldTypePredictionsAvailable( | 169 void OnFieldTypePredictionsAvailable( |
| 167 const std::vector<FormDataPredictions>& forms); | 170 const std::vector<FormDataPredictions>& forms); |
| 168 void OnFillForm(int query_id, const FormData& form); | 171 void OnFillForm(int query_id, const FormData& form); |
| 169 void OnPing(); | 172 void OnPing(); |
| 170 void OnPreviewForm(int query_id, const FormData& form); | 173 void OnPreviewForm(int query_id, const FormData& form); |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 mojom::AutofillDriverPtr mojo_autofill_driver_; | 306 mojom::AutofillDriverPtr mojo_autofill_driver_; |
| 304 | 307 |
| 305 base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_; | 308 base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_; |
| 306 | 309 |
| 307 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); | 310 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); |
| 308 }; | 311 }; |
| 309 | 312 |
| 310 } // namespace autofill | 313 } // namespace autofill |
| 311 | 314 |
| 312 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ | 315 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ |
| OLD | NEW |