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

Unified Diff: chrome/browser/password_manager/password_manager.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: chrome/browser/password_manager/password_manager.h
diff --git a/chrome/browser/password_manager/password_manager.h b/chrome/browser/password_manager/password_manager.h
index d65d1c7d449d5c2d7ca9280649eca73ad3e28a67..2632288ea9c661e7de59018f42b643f88bb4b247 100644
--- a/chrome/browser/password_manager/password_manager.h
+++ b/chrome/browser/password_manager/password_manager.h
@@ -7,6 +7,7 @@
#include <vector>
+#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/observer_list.h"
@@ -42,6 +43,14 @@ class PasswordManager : public LoginModel,
PasswordManagerDelegate* delegate);
virtual ~PasswordManager();
+ typedef base::Callback<void(const content::PasswordForm&)>
+ PasswordSubmittedCallback;
+
+ // There is no corresponding remove function as currently all of the
+ // owners of these callbacks have sufficient lifetimes so that the callbacks
+ // should always be valid when called.
+ void AddSubmissionCallback(const PasswordSubmittedCallback& callback);
+
// Is saving new data for password autofill enabled for the current profile?
// For example, saving new data is disabled in Incognito mode, whereas filling
// data is not.
@@ -69,7 +78,7 @@ class PasswordManager : public LoginModel,
void ProvisionallySavePassword(const content::PasswordForm& form);
// content::WebContentsObserver overrides.
- virtual void DidNavigateAnyFrame(
+ virtual void DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
@@ -86,6 +95,10 @@ class PasswordManager : public LoginModel,
PasswordManager(content::WebContents* web_contents,
PasswordManagerDelegate* delegate);
+ // Handle notification that a password form was submitted.
+ virtual void OnPasswordFormSubmitted(
+ const content::PasswordForm& password_form);
+
private:
friend class content::WebContentsUserData<PasswordManager>;
@@ -142,6 +155,9 @@ class PasswordManager : public LoginModel,
// notification in const member functions.
mutable ObserverList<LoginModelObserver> observers_;
+ // Callbacks to be notified when a password form has been submitted.
+ std::vector<PasswordSubmittedCallback> submission_callbacks_;
+
DISALLOW_COPY_AND_ASSIGN(PasswordManager);
};
« no previous file with comments | « chrome/browser/password_manager/password_form_manager_unittest.cc ('k') | chrome/browser/password_manager/password_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698