summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-28 02:30:17 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-28 02:30:17 +0000
commit585b303692879dc441661b26d2c02a8f4e9d52d3 (patch)
tree32bd9142637d76033f7d65e9a3a89198bd273796
parent5d93dfabd3545d4925082fd2fe89b5074737ab6a (diff)
downloadchromium_src-585b303692879dc441661b26d2c02a8f4e9d52d3.zip
chromium_src-585b303692879dc441661b26d2c02a8f4e9d52d3.tar.gz
chromium_src-585b303692879dc441661b26d2c02a8f4e9d52d3.tar.bz2
Rename WebNavigationObserver to TabContentsObserver.
Review URL: http://codereview.chromium.org/6404001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72916 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/autocomplete_history_manager.h6
-rw-r--r--chrome/browser/autofill/autofill_manager.h6
-rw-r--r--chrome/browser/desktop_notification_handler.h6
-rw-r--r--chrome/browser/download/save_package.h6
-rw-r--r--chrome/browser/fav_icon_helper.h6
-rw-r--r--chrome/browser/password_manager/password_manager.h6
-rw-r--r--chrome/browser/prerender/prerender_plt_recorder.h6
-rw-r--r--chrome/browser/printing/print_view_manager.h6
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc44
-rw-r--r--chrome/browser/tab_contents/tab_contents.h12
-rw-r--r--chrome/browser/tab_contents/tab_contents_observer.h (renamed from chrome/browser/tab_contents/web_navigation_observer.h)10
-rw-r--r--chrome/browser/tab_contents/web_navigation_observer.cc9
-rw-r--r--chrome/browser/ui/tab_contents/tab_contents_wrapper.cc10
-rw-r--r--chrome/browser/ui/tab_contents/tab_contents_wrapper.h6
-rw-r--r--chrome/chrome_browser.gypi3
15 files changed, 64 insertions, 78 deletions
diff --git a/chrome/browser/autocomplete_history_manager.h b/chrome/browser/autocomplete_history_manager.h
index 516fb0c..fd4387f 100644
--- a/chrome/browser/autocomplete_history_manager.h
+++ b/chrome/browser/autocomplete_history_manager.h
@@ -9,7 +9,7 @@
#include <vector>
#include "chrome/browser/prefs/pref_member.h"
-#include "chrome/browser/tab_contents/web_navigation_observer.h"
+#include "chrome/browser/tab_contents/tab_contents_observer.h"
#include "chrome/browser/webdata/web_data_service.h"
namespace webkit_glue {
@@ -21,13 +21,13 @@ class TabContents;
// Per-tab Autocomplete history manager. Handles receiving form data from the
// renderer and the storing and retrieving of form data through WebDataService.
-class AutocompleteHistoryManager : public WebNavigationObserver,
+class AutocompleteHistoryManager : public TabContentsObserver,
public WebDataServiceConsumer {
public:
explicit AutocompleteHistoryManager(TabContents* tab_contents);
virtual ~AutocompleteHistoryManager();
- // WebNavigationObserver implementation.
+ // TabContentsObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message);
// WebDataServiceConsumer implementation.
diff --git a/chrome/browser/autofill/autofill_manager.h b/chrome/browser/autofill/autofill_manager.h
index bad5c36..ef9bfbe 100644
--- a/chrome/browser/autofill/autofill_manager.h
+++ b/chrome/browser/autofill/autofill_manager.h
@@ -16,7 +16,7 @@
#include "chrome/browser/autofill/autofill_dialog.h"
#include "chrome/browser/autofill/autofill_download.h"
#include "chrome/browser/autofill/personal_data_manager.h"
-#include "chrome/browser/tab_contents/web_navigation_observer.h"
+#include "chrome/browser/tab_contents/tab_contents_observer.h"
class AutoFillCCInfoBarDelegate;
class AutoFillProfile;
@@ -33,7 +33,7 @@ class FormField;
// Manages saving and restoring the user's personal information entered into web
// forms.
-class AutoFillManager : public WebNavigationObserver,
+class AutoFillManager : public TabContentsObserver,
public AutoFillDownloadManager::Observer {
public:
explicit AutoFillManager(TabContents* tab_contents);
@@ -48,7 +48,7 @@ class AutoFillManager : public WebNavigationObserver,
// Returns the TabContents hosting this AutoFillManager.
TabContents* tab_contents() const { return tab_contents_; }
- // WebNavigationObserver implementation.
+ // TabContentsObserver implementation.
virtual void DidNavigateMainFramePostCommit(
const NavigationController::LoadCommittedDetails& details,
const ViewHostMsg_FrameNavigate_Params& params);
diff --git a/chrome/browser/desktop_notification_handler.h b/chrome/browser/desktop_notification_handler.h
index 121f3d4..d8c37cf 100644
--- a/chrome/browser/desktop_notification_handler.h
+++ b/chrome/browser/desktop_notification_handler.h
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_DESKTOP_NOTIFICATION_HANDLER_H_
#pragma once
-#include "chrome/browser/tab_contents/web_navigation_observer.h"
+#include "chrome/browser/tab_contents/tab_contents_observer.h"
#include "ipc/ipc_message.h"
struct ViewHostMsg_ShowNotification_Params;
@@ -14,13 +14,13 @@ class RenderProcessHost;
// Per-tab Desktop notification handler. Handles desktop notification IPCs
// coming in from the renderer.
-class DesktopNotificationHandler : public WebNavigationObserver {
+class DesktopNotificationHandler : public TabContentsObserver {
public:
explicit DesktopNotificationHandler(TabContents* tab_contents,
RenderProcessHost* process);
virtual ~DesktopNotificationHandler() {}
- // WebNavigationObserver implementation.
+ // TabContentsObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message);
RenderProcessHost* GetRenderProcessHost();
diff --git a/chrome/browser/download/save_package.h b/chrome/browser/download/save_package.h
index 62c1c1d..d6a98e9 100644
--- a/chrome/browser/download/save_package.h
+++ b/chrome/browser/download/save_package.h
@@ -17,7 +17,7 @@
#include "base/ref_counted.h"
#include "base/task.h"
#include "chrome/browser/shell_dialogs.h"
-#include "chrome/browser/tab_contents/web_navigation_observer.h"
+#include "chrome/browser/tab_contents/tab_contents_observer.h"
#include "googleurl/src/gurl.h"
class SaveFileManager;
@@ -54,7 +54,7 @@ struct SavePackageParam;
// by the SavePackage. SaveItems are created when a user initiates a page
// saving job, and exist for the duration of one tab's life time.
class SavePackage : public base::RefCountedThreadSafe<SavePackage>,
- public WebNavigationObserver,
+ public TabContentsObserver,
public SelectFileDialog::Listener {
public:
enum SavePackageType {
@@ -163,7 +163,7 @@ class SavePackage : public base::RefCountedThreadSafe<SavePackage>,
void SaveNextFile(bool process_all_remainder_items);
void DoSavingProcess();
- // WebNavigationObserver implementation.
+ // TabContentsObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message);
// Create a file name based on the response from the server.
diff --git a/chrome/browser/fav_icon_helper.h b/chrome/browser/fav_icon_helper.h
index f0706bd..494d46a 100644
--- a/chrome/browser/fav_icon_helper.h
+++ b/chrome/browser/fav_icon_helper.h
@@ -13,7 +13,7 @@
#include "base/ref_counted.h"
#include "chrome/browser/cancelable_request.h"
#include "chrome/browser/favicon_service.h"
-#include "chrome/browser/tab_contents/web_navigation_observer.h"
+#include "chrome/browser/tab_contents/tab_contents_observer.h"
#include "chrome/common/ref_counted_util.h"
#include "googleurl/src/gurl.h"
@@ -65,7 +65,7 @@ class TabContents;
// at which point we update the favicon of the NavigationEntry and notify
// the database to save the favicon.
-class FavIconHelper : public WebNavigationObserver {
+class FavIconHelper : public TabContentsObserver {
public:
explicit FavIconHelper(TabContents* tab_contents);
virtual ~FavIconHelper();
@@ -99,7 +99,7 @@ class FavIconHelper : public WebNavigationObserver {
ImageDownloadCallback* callback;
};
- // WebNavigationObserver implementation.
+ // TabContentsObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message);
void OnDidDownloadFavIcon(int id,
diff --git a/chrome/browser/password_manager/password_manager.h b/chrome/browser/password_manager/password_manager.h
index a09b9b9..547f1f3 100644
--- a/chrome/browser/password_manager/password_manager.h
+++ b/chrome/browser/password_manager/password_manager.h
@@ -10,7 +10,7 @@
#include "base/stl_util-inl.h"
#include "chrome/browser/password_manager/password_form_manager.h"
#include "chrome/browser/prefs/pref_member.h"
-#include "chrome/browser/tab_contents/web_navigation_observer.h"
+#include "chrome/browser/tab_contents/tab_contents_observer.h"
#include "chrome/browser/ui/login/login_model.h"
#include "webkit/glue/password_form.h"
#include "webkit/glue/password_form_dom_manager.h"
@@ -25,7 +25,7 @@ class PrefService;
// database through the WebDataService. The PasswordManager is a LoginModel
// for purposes of supporting HTTP authentication dialogs.
class PasswordManager : public LoginModel,
- public WebNavigationObserver {
+ public TabContentsObserver {
public:
static void RegisterUserPrefs(PrefService* prefs);
@@ -48,7 +48,7 @@ class PasswordManager : public LoginModel,
// of 2 (see SavePassword).
void ProvisionallySavePassword(webkit_glue::PasswordForm form);
- // WebNavigationObserver overrides.
+ // TabContentsObserver overrides.
virtual void DidStopLoading();
virtual void DidNavigateAnyFramePostCommit(
const NavigationController::LoadCommittedDetails& details,
diff --git a/chrome/browser/prerender/prerender_plt_recorder.h b/chrome/browser/prerender/prerender_plt_recorder.h
index bf1e94e..206fdf1 100644
--- a/chrome/browser/prerender/prerender_plt_recorder.h
+++ b/chrome/browser/prerender/prerender_plt_recorder.h
@@ -11,7 +11,7 @@
#include "base/scoped_ptr.h"
#include "base/time.h"
-#include "chrome/browser/tab_contents/web_navigation_observer.h"
+#include "chrome/browser/tab_contents/tab_contents_observer.h"
#include "googleurl/src/gurl.h"
class PrerenderContents;
@@ -20,12 +20,12 @@ class TabContents;
// PrerenderPLTRecorder is responsible for recording perceived pageload times
// to compare PLT's with prerendering enabled and disabled.
-class PrerenderPLTRecorder : public WebNavigationObserver {
+class PrerenderPLTRecorder : public TabContentsObserver {
public:
explicit PrerenderPLTRecorder(TabContents* tab_contents);
virtual ~PrerenderPLTRecorder();
- // WebNavigationObserver implementation.
+ // TabContentsObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message);
// Message handler.
diff --git a/chrome/browser/printing/print_view_manager.h b/chrome/browser/printing/print_view_manager.h
index 2fcf4d1..24452d0 100644
--- a/chrome/browser/printing/print_view_manager.h
+++ b/chrome/browser/printing/print_view_manager.h
@@ -8,7 +8,7 @@
#include "base/ref_counted.h"
#include "base/string16.h"
-#include "chrome/browser/tab_contents/web_navigation_observer.h"
+#include "chrome/browser/tab_contents/tab_contents_observer.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
#include "printing/printed_pages_source.h"
@@ -27,7 +27,7 @@ class PrintJobWorkerOwner;
// delegates a few printing related commands to this instance.
class PrintViewManager : public NotificationObserver,
public PrintedPagesSource,
- public WebNavigationObserver {
+ public TabContentsObserver {
public:
explicit PrintViewManager(TabContents& owner);
virtual ~PrintViewManager();
@@ -48,7 +48,7 @@ class PrintViewManager : public NotificationObserver,
const NotificationSource& source,
const NotificationDetails& details);
- // WebNavigationObserver implementation.
+ // TabContentsObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message);
private:
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index a722215..2664701 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -74,10 +74,10 @@
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/browser/tab_contents/provisional_load_details.h"
#include "chrome/browser/tab_contents/tab_contents_delegate.h"
+#include "chrome/browser/tab_contents/tab_contents_observer.h"
#include "chrome/browser/tab_contents/tab_contents_ssl_helper.h"
#include "chrome/browser/tab_contents/tab_contents_view.h"
#include "chrome/browser/tab_contents/thumbnail_generator.h"
-#include "chrome/browser/tab_contents/web_navigation_observer.h"
#include "chrome/browser/translate/page_translated_details.h"
#include "chrome/browser/ui/app_modal_dialogs/message_box_handler.h"
#include "chrome/browser/ui/find_bar/find_bar_state.h"
@@ -589,16 +589,16 @@ TabContents::TabContents(Profile* profile,
omnibox_search_hint_.reset(new OmniboxSearchHint(this));
autofill_manager_.reset(new AutoFillManager(this));
- AddNavigationObserver(autofill_manager_.get());
+ AddObserver(autofill_manager_.get());
autocomplete_history_manager_.reset(new AutocompleteHistoryManager(this));
- AddNavigationObserver(autocomplete_history_manager_.get());
+ AddObserver(autocomplete_history_manager_.get());
prerender_plt_recorder_.reset(new PrerenderPLTRecorder(this));
- AddNavigationObserver(prerender_plt_recorder_.get());
- AddNavigationObserver(&fav_icon_helper_);
- AddNavigationObserver(printing_.get());
+ AddObserver(prerender_plt_recorder_.get());
+ AddObserver(&fav_icon_helper_);
+ AddObserver(printing_.get());
desktop_notification_handler_.reset(
new DesktopNotificationHandler(this, GetRenderProcessHost()));
- AddNavigationObserver(desktop_notification_handler_.get());
+ AddObserver(desktop_notification_handler_.get());
}
TabContents::~TabContents() {
@@ -718,9 +718,8 @@ void TabContents::RegisterUserPrefs(PrefService* prefs) {
}
bool TabContents::OnMessageReceived(const IPC::Message& message) {
- ObserverListBase<WebNavigationObserver>::Iterator it(
- web_navigation_observers_);
- WebNavigationObserver* observer;
+ ObserverListBase<TabContentsObserver>::Iterator it(observers_);
+ TabContentsObserver* observer;
while ((observer = it.GetNext()) != NULL)
if (observer->OnMessageReceived(message))
return true;
@@ -979,12 +978,12 @@ string16 TabContents::GetStatusText() const {
return string16();
}
-void TabContents::AddNavigationObserver(WebNavigationObserver* observer) {
- web_navigation_observers_.AddObserver(observer);
+void TabContents::AddObserver(TabContentsObserver* observer) {
+ observers_.AddObserver(observer);
}
-void TabContents::RemoveNavigationObserver(WebNavigationObserver* observer) {
- web_navigation_observers_.RemoveObserver(observer);
+void TabContents::RemoveObserver(TabContentsObserver* observer) {
+ observers_.RemoveObserver(observer);
}
void TabContents::SetIsCrashed(base::TerminationStatus status, int error_code) {
@@ -1149,8 +1148,7 @@ bool TabContents::NavigateToEntry(
}
// Notify observers about navigation.
- FOR_EACH_OBSERVER(WebNavigationObserver, web_navigation_observers_,
- NavigateToPendingEntry());
+ FOR_EACH_OBSERVER(TabContentsObserver, observers_, NavigateToPendingEntry());
if (reload_type != NavigationController::NO_RELOAD &&
!profile()->IsOffTheRecord()) {
@@ -1602,9 +1600,9 @@ bool TabContents::SavePage(const FilePath& main_file, const FilePath& dir_path,
void TabContents::SetSavePackage(SavePackage* save_package) {
if (save_package_.get())
- RemoveNavigationObserver(save_package_.get());
+ RemoveObserver(save_package_.get());
save_package_ = save_package;
- AddNavigationObserver(save_package);
+ AddObserver(save_package);
}
void TabContents::EmailPageLocation() {
@@ -2145,7 +2143,7 @@ void TabContents::DidNavigateMainFramePostCommit(
UpdateStarredStateForCurrentURL();
// Notify observers about navigation.
- FOR_EACH_OBSERVER(WebNavigationObserver, web_navigation_observers_,
+ FOR_EACH_OBSERVER(TabContentsObserver, observers_,
DidNavigateMainFramePostCommit(details, params));
}
@@ -2159,7 +2157,7 @@ void TabContents::DidNavigateAnyFramePostCommit(
suppress_javascript_messages_ = false;
// Notify observers about navigation.
- FOR_EACH_OBSERVER(WebNavigationObserver, web_navigation_observers_,
+ FOR_EACH_OBSERVER(TabContentsObserver, observers_,
DidNavigateAnyFramePostCommit(details, params));
// Let the LanguageState clear its state.
@@ -2919,8 +2917,7 @@ void TabContents::DidStartLoading() {
}
// Notify observers about navigation.
- FOR_EACH_OBSERVER(WebNavigationObserver, web_navigation_observers_,
- DidStartLoading());
+ FOR_EACH_OBSERVER(TabContentsObserver, observers_, DidStartLoading());
}
void TabContents::DidStopLoading() {
@@ -2943,8 +2940,7 @@ void TabContents::DidStopLoading() {
SetIsLoading(false, details.get());
// Notify observers about navigation.
- FOR_EACH_OBSERVER(WebNavigationObserver, web_navigation_observers_,
- DidStopLoading());
+ FOR_EACH_OBSERVER(TabContentsObserver, observers_, DidStopLoading());
}
void TabContents::DidChangeLoadProgress(double progress) {
diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h
index 880a390..8a71ab0 100644
--- a/chrome/browser/tab_contents/tab_contents.h
+++ b/chrome/browser/tab_contents/tab_contents.h
@@ -59,6 +59,7 @@ class AutocompleteHistoryManager;
class AutoFillManager;
class BlockedContentContainer;
class DOMUI;
+class DesktopNotificationHandler;
class DownloadItem;
class Extension;
class FileSelectHelper;
@@ -69,22 +70,21 @@ class PluginInstallerInfoBarDelegate;
class Profile;
class PrerenderManager;
class PrerenderPLTRecorder;
-struct RendererPreferences;
class RenderViewHost;
class SessionStorageNamespace;
class SiteInstance;
class SkBitmap;
class TabContents;
class TabContentsDelegate;
+class TabContentsObserver;
class TabContentsSSLHelper;
class TabContentsView;
class URLPattern;
+struct RendererPreferences;
struct ThumbnailScore;
struct ViewHostMsg_DomMessage_Params;
struct ViewHostMsg_FrameNavigate_Params;
-class WebNavigationObserver;
struct WebPreferences;
-class DesktopNotificationHandler;
// Describes what goes in the main content area of a tab. TabContents is
// the only type of TabContents, and these should be merged together.
@@ -260,8 +260,8 @@ class TabContents : public PageNavigator,
// removing multiple times has no effect. The order in which notifications
// are sent to observers is undefined. Clients must be sure to remove the
// observer before they go away.
- void AddNavigationObserver(WebNavigationObserver* observer);
- void RemoveNavigationObserver(WebNavigationObserver* observer);
+ void AddObserver(TabContentsObserver* observer);
+ void RemoveObserver(TabContentsObserver* observer);
// Return whether this tab contents is loading a resource.
bool is_loading() const { return is_loading_; }
@@ -1341,7 +1341,7 @@ class TabContents : public PageNavigator,
bool temporary_zoom_settings_;
// A list of observers notified when page state changes. Weak references.
- ObserverList<WebNavigationObserver> web_navigation_observers_;
+ ObserverList<TabContentsObserver> observers_;
// Content restrictions, used to disable print/copy etc based on content's
// (full-page plugins for now only) permissions.
diff --git a/chrome/browser/tab_contents/web_navigation_observer.h b/chrome/browser/tab_contents/tab_contents_observer.h
index 97f8411..77f2f5c 100644
--- a/chrome/browser/tab_contents/web_navigation_observer.h
+++ b/chrome/browser/tab_contents/tab_contents_observer.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_TAB_CONTENTS_WEB_NAVIGATION_OBSERVER_H_
-#define CHROME_BROWSER_TAB_CONTENTS_WEB_NAVIGATION_OBSERVER_H_
+#ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_OBSERVER_H_
+#define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_OBSERVER_H_
#include "chrome/browser/tab_contents/navigation_controller.h"
#include "ipc/ipc_channel.h"
@@ -12,7 +12,7 @@ struct ViewHostMsg_FrameNavigate_Params;
// An observer API implemented by classes which are interested in various page
// load events from TabContents. They also get a chance to filter IPC messages.
-class WebNavigationObserver : public IPC::Channel::Listener {
+class TabContentsObserver : public IPC::Channel::Listener {
public:
virtual void NavigateToPendingEntry() { }
@@ -27,7 +27,7 @@ class WebNavigationObserver : public IPC::Channel::Listener {
virtual void DidStopLoading() { }
// IPC::Channel::Listener implementation.
- virtual bool OnMessageReceived(const IPC::Message& message);
+ virtual bool OnMessageReceived(const IPC::Message& message) { return false; }
#if 0
// For unifying with delegate...
@@ -45,4 +45,4 @@ class WebNavigationObserver : public IPC::Channel::Listener {
#endif
};
-#endif // CHROME_BROWSER_TAB_CONTENTS_WEB_NAVIGATION_OBSERVER_H_
+#endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_OBSERVER_H_
diff --git a/chrome/browser/tab_contents/web_navigation_observer.cc b/chrome/browser/tab_contents/web_navigation_observer.cc
deleted file mode 100644
index a096e97..0000000
--- a/chrome/browser/tab_contents/web_navigation_observer.cc
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/tab_contents/web_navigation_observer.h"
-
-bool WebNavigationObserver::OnMessageReceived(const IPC::Message& message) {
- return false;
-}
diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
index 39cd492..43f4c49 100644
--- a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
+++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
@@ -23,12 +23,12 @@ TabContentsWrapper::TabContentsWrapper(TabContents* contents)
property_accessor()->SetProperty(contents->property_bag(), this);
// Needed so that we initialize the password manager on first navigation.
- tab_contents()->AddNavigationObserver(this);
+ tab_contents()->AddObserver(this);
}
TabContentsWrapper::~TabContentsWrapper() {
// Unregister observers (TabContents outlives supporting objects).
- tab_contents()->RemoveNavigationObserver(password_manager_.get());
+ tab_contents()->RemoveObserver(password_manager_.get());
}
PropertyAccessor<TabContentsWrapper*>* TabContentsWrapper::property_accessor() {
@@ -52,15 +52,15 @@ PasswordManager* TabContentsWrapper::GetPasswordManager() {
password_manager_.reset(
new PasswordManager(password_manager_delegate_.get()));
// Register the manager to receive navigation notifications.
- tab_contents()->AddNavigationObserver(password_manager_.get());
+ tab_contents()->AddObserver(password_manager_.get());
}
return password_manager_.get();
}
////////////////////////////////////////////////////////////////////////////////
-// TabContentsWrapper, WebNavigationObserver implementation:
+// TabContentsWrapper, TabContentsObserver implementation:
void TabContentsWrapper::NavigateToPendingEntry() {
GetPasswordManager();
- tab_contents()->RemoveNavigationObserver(this);
+ tab_contents()->RemoveObserver(this);
}
diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper.h b/chrome/browser/ui/tab_contents/tab_contents_wrapper.h
index 303ceb3..430008f 100644
--- a/chrome/browser/ui/tab_contents/tab_contents_wrapper.h
+++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper.h
@@ -9,7 +9,7 @@
#include "base/scoped_ptr.h"
#include "base/compiler_specific.h"
#include "chrome/browser/tab_contents/tab_contents.h"
-#include "chrome/browser/tab_contents/web_navigation_observer.h"
+#include "chrome/browser/tab_contents/tab_contents_observer.h"
class Extension;
class NavigationController;
@@ -23,7 +23,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 TabContentsObserver {
public:
// Takes ownership of |contents|, which must be heap-allocated (as it lives
// in a scoped_ptr) and can not be NULL.
@@ -62,7 +62,7 @@ class TabContentsWrapper : public WebNavigationObserver {
// Returns the PasswordManager, creating it if necessary.
PasswordManager* GetPasswordManager();
- // WebNavigationObserver overrides:
+ // TabContentsObserver overrides:
virtual void NavigateToPendingEntry() OVERRIDE;
private:
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 226ab60..ede2d80 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -2559,6 +2559,7 @@
'browser/tab_contents/tab_contents.h',
'browser/tab_contents/tab_contents_delegate.cc',
'browser/tab_contents/tab_contents_delegate.h',
+ 'browser/tab_contents/tab_contents_observer.h',
'browser/tab_contents/tab_contents_ssl_helper.cc',
'browser/tab_contents/tab_contents_ssl_helper.h',
'browser/tab_contents/tab_contents_view.cc',
@@ -2581,8 +2582,6 @@
'browser/tab_contents/web_drag_utils_win.h',
'browser/tab_contents/web_drop_target_win.cc',
'browser/tab_contents/web_drop_target_win.h',
- 'browser/tab_contents/web_navigation_observer.cc',
- 'browser/tab_contents/web_navigation_observer.h',
'browser/tabs/default_tab_handler.cc',
'browser/tabs/default_tab_handler.h',
'browser/tabs/pinned_tab_codec.cc',