summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/password_manager/password_manager.cc7
-rw-r--r--chrome/browser/password_manager/password_manager.h3
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc12
-rw-r--r--chrome/browser/tab_contents/tab_contents.h4
-rw-r--r--chrome/browser/tab_contents/web_navigation_observer.h4
-rw-r--r--chrome/browser/tab_contents_wrapper.cc27
-rw-r--r--chrome/browser/tab_contents_wrapper.h6
7 files changed, 9 insertions, 54 deletions
diff --git a/chrome/browser/password_manager/password_manager.cc b/chrome/browser/password_manager/password_manager.cc
index b5762b8..3e7e5fd 100644
--- a/chrome/browser/password_manager/password_manager.cc
+++ b/chrome/browser/password_manager/password_manager.cc
@@ -151,13 +151,6 @@ void PasswordManager::DidStopLoading() {
}
}
-void PasswordManager::DidNavigateAnyFramePostCommit(
- const NavigationController::LoadCommittedDetails& details,
- const ViewHostMsg_FrameNavigate_Params& params) {
- if (params.password_form.origin.is_valid())
- ProvisionallySavePassword(params.password_form);
-}
-
void PasswordManager::PasswordFormsFound(
const std::vector<PasswordForm>& forms) {
if (!delegate_->GetProfileForPasswordManager())
diff --git a/chrome/browser/password_manager/password_manager.h b/chrome/browser/password_manager/password_manager.h
index 0ebb451..79ea5c9 100644
--- a/chrome/browser/password_manager/password_manager.h
+++ b/chrome/browser/password_manager/password_manager.h
@@ -50,9 +50,6 @@ class PasswordManager : public LoginModel,
// WebNavigationObserver overrides.
virtual void DidStopLoading();
- virtual void DidNavigateAnyFramePostCommit(
- const NavigationController::LoadCommittedDetails& details,
- const ViewHostMsg_FrameNavigate_Params& params);
virtual void PasswordFormsFound(
const std::vector<webkit_glue::PasswordForm>& forms);
virtual void PasswordFormsVisible(
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 9029bd0..cfa1ac0 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -2790,18 +2790,6 @@ void TabContents::ShowModalHTMLDialog(const GURL& url, int width, int height,
}
}
-void TabContents::PasswordFormsFound(
- const std::vector<webkit_glue::PasswordForm>& forms) {
- FOR_EACH_OBSERVER(WebNavigationObserver, web_navigation_observers_,
- PasswordFormsFound(forms));
-}
-
-void TabContents::PasswordFormsVisible(
- const std::vector<webkit_glue::PasswordForm>& visible_forms) {
- FOR_EACH_OBSERVER(WebNavigationObserver, web_navigation_observers_,
- PasswordFormsVisible(visible_forms));
-}
-
// Checks to see if we should generate a keyword based on the OSDD, and if
// necessary uses TemplateURLFetcher to download the OSDD and create a keyword.
void TabContents::PageHasOSDD(
diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h
index c3d6556..2a69a14 100644
--- a/chrome/browser/tab_contents/tab_contents.h
+++ b/chrome/browser/tab_contents/tab_contents.h
@@ -977,10 +977,6 @@ class TabContents : public PageNavigator,
virtual void ShowModalHTMLDialog(const GURL& url, int width, int height,
const std::string& json_arguments,
IPC::Message* reply_msg);
- virtual void PasswordFormsFound(
- const std::vector<webkit_glue::PasswordForm>& forms);
- virtual void PasswordFormsVisible(
- const std::vector<webkit_glue::PasswordForm>& visible_forms);
virtual void PageHasOSDD(RenderViewHost* render_view_host,
int32 page_id,
const GURL& url,
diff --git a/chrome/browser/tab_contents/web_navigation_observer.h b/chrome/browser/tab_contents/web_navigation_observer.h
index 40981b9..b42e658 100644
--- a/chrome/browser/tab_contents/web_navigation_observer.h
+++ b/chrome/browser/tab_contents/web_navigation_observer.h
@@ -32,9 +32,7 @@ class WebNavigationObserver {
virtual void DidStartLoading() { }
virtual void DidStopLoading() { }
- // TODO(beng): These should move from here once PasswordManager is able to
- // establish its own private communication protocol to the
- // renderer.
+ // TODO(pinkerton): Not sure the best place for these.
virtual void PasswordFormsFound(
const std::vector<webkit_glue::PasswordForm>& forms) { }
virtual void PasswordFormsVisible(
diff --git a/chrome/browser/tab_contents_wrapper.cc b/chrome/browser/tab_contents_wrapper.cc
index a7f52f1..d1f0a2fb 100644
--- a/chrome/browser/tab_contents_wrapper.cc
+++ b/chrome/browser/tab_contents_wrapper.cc
@@ -9,8 +9,6 @@
#include "chrome/browser/password_manager_delegate_impl.h"
#include "chrome/browser/tab_contents/tab_contents.h"
-////////////////////////////////////////////////////////////////////////////////
-// TabContentsWrapper, public:
TabContentsWrapper::TabContentsWrapper(TabContents* contents)
: tab_contents_(contents) {
@@ -18,9 +16,6 @@ TabContentsWrapper::TabContentsWrapper(TabContents* contents)
// Stash this in the property bag so it can be retrieved without having to
// go to a Browser.
property_accessor()->SetProperty(contents->property_bag(), this);
-
- // Needed so that we initialize the password manager on first navigation.
- tab_contents()->AddNavigationObserver(this);
}
TabContentsWrapper::~TabContentsWrapper() {
@@ -32,15 +27,6 @@ PropertyAccessor<TabContentsWrapper*>* TabContentsWrapper::property_accessor() {
return Singleton< PropertyAccessor<TabContentsWrapper*> >::get();
}
-TabContentsWrapper* TabContentsWrapper::Clone() {
- TabContents* new_contents = tab_contents()->Clone();
- TabContentsWrapper* new_wrapper = new TabContentsWrapper(new_contents);
- // Instantiate the passowrd manager if it has been instantiated here.
- if (password_manager_.get())
- new_wrapper->GetPasswordManager();
- return new_wrapper;
-}
-
PasswordManager* TabContentsWrapper::GetPasswordManager() {
if (!password_manager_.get()) {
// Create the delegate then create the manager.
@@ -54,10 +40,11 @@ PasswordManager* TabContentsWrapper::GetPasswordManager() {
return password_manager_.get();
}
-////////////////////////////////////////////////////////////////////////////////
-// TabContentsWrapper, WebNavigationObserver implementation:
-
-void TabContentsWrapper::NavigateToPendingEntry() {
- GetPasswordManager();
- tab_contents()->RemoveNavigationObserver(this);
+TabContentsWrapper* TabContentsWrapper::Clone() {
+ TabContents* new_contents = tab_contents()->Clone();
+ TabContentsWrapper* new_wrapper = new TabContentsWrapper(new_contents);
+ // Instantiate the passowrd manager if it has been instantiated here.
+ if (password_manager_.get())
+ new_wrapper->GetPasswordManager();
+ return new_wrapper;
}
diff --git a/chrome/browser/tab_contents_wrapper.h b/chrome/browser/tab_contents_wrapper.h
index 4723da9..abed5f5 100644
--- a/chrome/browser/tab_contents_wrapper.h
+++ b/chrome/browser/tab_contents_wrapper.h
@@ -8,7 +8,6 @@
#include "base/scoped_ptr.h"
#include "chrome/browser/tab_contents/tab_contents.h"
-#include "chrome/browser/tab_contents/web_navigation_observer.h"
class Extension;
class NavigationController;
@@ -22,7 +21,7 @@ class TabContentsDelegate;
// TODO(pinkerton): Eventually, this class will become TabContents as far as
// the browser front-end is concerned, and the current TabContents will be
// renamed to something like WebPage or WebView (ben's suggestions).
-class TabContentsWrapper : public WebNavigationObserver {
+class TabContentsWrapper {
public:
// Takes ownership of |contents|, which must be heap-allocated (as it lives
// in a scoped_ptr) and can not be NULL.
@@ -61,9 +60,6 @@ class TabContentsWrapper : public WebNavigationObserver {
// Returns the PasswordManager, creating it if necessary.
PasswordManager* GetPasswordManager();
- // WebNavigationObserver overrides:
- virtual void NavigateToPendingEntry();
-
private:
// PasswordManager and its delegate, lazily created. The delegate must
// outlive the manager, per documentation in password_manager.h.