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

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

Issue 241193002: Password autofill: Check for user gesture switches to new Blink backend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OVERRIDE removed test enabled Created 6 years, 8 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 | Annotate | Revision Log
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_PASSWORD_AUTOFILL_AGENT_H_ 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // cleared when the selection changes. However, this method returns 46 // cleared when the selection changes. However, this method returns
47 // true when |node| is fillable by password Autofill. 47 // true when |node| is fillable by password Autofill.
48 bool DidClearAutofillSelection(const blink::WebNode& node); 48 bool DidClearAutofillSelection(const blink::WebNode& node);
49 // Shows an Autofill popup with username suggestions for |element|. 49 // Shows an Autofill popup with username suggestions for |element|.
50 // Returns true if any suggestions were shown, false otherwise. 50 // Returns true if any suggestions were shown, false otherwise.
51 bool ShowSuggestions(const blink::WebInputElement& element); 51 bool ShowSuggestions(const blink::WebInputElement& element);
52 52
53 // Called when new form controls are inserted. 53 // Called when new form controls are inserted.
54 void OnDynamicFormsSeen(blink::WebFrame* frame); 54 void OnDynamicFormsSeen(blink::WebFrame* frame);
55 55
56 // Called when the user first interacts with the page after a load. This is a
57 // signal to make autofilled values of password input elements accessible to
58 // JavaScript.
59 void FirstUserGestureObserved();
60
56 protected: 61 protected:
57 virtual bool OriginCanAccessPasswordManager( 62 virtual bool OriginCanAccessPasswordManager(
58 const blink::WebSecurityOrigin& origin); 63 const blink::WebSecurityOrigin& origin);
59 64
60 private: 65 private:
61 friend class PasswordAutofillAgentTest; 66 friend class PasswordAutofillAgentTest;
62 67
63 enum OtherPossibleUsernamesUsage { 68 enum OtherPossibleUsernamesUsage {
64 NOTHING_TO_AUTOFILL, 69 NOTHING_TO_AUTOFILL,
65 OTHER_POSSIBLE_USERNAMES_ABSENT, 70 OTHER_POSSIBLE_USERNAMES_ABSENT,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 virtual void DidStartProvisionalLoad(blink::WebLocalFrame* frame) OVERRIDE; 118 virtual void DidStartProvisionalLoad(blink::WebLocalFrame* frame) OVERRIDE;
114 virtual void DidStartLoading() OVERRIDE; 119 virtual void DidStartLoading() OVERRIDE;
115 virtual void DidFinishDocumentLoad(blink::WebLocalFrame* frame) OVERRIDE; 120 virtual void DidFinishDocumentLoad(blink::WebLocalFrame* frame) OVERRIDE;
116 virtual void DidFinishLoad(blink::WebLocalFrame* frame) OVERRIDE; 121 virtual void DidFinishLoad(blink::WebLocalFrame* frame) OVERRIDE;
117 virtual void FrameDetached(blink::WebFrame* frame) OVERRIDE; 122 virtual void FrameDetached(blink::WebFrame* frame) OVERRIDE;
118 virtual void FrameWillClose(blink::WebFrame* frame) OVERRIDE; 123 virtual void FrameWillClose(blink::WebFrame* frame) OVERRIDE;
119 virtual void WillSendSubmitEvent(blink::WebLocalFrame* frame, 124 virtual void WillSendSubmitEvent(blink::WebLocalFrame* frame,
120 const blink::WebFormElement& form) OVERRIDE; 125 const blink::WebFormElement& form) OVERRIDE;
121 virtual void WillSubmitForm(blink::WebLocalFrame* frame, 126 virtual void WillSubmitForm(blink::WebLocalFrame* frame,
122 const blink::WebFormElement& form) OVERRIDE; 127 const blink::WebFormElement& form) OVERRIDE;
123 virtual void WillProcessUserGesture() OVERRIDE;
124 128
125 // RenderView IPC handlers: 129 // RenderView IPC handlers:
126 void OnFillPasswordForm(const PasswordFormFillData& form_data); 130 void OnFillPasswordForm(const PasswordFormFillData& form_data);
127 131
128 // Scans the given frame for password forms and sends them up to the browser. 132 // Scans the given frame for password forms and sends them up to the browser.
129 // If |only_visible| is true, only forms visible in the layout are sent. 133 // If |only_visible| is true, only forms visible in the layout are sent.
130 void SendPasswordForms(blink::WebFrame* frame, bool only_visible); 134 void SendPasswordForms(blink::WebFrame* frame, bool only_visible);
131 135
132 void GetSuggestions(const PasswordFormFillData& fill_data, 136 void GetSuggestions(const PasswordFormFillData& fill_data,
133 const base::string16& input, 137 const base::string16& input,
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 PasswordValueGatekeeper gatekeeper_; 194 PasswordValueGatekeeper gatekeeper_;
191 195
192 base::WeakPtrFactory<PasswordAutofillAgent> weak_ptr_factory_; 196 base::WeakPtrFactory<PasswordAutofillAgent> weak_ptr_factory_;
193 197
194 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); 198 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent);
195 }; 199 };
196 200
197 } // namespace autofill 201 } // namespace autofill
198 202
199 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ 203 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698