| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // PasswordAutofillAgent is guaranteed to outlive AutofillAgent. | 51 // PasswordAutofillAgent is guaranteed to outlive AutofillAgent. |
| 52 // PasswordGenerationAgent may be NULL. If it is not, then it is also | 52 // PasswordGenerationAgent may be NULL. If it is not, then it is also |
| 53 // guaranteed to outlive AutofillAgent. | 53 // guaranteed to outlive AutofillAgent. |
| 54 AutofillAgent(content::RenderFrame* render_frame, | 54 AutofillAgent(content::RenderFrame* render_frame, |
| 55 PasswordAutofillAgent* password_autofill_manager, | 55 PasswordAutofillAgent* password_autofill_manager, |
| 56 PasswordGenerationAgent* password_generation_agent); | 56 PasswordGenerationAgent* password_generation_agent); |
| 57 ~AutofillAgent() override; | 57 ~AutofillAgent() override; |
| 58 | 58 |
| 59 void BindRequest(mojom::AutofillAgentRequest request); | 59 void BindRequest(mojom::AutofillAgentRequest request); |
| 60 | 60 |
| 61 protected: |
| 62 // blink::WebAutofillClient: |
| 63 void didAssociateFormControls( |
| 64 const blink::WebVector<blink::WebNode>& nodes) override; |
| 65 |
| 61 private: | 66 private: |
| 62 // Functor used as a simplified comparison function for FormData. Only | 67 // Functor used as a simplified comparison function for FormData. Only |
| 63 // compares forms at a high level (notably name, origin, action). | 68 // compares forms at a high level (notably name, origin, action). |
| 64 struct FormDataCompare { | 69 struct FormDataCompare { |
| 65 bool operator()(const FormData& lhs, const FormData& rhs) const; | 70 bool operator()(const FormData& lhs, const FormData& rhs) const; |
| 66 }; | 71 }; |
| 67 | 72 |
| 68 // Thunk class for RenderViewObserver methods that haven't yet been migrated | 73 // Thunk class for RenderViewObserver methods that haven't yet been migrated |
| 69 // to RenderFrameObserver. Should eventually be removed. | 74 // to RenderFrameObserver. Should eventually be removed. |
| 70 // http://crbug.com/433486 | 75 // http://crbug.com/433486 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 void FormControlElementClicked(const blink::WebFormControlElement& element, | 144 void FormControlElementClicked(const blink::WebFormControlElement& element, |
| 140 bool was_focused) override; | 145 bool was_focused) override; |
| 141 | 146 |
| 142 // blink::WebAutofillClient: | 147 // blink::WebAutofillClient: |
| 143 void textFieldDidEndEditing(const blink::WebInputElement& element) override; | 148 void textFieldDidEndEditing(const blink::WebInputElement& element) override; |
| 144 void textFieldDidChange(const blink::WebFormControlElement& element) override; | 149 void textFieldDidChange(const blink::WebFormControlElement& element) override; |
| 145 void textFieldDidReceiveKeyDown( | 150 void textFieldDidReceiveKeyDown( |
| 146 const blink::WebInputElement& element, | 151 const blink::WebInputElement& element, |
| 147 const blink::WebKeyboardEvent& event) override; | 152 const blink::WebKeyboardEvent& event) override; |
| 148 void setIgnoreTextChanges(bool ignore) override; | 153 void setIgnoreTextChanges(bool ignore) override; |
| 149 void didAssociateFormControls( | |
| 150 const blink::WebVector<blink::WebNode>& nodes) override; | |
| 151 void openTextDataListChooser(const blink::WebInputElement& element) override; | 154 void openTextDataListChooser(const blink::WebInputElement& element) override; |
| 152 void dataListOptionsChanged(const blink::WebInputElement& element) override; | 155 void dataListOptionsChanged(const blink::WebInputElement& element) override; |
| 153 void firstUserGestureObserved() override; | 156 void firstUserGestureObserved() override; |
| 154 void ajaxSucceeded() override; | 157 void ajaxSucceeded() override; |
| 155 | 158 |
| 156 void OnFieldTypePredictionsAvailable( | 159 void OnFieldTypePredictionsAvailable( |
| 157 const std::vector<FormDataPredictions>& forms); | 160 const std::vector<FormDataPredictions>& forms); |
| 158 void OnFillForm(int query_id, const FormData& form); | 161 void OnFillForm(int query_id, const FormData& form); |
| 159 void OnPing(); | 162 void OnPing(); |
| 160 void OnPreviewForm(int query_id, const FormData& form); | 163 void OnPreviewForm(int query_id, const FormData& form); |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 mojom::AutofillDriverPtr mojo_autofill_driver_; | 288 mojom::AutofillDriverPtr mojo_autofill_driver_; |
| 286 | 289 |
| 287 base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_; | 290 base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_; |
| 288 | 291 |
| 289 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); | 292 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); |
| 290 }; | 293 }; |
| 291 | 294 |
| 292 } // namespace autofill | 295 } // namespace autofill |
| 293 | 296 |
| 294 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ | 297 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ |
| OLD | NEW |