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

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

Issue 208453002: Add "previewing on hover" support for password field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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 <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 void OnFillForm(int query_id, const FormData& form); 94 void OnFillForm(int query_id, const FormData& form);
95 void OnPreviewForm(int query_id, const FormData& form); 95 void OnPreviewForm(int query_id, const FormData& form);
96 96
97 // For external Autofill selection. 97 // For external Autofill selection.
98 void OnClearForm(); 98 void OnClearForm();
99 void OnClearPreviewedForm(); 99 void OnClearPreviewedForm();
100 void OnFillFieldWithValue(const base::string16& value); 100 void OnFillFieldWithValue(const base::string16& value);
101 void OnPreviewFieldWithValue(const base::string16& value); 101 void OnPreviewFieldWithValue(const base::string16& value);
102 void OnAcceptDataListSuggestion(const base::string16& value); 102 void OnAcceptDataListSuggestion(const base::string16& value);
103 void OnAcceptPasswordAutofillSuggestion(const base::string16& username); 103 void OnAcceptPasswordAutofillSuggestion(const base::string16& username);
104 void OnPreviewPassword(const base::string16& username);
104 105
105 // Called when interactive autocomplete finishes. 106 // Called when interactive autocomplete finishes.
106 void OnRequestAutocompleteResult( 107 void OnRequestAutocompleteResult(
107 blink::WebFormElement::AutocompleteResult result, 108 blink::WebFormElement::AutocompleteResult result,
108 const FormData& form_data); 109 const FormData& form_data);
109 110
110 // Called when an autocomplete request succeeds or fails with the |result|. 111 // Called when an autocomplete request succeeds or fails with the |result|.
111 void FinishAutocompleteRequest( 112 void FinishAutocompleteRequest(
112 blink::WebFormElement::AutocompleteResult result); 113 blink::WebFormElement::AutocompleteResult result);
113 114
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // Whether or not to ignore text changes. Useful for when we're committing 206 // Whether or not to ignore text changes. Useful for when we're committing
206 // a composition when we are defocusing the WebView and we don't want to 207 // a composition when we are defocusing the WebView and we don't want to
207 // trigger an autofill popup to show. 208 // trigger an autofill popup to show.
208 bool ignore_text_changes_; 209 bool ignore_text_changes_;
209 210
210 // Whether the Autofill popup is possibly visible. This is tracked as a 211 // Whether the Autofill popup is possibly visible. This is tracked as a
211 // performance improvement, so that the IPC channel isn't flooded with 212 // performance improvement, so that the IPC channel isn't flooded with
212 // messages to close the Autofill popup when it can't possibly be showing. 213 // messages to close the Autofill popup when it can't possibly be showing.
213 bool is_popup_possibly_visible_; 214 bool is_popup_possibly_visible_;
214 215
216 // Whether the password is previewed. If true, the previewed username and
217 // password will be cleared on receiving ClearPreviewedForm message.
218 bool is_password_previewed_;
Ilya Sherman 2014/03/21 22:35:19 Please move this state tracking and everything tha
ziran.sun 2014/03/25 18:25:26 Done.
219
215 // Timestamp of first time forms are seen. 220 // Timestamp of first time forms are seen.
216 base::TimeTicks forms_seen_timestamp_; 221 base::TimeTicks forms_seen_timestamp_;
217 222
218 base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_; 223 base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_;
219 224
220 friend class PasswordAutofillAgentTest; 225 friend class PasswordAutofillAgentTest;
221 friend class RequestAutocompleteRendererTest; 226 friend class RequestAutocompleteRendererTest;
222 FRIEND_TEST_ALL_PREFIXES(AutofillRendererTest, FillFormElement); 227 FRIEND_TEST_ALL_PREFIXES(AutofillRendererTest, FillFormElement);
223 FRIEND_TEST_ALL_PREFIXES(AutofillRendererTest, SendDynamicForms); 228 FRIEND_TEST_ALL_PREFIXES(AutofillRendererTest, SendDynamicForms);
224 FRIEND_TEST_ALL_PREFIXES(AutofillRendererTest, ShowAutofillWarning); 229 FRIEND_TEST_ALL_PREFIXES(AutofillRendererTest, ShowAutofillWarning);
225 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, WaitUsername); 230 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, WaitUsername);
226 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, SuggestionAccept); 231 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, SuggestionAccept);
227 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, SuggestionSelect); 232 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, SuggestionSelect);
228 FRIEND_TEST_ALL_PREFIXES( 233 FRIEND_TEST_ALL_PREFIXES(
229 PasswordAutofillAgentTest, 234 PasswordAutofillAgentTest,
230 PasswordAutofillTriggersOnChangeEventsWaitForUsername); 235 PasswordAutofillTriggersOnChangeEventsWaitForUsername);
231 FRIEND_TEST_ALL_PREFIXES(RequestAutocompleteRendererTest, 236 FRIEND_TEST_ALL_PREFIXES(RequestAutocompleteRendererTest,
232 NoCancelOnMainFrameNavigateAfterDone); 237 NoCancelOnMainFrameNavigateAfterDone);
233 FRIEND_TEST_ALL_PREFIXES(RequestAutocompleteRendererTest, 238 FRIEND_TEST_ALL_PREFIXES(RequestAutocompleteRendererTest,
234 NoCancelOnSubframeNavigateAfterDone); 239 NoCancelOnSubframeNavigateAfterDone);
235 FRIEND_TEST_ALL_PREFIXES(RequestAutocompleteRendererTest, 240 FRIEND_TEST_ALL_PREFIXES(RequestAutocompleteRendererTest,
236 InvokingTwiceOnlyShowsOnce); 241 InvokingTwiceOnlyShowsOnce);
237 242
238 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); 243 DISALLOW_COPY_AND_ASSIGN(AutofillAgent);
239 }; 244 };
240 245
241 } // namespace autofill 246 } // namespace autofill
242 247
243 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ 248 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698