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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "base/timer/timer.h" | 15 #include "base/timer/timer.h" |
16 #include "components/autofill/content/renderer/form_cache.h" | 16 #include "components/autofill/content/renderer/form_cache.h" |
17 #include "components/autofill/content/renderer/page_click_listener.h" | 17 #include "components/autofill/content/renderer/page_click_listener.h" |
| 18 #include "components/autofill/core/common/autocheckout_status.h" |
18 #include "components/autofill/core/common/forms_seen_state.h" | 19 #include "components/autofill/core/common/forms_seen_state.h" |
19 #include "content/public/renderer/render_view_observer.h" | 20 #include "content/public/renderer/render_view_observer.h" |
20 #include "third_party/WebKit/public/web/WebAutofillClient.h" | 21 #include "third_party/WebKit/public/web/WebAutofillClient.h" |
21 #include "third_party/WebKit/public/web/WebFormElement.h" | 22 #include "third_party/WebKit/public/web/WebFormElement.h" |
22 #include "third_party/WebKit/public/web/WebInputElement.h" | 23 #include "third_party/WebKit/public/web/WebInputElement.h" |
23 | 24 |
24 namespace WebKit { | 25 namespace WebKit { |
25 class WebNode; | 26 class WebNode; |
26 class WebView; | 27 class WebView; |
27 } | 28 } |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 // proceed to the next step of the form. | 137 // proceed to the next step of the form. |
137 void OnFillFormsAndClick( | 138 void OnFillFormsAndClick( |
138 const std::vector<FormData>& form_data, | 139 const std::vector<FormData>& form_data, |
139 const std::vector<WebElementDescriptor>& click_elements_before_form_fill, | 140 const std::vector<WebElementDescriptor>& click_elements_before_form_fill, |
140 const std::vector<WebElementDescriptor>& click_elements_after_form_fill, | 141 const std::vector<WebElementDescriptor>& click_elements_after_form_fill, |
141 const WebElementDescriptor& element_descriptor); | 142 const WebElementDescriptor& element_descriptor); |
142 | 143 |
143 // Called when |topmost_frame_| is supported for Autocheckout. | 144 // Called when |topmost_frame_| is supported for Autocheckout. |
144 void OnAutocheckoutSupported(); | 145 void OnAutocheckoutSupported(); |
145 | 146 |
| 147 // Called when an Autocheckout page is completed by the renderer. |
| 148 void CompleteAutocheckoutPage(autofill::AutocheckoutStatus status); |
| 149 |
146 // Called when clicking an Autocheckout proceed element fails to do anything. | 150 // Called when clicking an Autocheckout proceed element fails to do anything. |
147 void ClickFailed(); | 151 void ClickFailed(); |
148 | 152 |
149 // Called in a posted task by textFieldDidChange() to work-around a WebKit bug | 153 // Called in a posted task by textFieldDidChange() to work-around a WebKit bug |
150 // http://bugs.webkit.org/show_bug.cgi?id=16976 | 154 // http://bugs.webkit.org/show_bug.cgi?id=16976 |
151 void TextFieldDidChangeImpl(const WebKit::WebInputElement& element); | 155 void TextFieldDidChangeImpl(const WebKit::WebInputElement& element); |
152 | 156 |
153 // Shows the autofill suggestions for |element|. | 157 // Shows the autofill suggestions for |element|. |
154 // This call is asynchronous and may or may not lead to the showing of a | 158 // This call is asynchronous and may or may not lead to the showing of a |
155 // suggestion popup (no popup is shown if there are no available suggestions). | 159 // suggestion popup (no popup is shown if there are no available suggestions). |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, WaitUsername); | 288 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, WaitUsername); |
285 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, SuggestionAccept); | 289 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, SuggestionAccept); |
286 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, SuggestionSelect); | 290 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, SuggestionSelect); |
287 | 291 |
288 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); | 292 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); |
289 }; | 293 }; |
290 | 294 |
291 } // namespace autofill | 295 } // namespace autofill |
292 | 296 |
293 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ | 297 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ |
OLD | NEW |