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

Unified Diff: components/autofill/content/renderer/password_autofill_agent.h

Issue 19705013: [password autofill] Remove references to PasswordForm from RenderViewImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/content/renderer/password_autofill_agent.h
diff --git a/components/autofill/content/renderer/password_autofill_agent.h b/components/autofill/content/renderer/password_autofill_agent.h
index 30fef628c158ce175eb75aedc5f115bb06c11fe9..f151920f2887b32ad8ec8972795bbb571ca69b3f 100644
--- a/components/autofill/content/renderer/password_autofill_agent.h
+++ b/components/autofill/content/renderer/password_autofill_agent.h
@@ -8,6 +8,7 @@
#include <map>
#include <vector>
+#include "base/memory/linked_ptr.h"
#include "base/memory/weak_ptr.h"
#include "components/autofill/core/common/password_form_fill_data.h"
#include "content/public/renderer/render_view_observer.h"
@@ -67,14 +68,21 @@ class PasswordAutofillAgent : public content::RenderViewObserver {
PasswordInfo() : backspace_pressed_last(false) {}
};
typedef std::map<WebKit::WebElement, PasswordInfo> LoginToPasswordInfoMap;
+ typedef std::map<WebKit::WebFrame*,
+ linked_ptr<content::PasswordForm> > FrameToPasswordFormMap;
// RenderViewObserver:
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+ virtual void DidStartProvisionalLoad(WebKit::WebFrame* frame) OVERRIDE;
virtual void DidStartLoading() OVERRIDE;
virtual void DidFinishDocumentLoad(WebKit::WebFrame* frame) OVERRIDE;
virtual void DidFinishLoad(WebKit::WebFrame* frame) OVERRIDE;
virtual void FrameDetached(WebKit::WebFrame* frame) OVERRIDE;
virtual void FrameWillClose(WebKit::WebFrame* frame) OVERRIDE;
+ virtual void WillSendSubmitEvent(WebKit::WebFrame* frame,
+ const WebKit::WebFormElement& form) OVERRIDE;
+ virtual void WillSubmitForm(WebKit::WebFrame* frame,
+ const WebKit::WebFormElement& form) OVERRIDE;
// RenderView IPC handlers:
void OnFillPasswordForm(const PasswordFormFillData& form_data);
@@ -123,6 +131,10 @@ class PasswordAutofillAgent : public content::RenderViewObserver {
// Pointer to the WebView. Used to access page scale factor.
WebKit::WebView* web_view_;
+ // Set if the user might be submitting a password form on the current page,
+ // but the submit may still fail (i.e. doesn't pass JavaScript validation).
+ FrameToPasswordFormMap provisionally_saved_forms_;
+
base::WeakPtrFactory<PasswordAutofillAgent> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent);
« no previous file with comments | « chrome/test/data/password/password_xhr_submit.html ('k') | components/autofill/content/renderer/password_autofill_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698