Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: components/autofill/content/renderer/autofill_agent.h

Issue 2134653002: Add delay to didAssociateFormControlsTimer so it doesn't fire too frequently (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
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_
OLDNEW
« no previous file with comments | « chrome/test/base/chrome_render_view_test.cc ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698