summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/autocomplete_history_manager.cc4
-rw-r--r--chrome/browser/autocomplete_history_manager.h7
-rw-r--r--chrome/browser/autofill/autofill_manager.cc4
-rw-r--r--chrome/browser/autofill/autofill_manager.h6
-rw-r--r--chrome/browser/automation/automation_tab_helper.cc2
-rw-r--r--chrome/browser/automation/automation_tab_helper.h6
-rw-r--r--chrome/browser/content_settings/tab_specific_content_settings.cc2
-rw-r--r--chrome/browser/content_settings/tab_specific_content_settings.h6
-rw-r--r--chrome/browser/download/download_request_limiter_observer.cc2
-rw-r--r--chrome/browser/download/download_request_limiter_observer.h8
-rw-r--r--chrome/browser/extensions/execute_code_in_tab_function.h6
-rw-r--r--chrome/browser/extensions/extension_host.cc2
-rw-r--r--chrome/browser/extensions/extension_host.h7
-rw-r--r--chrome/browser/extensions/extension_page_capture_api.h2
-rw-r--r--chrome/browser/extensions/extension_tab_helper.cc2
-rw-r--r--chrome/browser/extensions/extension_tab_helper.h8
-rw-r--r--chrome/browser/extensions/extension_tabs_module.h4
-rw-r--r--chrome/browser/extensions/extension_webnavigation_api.cc2
-rw-r--r--chrome/browser/extensions/extension_webnavigation_api.h6
-rw-r--r--chrome/browser/extensions/webstore_inline_installer.cc2
-rw-r--r--chrome/browser/extensions/webstore_inline_installer.h6
-rw-r--r--chrome/browser/external_protocol/external_protocol_observer.cc2
-rw-r--r--chrome/browser/external_protocol/external_protocol_observer.h8
-rw-r--r--chrome/browser/external_tab_container_win.cc2
-rw-r--r--chrome/browser/external_tab_container_win.h7
-rw-r--r--chrome/browser/favicon/favicon_tab_helper.cc2
-rw-r--r--chrome/browser/favicon/favicon_tab_helper.h7
-rw-r--r--chrome/browser/file_select_helper.h1
-rw-r--r--chrome/browser/history/history_tab_helper.cc2
-rw-r--r--chrome/browser/history/history_tab_helper.h6
-rw-r--r--chrome/browser/infobars/infobar_tab_helper.cc2
-rw-r--r--chrome/browser/infobars/infobar_tab_helper.h9
-rw-r--r--chrome/browser/instant/instant_loader.cc6
-rw-r--r--chrome/browser/notifications/balloon_host.h10
-rw-r--r--chrome/browser/password_manager/password_manager.cc2
-rw-r--r--chrome/browser/password_manager/password_manager.h6
-rw-r--r--chrome/browser/plugin_observer.cc2
-rw-r--r--chrome/browser/plugin_observer.h6
-rw-r--r--chrome/browser/prerender/prerender_contents.cc4
-rw-r--r--chrome/browser/prerender/prerender_contents.h7
-rw-r--r--chrome/browser/prerender/prerender_tab_helper.cc2
-rw-r--r--chrome/browser/prerender/prerender_tab_helper.h6
-rw-r--r--chrome/browser/printing/print_preview_message_handler.cc2
-rw-r--r--chrome/browser/printing/print_preview_message_handler.h6
-rw-r--r--chrome/browser/printing/print_preview_tab_controller_browsertest.cc6
-rw-r--r--chrome/browser/printing/print_view_manager.cc2
-rw-r--r--chrome/browser/printing/print_view_manager.h6
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_host.cc2
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_host.h14
-rw-r--r--chrome/browser/safe_browsing/malware_details.cc2
-rw-r--r--chrome/browser/safe_browsing/malware_details.h10
-rw-r--r--chrome/browser/sessions/restore_tab_helper.cc2
-rw-r--r--chrome/browser/sessions/restore_tab_helper.h8
-rw-r--r--chrome/browser/tab_contents/background_contents.cc2
-rw-r--r--chrome/browser/tab_contents/background_contents.h6
-rw-r--r--chrome/browser/tab_contents/thumbnail_generator.cc2
-rw-r--r--chrome/browser/tab_contents/thumbnail_generator.h7
-rw-r--r--chrome/browser/tabs/tab_finder.cc32
-rw-r--r--chrome/browser/tabs/tab_finder.h12
-rw-r--r--chrome/browser/translate/translate_tab_helper.cc2
-rw-r--r--chrome/browser/translate/translate_tab_helper.h6
-rw-r--r--chrome/browser/ui/alternate_error_tab_observer.cc4
-rw-r--r--chrome/browser/ui/alternate_error_tab_observer.h6
-rw-r--r--chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc2
-rw-r--r--chrome/browser/ui/blocked_content/blocked_content_tab_helper.h6
-rw-r--r--chrome/browser/ui/bookmarks/bookmark_tab_helper.cc2
-rw-r--r--chrome/browser/ui/bookmarks/bookmark_tab_helper.h6
-rw-r--r--chrome/browser/ui/cocoa/hung_renderer_controller.h4
-rw-r--r--chrome/browser/ui/cocoa/hung_renderer_controller.mm12
-rw-r--r--chrome/browser/ui/constrained_window_tab_helper.cc2
-rw-r--r--chrome/browser/ui/constrained_window_tab_helper.h6
-rw-r--r--chrome/browser/ui/find_bar/find_tab_helper.cc2
-rw-r--r--chrome/browser/ui/find_bar/find_tab_helper.h4
-rw-r--r--chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc14
-rw-r--r--chrome/browser/ui/pdf/pdf_tab_observer.cc4
-rw-r--r--chrome/browser/ui/pdf/pdf_tab_observer.h6
-rw-r--r--chrome/browser/ui/prefs/prefs_tab_helper.cc2
-rw-r--r--chrome/browser/ui/prefs/prefs_tab_helper.h9
-rw-r--r--chrome/browser/ui/sad_tab_observer.cc2
-rw-r--r--chrome/browser/ui/sad_tab_observer.h6
-rw-r--r--chrome/browser/ui/search_engines/search_engine_tab_helper.cc2
-rw-r--r--chrome/browser/ui/search_engines/search_engine_tab_helper.h6
-rw-r--r--chrome/browser/ui/snapshot_tab_helper.cc4
-rw-r--r--chrome/browser/ui/snapshot_tab_helper.h6
-rw-r--r--chrome/browser/ui/tab_contents/core_tab_helper.cc4
-rw-r--r--chrome/browser/ui/tab_contents/core_tab_helper.h6
-rw-r--r--chrome/browser/ui/tab_contents/tab_contents_wrapper.cc4
-rw-r--r--chrome/browser/ui/tab_contents/tab_contents_wrapper.h10
-rw-r--r--chrome/browser/ui/views/hung_renderer_view.cc28
-rw-r--r--chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc9
-rw-r--r--chrome/browser/ui/webui/constrained_html_ui_browsertest.cc7
-rw-r--r--chrome/browser/ui/webui/hung_renderer_dialog.cc12
-rw-r--r--chrome/browser/ui/webui/hung_renderer_dialog.h13
93 files changed, 254 insertions, 278 deletions
diff --git a/chrome/browser/autocomplete_history_manager.cc b/chrome/browser/autocomplete_history_manager.cc
index 964697c..9aaaaba 100644
--- a/chrome/browser/autocomplete_history_manager.cc
+++ b/chrome/browser/autocomplete_history_manager.cc
@@ -108,7 +108,7 @@ bool IsTextField(const FormField& field) {
AutocompleteHistoryManager::AutocompleteHistoryManager(
TabContents* tab_contents)
- : TabContentsObserver(tab_contents),
+ : content::WebContentsObserver(tab_contents),
pending_query_handle_(0),
query_id_(0),
external_delegate_(NULL) {
@@ -235,7 +235,7 @@ AutocompleteHistoryManager::AutocompleteHistoryManager(
TabContents* tab_contents,
Profile* profile,
WebDataService* wds)
- : TabContentsObserver(tab_contents),
+ : content::WebContentsObserver(tab_contents),
profile_(profile),
web_data_service_(wds),
pending_query_handle_(0),
diff --git a/chrome/browser/autocomplete_history_manager.h b/chrome/browser/autocomplete_history_manager.h
index dafe49a..8f5eabc 100644
--- a/chrome/browser/autocomplete_history_manager.h
+++ b/chrome/browser/autocomplete_history_manager.h
@@ -11,7 +11,7 @@
#include "base/gtest_prod_util.h"
#include "chrome/browser/prefs/pref_member.h"
#include "chrome/browser/webdata/web_data_service.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "content/public/browser/web_contents_observer.h"
namespace webkit {
namespace forms {
@@ -21,17 +21,16 @@ struct FormData;
class AutofillExternalDelegate;
class Profile;
-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 TabContentsObserver,
+class AutocompleteHistoryManager : public content::WebContentsObserver,
public WebDataServiceConsumer {
public:
explicit AutocompleteHistoryManager(TabContents* tab_contents);
virtual ~AutocompleteHistoryManager();
- // TabContentsObserver implementation.
+ // content::WebContentsObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
// WebDataServiceConsumer implementation.
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index a6108a7..f163f10 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -245,7 +245,7 @@ void CheckForPopularForms(const std::vector<FormStructure*>& forms,
} // namespace
AutofillManager::AutofillManager(TabContentsWrapper* tab_contents)
- : TabContentsObserver(tab_contents->tab_contents()),
+ : content::WebContentsObserver(tab_contents->tab_contents()),
tab_contents_wrapper_(tab_contents),
personal_data_(NULL),
download_manager_(tab_contents->profile(), this),
@@ -802,7 +802,7 @@ void AutofillManager::Reset() {
AutofillManager::AutofillManager(TabContentsWrapper* tab_contents,
PersonalDataManager* personal_data)
- : TabContentsObserver(tab_contents->tab_contents()),
+ : content::WebContentsObserver(tab_contents->tab_contents()),
tab_contents_wrapper_(tab_contents),
personal_data_(personal_data),
download_manager_(tab_contents->profile(), this),
diff --git a/chrome/browser/autofill/autofill_manager.h b/chrome/browser/autofill/autofill_manager.h
index 7460232..9079d09 100644
--- a/chrome/browser/autofill/autofill_manager.h
+++ b/chrome/browser/autofill/autofill_manager.h
@@ -22,7 +22,7 @@
#include "chrome/browser/autofill/autofill_download.h"
#include "chrome/browser/autofill/field_types.h"
#include "chrome/browser/autofill/form_structure.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "content/public/browser/web_contents_observer.h"
class AutofillExternalDelegate;
class AutofillField;
@@ -53,7 +53,7 @@ struct FormField;
// Manages saving and restoring the user's personal information entered into web
// forms.
-class AutofillManager : public TabContentsObserver,
+class AutofillManager : public content::WebContentsObserver,
public AutofillDownloadManager::Observer,
public base::RefCounted<AutofillManager> {
public:
@@ -136,7 +136,7 @@ class AutofillManager : public TabContentsObserver,
const base::TimeTicks& timestamp);
private:
- // TabContentsObserver:
+ // content::WebContentsObserver:
virtual void DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) OVERRIDE;
diff --git a/chrome/browser/automation/automation_tab_helper.cc b/chrome/browser/automation/automation_tab_helper.cc
index 30d203b..f951fde 100644
--- a/chrome/browser/automation/automation_tab_helper.cc
+++ b/chrome/browser/automation/automation_tab_helper.cc
@@ -37,7 +37,7 @@ void TabEventObserver::StopObserving(AutomationTabHelper* tab_helper) {
}
AutomationTabHelper::AutomationTabHelper(TabContents* tab_contents)
- : TabContentsObserver(tab_contents),
+ : content::WebContentsObserver(tab_contents),
is_loading_(false) {
}
diff --git a/chrome/browser/automation/automation_tab_helper.h b/chrome/browser/automation/automation_tab_helper.h
index ae764ba..1c80792 100644
--- a/chrome/browser/automation/automation_tab_helper.h
+++ b/chrome/browser/automation/automation_tab_helper.h
@@ -12,7 +12,7 @@
#include "base/basictypes.h"
#include "base/observer_list.h"
#include "base/memory/weak_ptr.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "content/public/browser/web_contents_observer.h"
class TabContents;
class AutomationTabHelper;
@@ -81,7 +81,7 @@ class TabEventObserver {
// Per-tab automation support class. Receives automation/testing messages
// from the renderer. Broadcasts tab events to |TabEventObserver|s.
class AutomationTabHelper
- : public TabContentsObserver,
+ : public content::WebContentsObserver,
public base::SupportsWeakPtr<AutomationTabHelper> {
public:
explicit AutomationTabHelper(TabContents* tab_contents);
@@ -105,7 +105,7 @@ class AutomationTabHelper
const std::vector<unsigned char>& png_data,
const std::string& error_msg);
- // TabContentsObserver implementation.
+ // content::WebContentsObserver implementation.
virtual void DidStartLoading() OVERRIDE;
virtual void DidStopLoading() OVERRIDE;
virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE;
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc
index b431641..8e0039a 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings.cc
@@ -49,7 +49,7 @@ bool TabSpecificContentSettings::LocalSharedObjectsContainer::empty() const {
}
TabSpecificContentSettings::TabSpecificContentSettings(TabContents* tab)
- : TabContentsObserver(tab),
+ : content::WebContentsObserver(tab),
profile_(Profile::FromBrowserContext(tab->GetBrowserContext())),
allowed_local_shared_objects_(profile_),
blocked_local_shared_objects_(profile_),
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.h b/chrome/browser/content_settings/tab_specific_content_settings.h
index 6db09b64a..507adbb 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.h
+++ b/chrome/browser/content_settings/tab_specific_content_settings.h
@@ -15,9 +15,9 @@
#include "chrome/browser/geolocation/geolocation_settings_state.h"
#include "chrome/common/content_settings.h"
#include "chrome/common/content_settings_types.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/web_contents_observer.h"
class CannedBrowsingDataAppCacheHelper;
class CannedBrowsingDataCookieHelper;
@@ -34,7 +34,7 @@ class CookieList;
class CookieOptions;
}
-class TabSpecificContentSettings : public TabContentsObserver,
+class TabSpecificContentSettings : public content::WebContentsObserver,
public content::NotificationObserver {
public:
explicit TabSpecificContentSettings(TabContents* tab);
@@ -157,7 +157,7 @@ class TabSpecificContentSettings : public TabContentsObserver,
load_plugins_link_enabled_ = enabled;
}
- // TabContentsObserver overrides.
+ // content::WebContentsObserver overrides.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
diff --git a/chrome/browser/download/download_request_limiter_observer.cc b/chrome/browser/download/download_request_limiter_observer.cc
index 94fde71..1242282 100644
--- a/chrome/browser/download/download_request_limiter_observer.cc
+++ b/chrome/browser/download/download_request_limiter_observer.cc
@@ -9,7 +9,7 @@
DownloadRequestLimiterObserver::DownloadRequestLimiterObserver(
TabContents* tab_contents)
- : TabContentsObserver(tab_contents) {
+ : content::WebContentsObserver(tab_contents) {
}
DownloadRequestLimiterObserver::~DownloadRequestLimiterObserver() {
diff --git a/chrome/browser/download/download_request_limiter_observer.h b/chrome/browser/download/download_request_limiter_observer.h
index d5d6135..004c1c3 100644
--- a/chrome/browser/download/download_request_limiter_observer.h
+++ b/chrome/browser/download/download_request_limiter_observer.h
@@ -5,17 +5,15 @@
#ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_LIMITER_OBSERVER_H_
#define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_LIMITER_OBSERVER_H_
-#include "content/browser/tab_contents/tab_contents_observer.h"
-
-class TabContents;
+#include "content/public/browser/web_contents_observer.h"
// Watches for user gesture notifications.
-class DownloadRequestLimiterObserver : public TabContentsObserver {
+class DownloadRequestLimiterObserver : public content::WebContentsObserver {
public:
explicit DownloadRequestLimiterObserver(TabContents* tab_contents);
virtual ~DownloadRequestLimiterObserver();
- // TabContentsObserver overrides.
+ // content::WebContentsObserver overrides.
virtual void DidGetUserGesture() OVERRIDE;
private:
diff --git a/chrome/browser/extensions/execute_code_in_tab_function.h b/chrome/browser/extensions/execute_code_in_tab_function.h
index 5afc85c..fb36fa9 100644
--- a/chrome/browser/extensions/execute_code_in_tab_function.h
+++ b/chrome/browser/extensions/execute_code_in_tab_function.h
@@ -10,11 +10,11 @@
#include "chrome/browser/extensions/extension_function.h"
#include "chrome/common/extensions/extension_resource.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "content/public/browser/web_contents_observer.h"
// Implement API call tabs.executeScript and tabs.insertCSS.
class ExecuteCodeInTabFunction : public AsyncExtensionFunction,
- public TabContentsObserver {
+ public content::WebContentsObserver {
public:
ExecuteCodeInTabFunction();
virtual ~ExecuteCodeInTabFunction();
@@ -22,7 +22,7 @@ class ExecuteCodeInTabFunction : public AsyncExtensionFunction,
private:
virtual bool RunImpl() OVERRIDE;
- // TabContentsObserver overrides.
+ // content::WebContentsObserver overrides.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
// Message handler.
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index a282b6e..84ae278 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -131,7 +131,7 @@ ExtensionHost::ExtensionHost(const Extension* extension,
associated_tab_contents_(NULL) {
host_contents_.reset(new TabContents(
profile_, site_instance, MSG_ROUTING_NONE, NULL, NULL));
- TabContentsObserver::Observe(host_contents_.get());
+ content::WebContentsObserver::Observe(host_contents_.get());
host_contents_->SetDelegate(this);
host_contents_->SetViewType(host_type);
diff --git a/chrome/browser/extensions/extension_host.h b/chrome/browser/extensions/extension_host.h
index 67fda94..b5b45c8 100644
--- a/chrome/browser/extensions/extension_host.h
+++ b/chrome/browser/extensions/extension_host.h
@@ -13,10 +13,10 @@
#include "base/perftimer.h"
#include "chrome/browser/extensions/extension_function_dispatcher.h"
#include "content/browser/javascript_dialogs.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_contents_delegate.h"
+#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/view_type.h"
#if defined(TOOLKIT_VIEWS)
@@ -31,7 +31,6 @@ class Browser;
class Extension;
class PrefsTabHelper;
class RenderWidgetHostView;
-class TabContents;
struct WebPreferences;
namespace content {
@@ -43,7 +42,7 @@ class RenderProcessHost;
// privileges available to extensions. It may have a view to be shown in the
// browser UI, or it may be hidden.
class ExtensionHost : public content::WebContentsDelegate,
- public TabContentsObserver,
+ public content::WebContentsObserver,
public ExtensionFunctionDispatcher::Delegate,
public content::NotificationObserver {
public:
@@ -107,7 +106,7 @@ class ExtensionHost : public content::WebContentsDelegate,
// |size_limit| in both width and height.
void DisableScrollbarsForSmallWindows(const gfx::Size& size_limit);
- // TabContentsObserver
+ // content::WebContentsObserver
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE;
virtual void RenderViewDeleted(RenderViewHost* render_view_host) OVERRIDE;
diff --git a/chrome/browser/extensions/extension_page_capture_api.h b/chrome/browser/extensions/extension_page_capture_api.h
index 00fde76..ee23d98 100644
--- a/chrome/browser/extensions/extension_page_capture_api.h
+++ b/chrome/browser/extensions/extension_page_capture_api.h
@@ -9,10 +9,10 @@
#include "base/memory/ref_counted.h"
#include "chrome/browser/extensions/extension_function.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "webkit/blob/deletable_file_reference.h"
class FilePath;
+class TabContents;
class PageCaptureSaveAsMHTMLFunction : public AsyncExtensionFunction {
public:
diff --git a/chrome/browser/extensions/extension_tab_helper.cc b/chrome/browser/extensions/extension_tab_helper.cc
index 24632d8..5d9ca1d 100644
--- a/chrome/browser/extensions/extension_tab_helper.cc
+++ b/chrome/browser/extensions/extension_tab_helper.cc
@@ -24,7 +24,7 @@
#include "content/public/browser/notification_service.h"
ExtensionTabHelper::ExtensionTabHelper(TabContentsWrapper* wrapper)
- : TabContentsObserver(wrapper->tab_contents()),
+ : content::WebContentsObserver(wrapper->tab_contents()),
delegate_(NULL),
extension_app_(NULL),
ALLOW_THIS_IN_INITIALIZER_LIST(
diff --git a/chrome/browser/extensions/extension_tab_helper.h b/chrome/browser/extensions/extension_tab_helper.h
index bacaacd..869034e 100644
--- a/chrome/browser/extensions/extension_tab_helper.h
+++ b/chrome/browser/extensions/extension_tab_helper.h
@@ -12,7 +12,7 @@
#include "chrome/browser/extensions/image_loading_tracker.h"
#include "chrome/browser/extensions/webstore_inline_installer.h"
#include "chrome/common/web_apps.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "content/public/browser/web_contents_observer.h"
#include "third_party/skia/include/core/SkBitmap.h"
class Extension;
@@ -26,7 +26,7 @@ struct LoadCommittedDetails;
// Per-tab extension helper. Also handles non-extension apps.
class ExtensionTabHelper
- : public TabContentsObserver,
+ : public content::WebContentsObserver,
public ExtensionFunctionDispatcher::Delegate,
public ImageLoadingTracker::Observer,
public WebstoreInlineInstaller::Delegate,
@@ -84,7 +84,7 @@ class ExtensionTabHelper
}
TabContents* tab_contents() const {
- return TabContentsObserver::tab_contents();
+ return content::WebContentsObserver::tab_contents();
}
// Sets a non-extension app icon associated with TabContents and fires an
@@ -92,7 +92,7 @@ class ExtensionTabHelper
void SetAppIcon(const SkBitmap& app_icon);
private:
- // TabContentsObserver overrides.
+ // content::WebContentsObserver overrides.
virtual void DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) OVERRIDE;
diff --git a/chrome/browser/extensions/extension_tabs_module.h b/chrome/browser/extensions/extension_tabs_module.h
index 6164752..944de1c 100644
--- a/chrome/browser/extensions/extension_tabs_module.h
+++ b/chrome/browser/extensions/extension_tabs_module.h
@@ -11,9 +11,9 @@
#include "base/compiler_specific.h"
#include "chrome/browser/extensions/extension_function.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/web_contents_observer.h"
#include "googleurl/src/gurl.h"
class BackingStore;
@@ -106,7 +106,7 @@ class HighlightTabsFunction : public SyncExtensionFunction {
DECLARE_EXTENSION_FUNCTION_NAME("tabs.highlight")
};
class UpdateTabFunction : public AsyncExtensionFunction,
- public TabContentsObserver {
+ public content::WebContentsObserver {
public:
UpdateTabFunction();
private:
diff --git a/chrome/browser/extensions/extension_webnavigation_api.cc b/chrome/browser/extensions/extension_webnavigation_api.cc
index f3f8dde..4644376 100644
--- a/chrome/browser/extensions/extension_webnavigation_api.cc
+++ b/chrome/browser/extensions/extension_webnavigation_api.cc
@@ -481,7 +481,7 @@ void ExtensionWebNavigationEventRouter::TabDestroyed(
ExtensionWebNavigationTabObserver::ExtensionWebNavigationTabObserver(
TabContents* tab_contents)
- : TabContentsObserver(tab_contents) {
+ : content::WebContentsObserver(tab_contents) {
g_tab_observer.Get().insert(TabObserverMap::value_type(tab_contents, this));
}
diff --git a/chrome/browser/extensions/extension_webnavigation_api.h b/chrome/browser/extensions/extension_webnavigation_api.h
index d3a25be..43953c5 100644
--- a/chrome/browser/extensions/extension_webnavigation_api.h
+++ b/chrome/browser/extensions/extension_webnavigation_api.h
@@ -15,9 +15,9 @@
#include "base/compiler_specific.h"
#include "chrome/browser/extensions/extension_function.h"
#include "chrome/browser/profiles/profile.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/web_contents_observer.h"
#include "googleurl/src/gurl.h"
struct RetargetingDetails;
@@ -115,7 +115,7 @@ class FrameNavigationState {
};
// Tab contents observer that forwards navigation events to the event router.
-class ExtensionWebNavigationTabObserver : public TabContentsObserver {
+class ExtensionWebNavigationTabObserver : public content::WebContentsObserver {
public:
explicit ExtensionWebNavigationTabObserver(TabContents* tab_contents);
virtual ~ExtensionWebNavigationTabObserver();
@@ -127,7 +127,7 @@ class ExtensionWebNavigationTabObserver : public TabContentsObserver {
return navigation_state_;
}
- // TabContentsObserver implementation.
+ // content::WebContentsObserver implementation.
virtual void DidStartProvisionalLoadForFrame(
int64 frame_id,
bool is_main_frame,
diff --git a/chrome/browser/extensions/webstore_inline_installer.cc b/chrome/browser/extensions/webstore_inline_installer.cc
index 8c5a678..5fdc9ab 100644
--- a/chrome/browser/extensions/webstore_inline_installer.cc
+++ b/chrome/browser/extensions/webstore_inline_installer.cc
@@ -149,7 +149,7 @@ WebstoreInlineInstaller::WebstoreInlineInstaller(TabContents* tab_contents,
std::string webstore_item_id,
GURL requestor_url,
Delegate* delegate)
- : TabContentsObserver(tab_contents),
+ : content::WebContentsObserver(tab_contents),
install_id_(install_id),
id_(webstore_item_id),
requestor_url_(requestor_url),
diff --git a/chrome/browser/extensions/webstore_inline_installer.h b/chrome/browser/extensions/webstore_inline_installer.h
index b369716..c7c0595 100644
--- a/chrome/browser/extensions/webstore_inline_installer.h
+++ b/chrome/browser/extensions/webstore_inline_installer.h
@@ -14,7 +14,7 @@
#include "chrome/browser/extensions/extension_install_ui.h"
#include "chrome/browser/extensions/webstore_installer.h"
#include "chrome/browser/extensions/webstore_install_helper.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/url_fetcher_delegate.h"
#include "googleurl/src/gurl.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -31,7 +31,7 @@ class SafeWebstoreResponseParser;
class WebstoreInlineInstaller
: public base::RefCountedThreadSafe<WebstoreInlineInstaller>,
public ExtensionInstallUI::Delegate,
- public TabContentsObserver,
+ public content::WebContentsObserver,
public content::URLFetcherDelegate,
public WebstoreInstaller::Delegate,
public WebstoreInstallHelper::Delegate {
@@ -90,7 +90,7 @@ class WebstoreInlineInstaller
virtual void InstallUIProceed() OVERRIDE;
virtual void InstallUIAbort(bool user_initiated) OVERRIDE;
- // TabContentsObserver interface implementation.
+ // content::WebContentsObserver interface implementation.
virtual void TabContentsDestroyed(TabContents* tab_contents) OVERRIDE;
// WebstoreInstaller::Delegate interface implementation.
diff --git a/chrome/browser/external_protocol/external_protocol_observer.cc b/chrome/browser/external_protocol/external_protocol_observer.cc
index c1be1ef..d563473 100644
--- a/chrome/browser/external_protocol/external_protocol_observer.cc
+++ b/chrome/browser/external_protocol/external_protocol_observer.cc
@@ -8,7 +8,7 @@
#include "content/browser/tab_contents/tab_contents.h"
ExternalProtocolObserver::ExternalProtocolObserver(TabContents* tab_contents)
- : TabContentsObserver(tab_contents) {
+ : content::WebContentsObserver(tab_contents) {
}
ExternalProtocolObserver::~ExternalProtocolObserver() {
diff --git a/chrome/browser/external_protocol/external_protocol_observer.h b/chrome/browser/external_protocol/external_protocol_observer.h
index dad04b4..55ac16f 100644
--- a/chrome/browser/external_protocol/external_protocol_observer.h
+++ b/chrome/browser/external_protocol/external_protocol_observer.h
@@ -5,18 +5,16 @@
#ifndef CHROME_BROWSER_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_OBSERVER_H_
#define CHROME_BROWSER_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_OBSERVER_H_
-#include "content/browser/tab_contents/tab_contents_observer.h"
-
-class TabContents;
+#include "content/public/browser/web_contents_observer.h"
// ExternalProtocolObserver is responsible for handling messages from
// TabContents relating to external protocols.
-class ExternalProtocolObserver : public TabContentsObserver {
+class ExternalProtocolObserver : public content::WebContentsObserver {
public:
explicit ExternalProtocolObserver(TabContents* tab_contents);
virtual ~ExternalProtocolObserver();
- // TabContentsObserver overrides.
+ // content::WebContentsObserver overrides.
virtual void DidGetUserGesture() OVERRIDE;
private:
diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc
index 9c00811..5939275 100644
--- a/chrome/browser/external_tab_container_win.cc
+++ b/chrome/browser/external_tab_container_win.cc
@@ -206,7 +206,7 @@ bool ExternalTabContainer::Init(Profile* profile,
registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_CREATED,
content::NotificationService::AllSources());
- TabContentsObserver::Observe(tab_contents_->tab_contents());
+ content::WebContentsObserver::Observe(tab_contents_->tab_contents());
// Start loading initial URL
if (!initial_url.is_empty()) {
diff --git a/chrome/browser/external_tab_container_win.h b/chrome/browser/external_tab_container_win.h
index d56c252..a07db59 100644
--- a/chrome/browser/external_tab_container_win.h
+++ b/chrome/browser/external_tab_container_win.h
@@ -19,11 +19,11 @@
#include "chrome/browser/net/chrome_url_request_context.h"
#include "chrome/browser/ui/blocked_content/blocked_content_tab_helper_delegate.h"
#include "chrome/browser/ui/views/unhandled_keyboard_event_handler.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/navigation_type.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_contents_delegate.h"
+#include "content/public/browser/web_contents_observer.h"
#include "ui/base/accelerators/accelerator.h"
#include "ui/views/widget/native_widget_win.h"
@@ -48,7 +48,7 @@ class ViewProp;
// external process. This class provides the FocusManger needed by the
// TabContents as well as an implementation of content::WebContentsDelegate.
class ExternalTabContainer : public content::WebContentsDelegate,
- public TabContentsObserver,
+ public content::WebContentsObserver,
public content::NotificationObserver,
public views::NativeWidgetWin,
public base::RefCounted<ExternalTabContainer>,
@@ -183,8 +183,7 @@ class ExternalTabContainer : public content::WebContentsDelegate,
void RegisterRenderViewHost(RenderViewHost* render_view_host);
void UnregisterRenderViewHost(RenderViewHost* render_view_host);
- // Overridden from TabContentsObserver:
- // IPC::Channel::Listener implementation.
+ // Overridden from content::WebContentsObserver:
virtual bool OnMessageReceived(const IPC::Message& message);
// Message handlers
diff --git a/chrome/browser/favicon/favicon_tab_helper.cc b/chrome/browser/favicon/favicon_tab_helper.cc
index 08ebf3a..4f80151 100644
--- a/chrome/browser/favicon/favicon_tab_helper.cc
+++ b/chrome/browser/favicon/favicon_tab_helper.cc
@@ -21,7 +21,7 @@
#include "ui/gfx/image/image.h"
FaviconTabHelper::FaviconTabHelper(TabContents* tab_contents)
- : TabContentsObserver(tab_contents),
+ : content::WebContentsObserver(tab_contents),
profile_(Profile::FromBrowserContext(tab_contents->GetBrowserContext())) {
favicon_handler_.reset(new FaviconHandler(profile_, this,
FaviconHandler::FAVICON));
diff --git a/chrome/browser/favicon/favicon_tab_helper.h b/chrome/browser/favicon/favicon_tab_helper.h
index 41d454d..6396752 100644
--- a/chrome/browser/favicon/favicon_tab_helper.h
+++ b/chrome/browser/favicon/favicon_tab_helper.h
@@ -13,13 +13,12 @@
#include "chrome/browser/favicon/favicon_handler_delegate.h"
#include "chrome/browser/favicon/favicon_service.h"
#include "chrome/common/favicon_url.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "content/public/browser/web_contents_observer.h"
#include "googleurl/src/gurl.h"
class FaviconHandler;
class NavigationEntry;
class SkBitmap;
-class TabContents;
// FaviconTabHelper works with FaviconHandlers to fetch the favicons.
//
@@ -30,7 +29,7 @@ class TabContents;
// DownloadImage downloads the specified icon and returns it through the given
// callback.
//
-class FaviconTabHelper : public TabContentsObserver,
+class FaviconTabHelper : public content::WebContentsObserver,
public FaviconHandlerDelegate {
public:
explicit FaviconTabHelper(TabContents* tab_contents);
@@ -80,7 +79,7 @@ class FaviconTabHelper : public TabContentsObserver,
virtual void NotifyFaviconUpdated() OVERRIDE;
private:
- // TabContentsObserver overrides.
+ // content::WebContentsObserver overrides.
virtual void NavigateToPendingEntry(
const GURL& url,
NavigationController::ReloadType reload_type) OVERRIDE;
diff --git a/chrome/browser/file_select_helper.h b/chrome/browser/file_select_helper.h
index 1793662..714ee7b 100644
--- a/chrome/browser/file_select_helper.h
+++ b/chrome/browser/file_select_helper.h
@@ -11,7 +11,6 @@
#include "base/compiler_specific.h"
#include "chrome/browser/ui/select_file_dialog.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "net/base/directory_lister.h"
diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/history/history_tab_helper.cc
index d5317dc..08cc2d9 100644
--- a/chrome/browser/history/history_tab_helper.cc
+++ b/chrome/browser/history/history_tab_helper.cc
@@ -19,7 +19,7 @@
#include "content/public/common/frame_navigate_params.h"
HistoryTabHelper::HistoryTabHelper(TabContents* tab_contents)
- : TabContentsObserver(tab_contents),
+ : content::WebContentsObserver(tab_contents),
received_page_title_(false) {
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_TITLE_UPDATED,
content::Source<TabContents>(tab_contents));
diff --git a/chrome/browser/history/history_tab_helper.h b/chrome/browser/history/history_tab_helper.h
index 63db2b0..ae5b052 100644
--- a/chrome/browser/history/history_tab_helper.h
+++ b/chrome/browser/history/history_tab_helper.h
@@ -6,9 +6,9 @@
#define CHROME_BROWSER_HISTORY_HISTORY_TAB_HELPER_H_
#pragma once
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/web_contents_observer.h"
class HistoryService;
class SkBitmap;
@@ -18,7 +18,7 @@ namespace history {
class HistoryAddPageArgs;
}
-class HistoryTabHelper : public TabContentsObserver,
+class HistoryTabHelper : public content::WebContentsObserver,
public content::NotificationObserver {
public:
explicit HistoryTabHelper(TabContents* tab_contents);
@@ -41,7 +41,7 @@ class HistoryTabHelper : public TabContentsObserver,
const content::FrameNavigateParams& params);
private:
- // TabContentsObserver implementation.
+ // content::WebContentsObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
diff --git a/chrome/browser/infobars/infobar_tab_helper.cc b/chrome/browser/infobars/infobar_tab_helper.cc
index d3baf4a..12fa355 100644
--- a/chrome/browser/infobars/infobar_tab_helper.cc
+++ b/chrome/browser/infobars/infobar_tab_helper.cc
@@ -13,7 +13,7 @@
#include "content/browser/tab_contents/tab_contents.h"
InfoBarTabHelper::InfoBarTabHelper(TabContents* tab_contents)
- : TabContentsObserver(tab_contents),
+ : content::WebContentsObserver(tab_contents),
infobars_enabled_(true) {
DCHECK(tab_contents);
}
diff --git a/chrome/browser/infobars/infobar_tab_helper.h b/chrome/browser/infobars/infobar_tab_helper.h
index f614a8b..133a341 100644
--- a/chrome/browser/infobars/infobar_tab_helper.h
+++ b/chrome/browser/infobars/infobar_tab_helper.h
@@ -7,14 +7,13 @@
#pragma once
#include "base/basictypes.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/web_contents_observer.h"
class InfoBarDelegate;
-class TabContents;
// Per-tab info bar manager.
-class InfoBarTabHelper : public TabContentsObserver,
+class InfoBarTabHelper : public content::WebContentsObserver,
public content::NotificationObserver {
public:
explicit InfoBarTabHelper(TabContents* tab_contents);
@@ -49,7 +48,7 @@ class InfoBarTabHelper : public TabContentsObserver,
InfoBarDelegate* GetInfoBarDelegateAt(size_t index);
void set_infobars_enabled(bool value) { infobars_enabled_ = value; }
- // TabContentsObserver overrides:
+ // content::WebContentsObserver overrides:
virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
@@ -60,7 +59,7 @@ class InfoBarTabHelper : public TabContentsObserver,
// Helper functions for infobars:
TabContents* tab_contents() {
- return TabContentsObserver::tab_contents();
+ return content::WebContentsObserver::tab_contents();
}
private:
diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc
index 8752f02..e6b676b 100644
--- a/chrome/browser/instant/instant_loader.cc
+++ b/chrome/browser/instant/instant_loader.cc
@@ -168,7 +168,7 @@ class InstantLoader::TabContentsDelegateImpl
public CoreTabHelperDelegate,
public ConstrainedWindowTabHelperDelegate,
public content::NotificationObserver,
- public TabContentsObserver {
+ public content::WebContentsObserver {
public:
explicit TabContentsDelegateImpl(InstantLoader* loader);
@@ -232,7 +232,7 @@ class InstantLoader::TabContentsDelegateImpl
virtual void WillShowConstrainedWindow(TabContentsWrapper* source) OVERRIDE;
virtual bool ShouldFocusConstrainedWindow() OVERRIDE;
- // TabContentsObserver:
+ // content::WebContentsObserver:
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
private:
@@ -280,7 +280,7 @@ class InstantLoader::TabContentsDelegateImpl
InstantLoader::TabContentsDelegateImpl::TabContentsDelegateImpl(
InstantLoader* loader)
- : TabContentsObserver(loader->preview_contents()->tab_contents()),
+ : content::WebContentsObserver(loader->preview_contents()->tab_contents()),
loader_(loader),
registered_render_widget_host_(NULL),
waiting_for_new_page_(true),
diff --git a/chrome/browser/notifications/balloon_host.h b/chrome/browser/notifications/balloon_host.h
index 6afbfd7..8a51a68 100644
--- a/chrome/browser/notifications/balloon_host.h
+++ b/chrome/browser/notifications/balloon_host.h
@@ -13,20 +13,16 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/extensions/extension_function_dispatcher.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_contents_delegate.h"
+#include "content/public/browser/web_contents_observer.h"
class Balloon;
class Browser;
class SiteInstance;
-namespace IPC {
-class Message;
-}
-
class BalloonHost : public content::WebContentsDelegate,
- public TabContentsObserver,
+ public content::WebContentsObserver,
public ExtensionFunctionDispatcher::Delegate {
public:
explicit BalloonHost(Balloon* balloon);
@@ -64,7 +60,7 @@ class BalloonHost : public content::WebContentsDelegate,
virtual void UpdatePreferredSize(TabContents* source,
const gfx::Size& pref_size) OVERRIDE;
- // TabContentsObserver implementation:
+ // content::WebContentsObserver implementation:
virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE;
virtual void RenderViewReady() OVERRIDE;
virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE;
diff --git a/chrome/browser/password_manager/password_manager.cc b/chrome/browser/password_manager/password_manager.cc
index daf6706..8eaf155 100644
--- a/chrome/browser/password_manager/password_manager.cc
+++ b/chrome/browser/password_manager/password_manager.cc
@@ -57,7 +57,7 @@ static void ReportMetrics(bool password_manager_enabled) {
PasswordManager::PasswordManager(TabContents* tab_contents,
PasswordManagerDelegate* delegate)
- : TabContentsObserver(tab_contents),
+ : content::WebContentsObserver(tab_contents),
login_managers_deleter_(&pending_login_managers_),
delegate_(delegate),
observer_(NULL) {
diff --git a/chrome/browser/password_manager/password_manager.h b/chrome/browser/password_manager/password_manager.h
index 882066b..aac2129 100644
--- a/chrome/browser/password_manager/password_manager.h
+++ b/chrome/browser/password_manager/password_manager.h
@@ -11,7 +11,7 @@
#include "chrome/browser/password_manager/password_form_manager.h"
#include "chrome/browser/prefs/pref_member.h"
#include "chrome/browser/ui/login/login_model.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "content/public/browser/web_contents_observer.h"
#include "webkit/forms/password_form.h"
#include "webkit/forms/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 TabContentsObserver {
+ public content::WebContentsObserver {
public:
static void RegisterUserPrefs(PrefService* prefs);
@@ -49,7 +49,7 @@ class PasswordManager : public LoginModel,
// of 2 (see SavePassword).
void ProvisionallySavePassword(webkit::forms::PasswordForm form);
- // TabContentsObserver overrides.
+ // content::WebContentsObserver overrides.
virtual void DidStopLoading() OVERRIDE;
virtual void DidNavigateAnyFrame(
const content::LoadCommittedDetails& details,
diff --git a/chrome/browser/plugin_observer.cc b/chrome/browser/plugin_observer.cc
index 7c488ba..0ddab66 100644
--- a/chrome/browser/plugin_observer.cc
+++ b/chrome/browser/plugin_observer.cc
@@ -289,7 +289,7 @@ bool OutdatedPluginInfoBarDelegate::LinkClicked(
// PluginObserver -------------------------------------------------------------
PluginObserver::PluginObserver(TabContentsWrapper* tab_contents)
- : TabContentsObserver(tab_contents->tab_contents()),
+ : content::WebContentsObserver(tab_contents->tab_contents()),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)),
tab_contents_(tab_contents) {
}
diff --git a/chrome/browser/plugin_observer.h b/chrome/browser/plugin_observer.h
index 2612e52..917df14 100644
--- a/chrome/browser/plugin_observer.h
+++ b/chrome/browser/plugin_observer.h
@@ -7,19 +7,19 @@
#pragma once
#include "base/memory/weak_ptr.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "content/public/browser/web_contents_observer.h"
class GURL;
class InfoBarDelegate;
class PluginInstaller;
class TabContentsWrapper;
-class PluginObserver : public TabContentsObserver {
+class PluginObserver : public content::WebContentsObserver {
public:
explicit PluginObserver(TabContentsWrapper* tab_contents);
virtual ~PluginObserver();
- // IPC::Channel::Listener implementation.
+ // content::WebContentsObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
private:
diff --git a/chrome/browser/prerender/prerender_contents.cc b/chrome/browser/prerender/prerender_contents.cc
index 1c493e3..243d3ab 100644
--- a/chrome/browser/prerender/prerender_contents.cc
+++ b/chrome/browser/prerender/prerender_contents.cc
@@ -237,7 +237,7 @@ void PrerenderContents::StartPrerendering(
TabContents* new_contents = new TabContents(profile_, NULL, MSG_ROUTING_NONE,
NULL, session_storage_namespace);
prerender_contents_.reset(new TabContentsWrapper(new_contents));
- TabContentsObserver::Observe(new_contents);
+ content::WebContentsObserver::Observe(new_contents);
gfx::Rect tab_bounds;
if (source_render_view_host) {
@@ -655,7 +655,7 @@ void PrerenderContents::DestroyWhenUsingTooManyResources() {
TabContentsWrapper* PrerenderContents::ReleasePrerenderContents() {
prerender_contents_->tab_contents()->SetDelegate(NULL);
render_view_host_observer_.reset();
- TabContentsObserver::Observe(NULL);
+ content::WebContentsObserver::Observe(NULL);
return prerender_contents_.release();
}
diff --git a/chrome/browser/prerender/prerender_contents.h b/chrome/browser/prerender/prerender_contents.h
index e22a154..d2b887e 100644
--- a/chrome/browser/prerender/prerender_contents.h
+++ b/chrome/browser/prerender/prerender_contents.h
@@ -14,15 +14,14 @@
#include "base/time.h"
#include "base/values.h"
#include "chrome/browser/prerender/prerender_final_status.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/referrer.h"
class Profile;
class RenderViewHost;
class RenderViewHostDelegate;
class SessionStorageNamespace;
-class TabContents;
class TabContentsWrapper;
struct FaviconURL;
@@ -42,7 +41,7 @@ class PrerenderTracker;
// programatically view window.location.href) or RenderViewHostManager because
// it is never allowed to navigate across a SiteInstance boundary.
class PrerenderContents : public content::NotificationObserver,
- public TabContentsObserver {
+ public content::WebContentsObserver {
public:
// PrerenderContents::Create uses the currently registered Factory to create
// the PrerenderContents. Factory is intended for testing.
@@ -131,7 +130,7 @@ class PrerenderContents : public content::NotificationObserver,
void OnJSOutOfMemory();
bool ShouldSuppressDialogs();
- // TabContentsObserver implementation.
+ // content::WebContentsObserver implementation.
virtual void DidStopLoading() OVERRIDE;
virtual void DidStartProvisionalLoadForFrame(
int64 frame_id,
diff --git a/chrome/browser/prerender/prerender_tab_helper.cc b/chrome/browser/prerender/prerender_tab_helper.cc
index abf6ef5..9e3107d 100644
--- a/chrome/browser/prerender/prerender_tab_helper.cc
+++ b/chrome/browser/prerender/prerender_tab_helper.cc
@@ -166,7 +166,7 @@ class PrerenderTabHelper::HoverData {
};
PrerenderTabHelper::PrerenderTabHelper(TabContentsWrapper* tab)
- : TabContentsObserver(tab->tab_contents()),
+ : content::WebContentsObserver(tab->tab_contents()),
tab_(tab),
pplt_load_start_(),
last_hovers_(new HoverData[kNumHoverThresholds]) {
diff --git a/chrome/browser/prerender/prerender_tab_helper.h b/chrome/browser/prerender/prerender_tab_helper.h
index e70d182..8f22d2a 100644
--- a/chrome/browser/prerender/prerender_tab_helper.h
+++ b/chrome/browser/prerender/prerender_tab_helper.h
@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_PRERENDER_PRERENDER_TAB_HELPER_H_
#define CHROME_BROWSER_PRERENDER_PRERENDER_TAB_HELPER_H_
-#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "content/public/browser/web_contents_observer.h"
#include "base/time.h"
@@ -18,12 +18,12 @@ class PrerenderManager;
// PrerenderTabHelper is responsible for recording perceived pageload times
// to compare PLT's with prerendering enabled and disabled.
-class PrerenderTabHelper : public TabContentsObserver {
+class PrerenderTabHelper : public content::WebContentsObserver {
public:
explicit PrerenderTabHelper(TabContentsWrapper* tab);
virtual ~PrerenderTabHelper();
- // TabContentsObserver implementation.
+ // content::WebContentsObserver implementation.
virtual void ProvisionalChangeToMainFrameUrl(
const GURL& url,
const GURL& opener_url) OVERRIDE;
diff --git a/chrome/browser/printing/print_preview_message_handler.cc b/chrome/browser/printing/print_preview_message_handler.cc
index b59c78b..f3c316a 100644
--- a/chrome/browser/printing/print_preview_message_handler.cc
+++ b/chrome/browser/printing/print_preview_message_handler.cc
@@ -64,7 +64,7 @@ namespace printing {
PrintPreviewMessageHandler::PrintPreviewMessageHandler(
TabContents* tab_contents)
- : TabContentsObserver(tab_contents) {
+ : content::WebContentsObserver(tab_contents) {
DCHECK(tab_contents);
}
diff --git a/chrome/browser/printing/print_preview_message_handler.h b/chrome/browser/printing/print_preview_message_handler.h
index f5de599..8f6b649 100644
--- a/chrome/browser/printing/print_preview_message_handler.h
+++ b/chrome/browser/printing/print_preview_message_handler.h
@@ -7,7 +7,7 @@
#pragma once
#include "base/compiler_specific.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "content/public/browser/web_contents_observer.h"
class PrintPreviewUI;
class TabContentsWrapper;
@@ -22,12 +22,12 @@ struct PageSizeMargins;
// TabContents offloads print preview message handling to
// PrintPreviewMessageHandler. This object has the same life time as the
// TabContents that owns it.
-class PrintPreviewMessageHandler : public TabContentsObserver {
+class PrintPreviewMessageHandler : public content::WebContentsObserver {
public:
explicit PrintPreviewMessageHandler(TabContents* tab_contents);
virtual ~PrintPreviewMessageHandler();
- // TabContentsObserver implementation.
+ // content::WebContentsObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void NavigateToPendingEntry(const GURL& url,
NavigationController::ReloadType reload_type) OVERRIDE;
diff --git a/chrome/browser/printing/print_preview_tab_controller_browsertest.cc b/chrome/browser/printing/print_preview_tab_controller_browsertest.cc
index 4dcf532..6dd22cbe 100644
--- a/chrome/browser/printing/print_preview_tab_controller_browsertest.cc
+++ b/chrome/browser/printing/print_preview_tab_controller_browsertest.cc
@@ -13,9 +13,9 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/web_contents_observer.h"
#include "googleurl/src/gurl.h"
namespace {
@@ -30,10 +30,10 @@ class PrintPreviewTabControllerBrowserTest : public InProcessBrowserTest {
}
};
-class TabDestroyedObserver : public TabContentsObserver {
+class TabDestroyedObserver : public content::WebContentsObserver {
public:
explicit TabDestroyedObserver(TabContents* contents)
- : TabContentsObserver(contents),
+ : content::WebContentsObserver(contents),
tab_destroyed_(false) {
}
virtual ~TabDestroyedObserver() {}
diff --git a/chrome/browser/printing/print_view_manager.cc b/chrome/browser/printing/print_view_manager.cc
index 21a963f..5dbd665 100644
--- a/chrome/browser/printing/print_view_manager.cc
+++ b/chrome/browser/printing/print_view_manager.cc
@@ -65,7 +65,7 @@ static base::LazyInstance<ScriptedPrintPreviewClosureMap>
namespace printing {
PrintViewManager::PrintViewManager(TabContentsWrapper* tab)
- : TabContentsObserver(tab->tab_contents()),
+ : content::WebContentsObserver(tab->tab_contents()),
tab_(tab),
number_pages_(0),
printing_succeeded_(false),
diff --git a/chrome/browser/printing/print_view_manager.h b/chrome/browser/printing/print_view_manager.h
index 1e6627b..16f0fe2 100644
--- a/chrome/browser/printing/print_view_manager.h
+++ b/chrome/browser/printing/print_view_manager.h
@@ -8,9 +8,9 @@
#include "base/memory/ref_counted.h"
#include "base/string16.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/web_contents_observer.h"
#include "printing/printed_pages_source.h"
class TabContentsWrapper;
@@ -31,7 +31,7 @@ class PrintViewManagerObserver;
// delegates a few printing related commands to this instance.
class PrintViewManager : public content::NotificationObserver,
public PrintedPagesSource,
- public TabContentsObserver {
+ public content::WebContentsObserver {
public:
explicit PrintViewManager(TabContentsWrapper* tab);
virtual ~PrintViewManager();
@@ -76,7 +76,7 @@ class PrintViewManager : public content::NotificationObserver,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
- // TabContentsObserver implementation.
+ // content::WebContentsObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
// Terminates or cancels the print job if one was pending.
diff --git a/chrome/browser/safe_browsing/client_side_detection_host.cc b/chrome/browser/safe_browsing/client_side_detection_host.cc
index 07dfe94..d4a7721 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host.cc
@@ -256,7 +256,7 @@ ClientSideDetectionHost* ClientSideDetectionHost::Create(
}
ClientSideDetectionHost::ClientSideDetectionHost(TabContents* tab)
- : TabContentsObserver(tab),
+ : content::WebContentsObserver(tab),
csd_service_(NULL),
weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
unsafe_unique_page_id_(-1) {
diff --git a/chrome/browser/safe_browsing/client_side_detection_host.h b/chrome/browser/safe_browsing/client_side_detection_host.h
index 727852f..ad769b7 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host.h
+++ b/chrome/browser/safe_browsing/client_side_detection_host.h
@@ -16,12 +16,10 @@
#include "chrome/browser/safe_browsing/browser_feature_extractor.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "content/browser/tab_contents/navigation_controller.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/web_contents_observer.h"
#include "googleurl/src/gurl.h"
-class TabContents;
-
namespace safe_browsing {
class ClientPhishingRequest;
class ClientSideDetectionService;
@@ -31,7 +29,7 @@ class ClientSideDetectionService;
// class relays this information to the client-side detection service
// class which sends a ping to a server to validate the verdict.
// TODO(noelutz): move all client-side detection IPCs to this class.
-class ClientSideDetectionHost : public TabContentsObserver,
+class ClientSideDetectionHost : public content::WebContentsObserver,
public content::NotificationObserver,
public SafeBrowsingService::Observer {
public:
@@ -40,11 +38,11 @@ class ClientSideDetectionHost : public TabContentsObserver,
static ClientSideDetectionHost* Create(TabContents* tab);
virtual ~ClientSideDetectionHost();
- // From TabContentsObserver.
+ // From content::WebContentsObserver.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
- // From TabContentsObserver. If we navigate away we cancel all pending
- // callbacks that could show an interstitial, and check to see whether
+ // From content::WebContentsObserver. If we navigate away we cancel all
+ // pending callbacks that could show an interstitial, and check to see whether
// we should classify the new URL.
virtual void DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
@@ -56,7 +54,7 @@ class ClientSideDetectionHost : public TabContentsObserver,
const SafeBrowsingService::UnsafeResource& resource) OVERRIDE;
protected:
- // From TabContentsObserver. Called when the TabContents is being destroyed.
+ // From content::WebContentsObserver.
virtual void TabContentsDestroyed(TabContents* tab) OVERRIDE;
private:
diff --git a/chrome/browser/safe_browsing/malware_details.cc b/chrome/browser/safe_browsing/malware_details.cc
index 95f7de5..d1dc772 100644
--- a/chrome/browser/safe_browsing/malware_details.cc
+++ b/chrome/browser/safe_browsing/malware_details.cc
@@ -74,7 +74,7 @@ MalwareDetails::MalwareDetails(
SafeBrowsingService* sb_service,
TabContents* tab_contents,
const SafeBrowsingService::UnsafeResource& resource)
- : TabContentsObserver(tab_contents),
+ : content::WebContentsObserver(tab_contents),
profile_(Profile::FromBrowserContext(tab_contents->GetBrowserContext())),
request_context_getter_(profile_->GetRequestContext()),
sb_service_(sb_service),
diff --git a/chrome/browser/safe_browsing/malware_details.h b/chrome/browser/safe_browsing/malware_details.h
index b122443..8a40109 100644
--- a/chrome/browser/safe_browsing/malware_details.h
+++ b/chrome/browser/safe_browsing/malware_details.h
@@ -21,17 +21,15 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/safe_browsing/report.pb.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/web_contents_observer.h"
#include "net/base/completion_callback.h"
-class TabContents;
-struct SafeBrowsingHostMsg_MalwareDOMDetails_Node;
-
class MalwareDetailsCacheCollector;
class MalwareDetailsRedirectsCollector;
class MalwareDetailsFactory;
class Profile;
+struct SafeBrowsingHostMsg_MalwareDOMDetails_Node;
namespace safe_browsing {
// Maps a URL to its Resource.
@@ -41,7 +39,7 @@ typedef base::hash_map<
}
class MalwareDetails : public base::RefCountedThreadSafe<MalwareDetails>,
- public TabContentsObserver {
+ public content::WebContentsObserver {
public:
// Constructs a new MalwareDetails instance, using the factory.
static MalwareDetails* NewMalwareDetails(
@@ -66,7 +64,7 @@ class MalwareDetails : public base::RefCountedThreadSafe<MalwareDetails>,
void OnRedirectionCollectionReady();
- // TabContentsObserver implementation.
+ // content::WebContentsObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
protected:
diff --git a/chrome/browser/sessions/restore_tab_helper.cc b/chrome/browser/sessions/restore_tab_helper.cc
index d7b4d46..a2a3d67 100644
--- a/chrome/browser/sessions/restore_tab_helper.cc
+++ b/chrome/browser/sessions/restore_tab_helper.cc
@@ -12,7 +12,7 @@
#include "content/public/browser/notification_types.h"
RestoreTabHelper::RestoreTabHelper(TabContents* contents)
- : TabContentsObserver(contents),
+ : content::WebContentsObserver(contents),
contents_(contents) {
}
diff --git a/chrome/browser/sessions/restore_tab_helper.h b/chrome/browser/sessions/restore_tab_helper.h
index 90fa69c..d656685 100644
--- a/chrome/browser/sessions/restore_tab_helper.h
+++ b/chrome/browser/sessions/restore_tab_helper.h
@@ -8,13 +8,11 @@
#include "base/basictypes.h"
#include "chrome/browser/sessions/session_id.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
-
-class TabContents;
+#include "content/public/browser/web_contents_observer.h"
// This class keeps the extension API's windowID up-to-date with the current
// window of the tab.
-class RestoreTabHelper : public TabContentsObserver {
+class RestoreTabHelper : public content::WebContentsObserver {
public:
explicit RestoreTabHelper(TabContents* contents);
virtual ~RestoreTabHelper();
@@ -26,7 +24,7 @@ class RestoreTabHelper : public TabContentsObserver {
void SetWindowID(const SessionID& id);
const SessionID& window_id() const { return window_id_; }
- // TabContentsObserver:
+ // content::WebContentsObserver:
virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE;
private:
diff --git a/chrome/browser/tab_contents/background_contents.cc b/chrome/browser/tab_contents/background_contents.cc
index 134bfd5..191a81d 100644
--- a/chrome/browser/tab_contents/background_contents.cc
+++ b/chrome/browser/tab_contents/background_contents.cc
@@ -35,7 +35,7 @@ BackgroundContents::BackgroundContents(SiteInstance* site_instance,
profile_, site_instance, routing_id, NULL, NULL));
tab_contents_->SetViewType(chrome::VIEW_TYPE_BACKGROUND_CONTENTS);
tab_contents_->SetDelegate(this);
- TabContentsObserver::Observe(tab_contents_.get());
+ content::WebContentsObserver::Observe(tab_contents_.get());
// Close ourselves when the application is shutting down.
registrar_.Add(this, content::NOTIFICATION_APP_TERMINATING,
diff --git a/chrome/browser/tab_contents/background_contents.h b/chrome/browser/tab_contents/background_contents.h
index d494254..d572602 100644
--- a/chrome/browser/tab_contents/background_contents.h
+++ b/chrome/browser/tab_contents/background_contents.h
@@ -9,10 +9,10 @@
#include <string>
#include "base/memory/scoped_ptr.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_contents_delegate.h"
+#include "content/public/browser/web_contents_observer.h"
#include "webkit/glue/window_open_disposition.h"
class Profile;
@@ -20,7 +20,7 @@ class Profile;
// This class consumes TabContents. It can host a renderer, but does not
// have any visible display.
class BackgroundContents : public content::WebContentsDelegate,
- public TabContentsObserver,
+ public content::WebContentsObserver,
public content::NotificationObserver {
public:
class Delegate {
@@ -55,7 +55,7 @@ class BackgroundContents : public content::WebContentsDelegate,
const gfx::Rect& initial_pos,
bool user_gesture) OVERRIDE;
- // TabContentsObserver implementation:
+ // content::WebContentsObserver implementation:
virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE;
// content::NotificationObserver
diff --git a/chrome/browser/tab_contents/thumbnail_generator.cc b/chrome/browser/tab_contents/thumbnail_generator.cc
index 61d2cef..b9c6eea 100644
--- a/chrome/browser/tab_contents/thumbnail_generator.cc
+++ b/chrome/browser/tab_contents/thumbnail_generator.cc
@@ -145,7 +145,7 @@ ThumbnailGenerator::~ThumbnailGenerator() {
}
void ThumbnailGenerator::StartThumbnailing(TabContents* tab_contents) {
- TabContentsObserver::Observe(tab_contents);
+ content::WebContentsObserver::Observe(tab_contents);
if (registrar_.IsEmpty()) {
// Even though we deal in RenderWidgetHosts, we only care about its
diff --git a/chrome/browser/tab_contents/thumbnail_generator.h b/chrome/browser/tab_contents/thumbnail_generator.h
index dc41c3f..79cb19c 100644
--- a/chrome/browser/tab_contents/thumbnail_generator.h
+++ b/chrome/browser/tab_contents/thumbnail_generator.h
@@ -15,22 +15,21 @@
#include "base/memory/linked_ptr.h"
#include "base/timer.h"
#include "content/browser/renderer_host/backing_store.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/web_contents_observer.h"
class GURL;
class Profile;
class RenderWidgetHost;
class SkBitmap;
-class TabContents;
namespace history {
class TopSites;
}
class ThumbnailGenerator : public content::NotificationObserver,
- public TabContentsObserver {
+ public content::WebContentsObserver {
public:
typedef base::Callback<void(const SkBitmap&)> ThumbnailReadyCallback;
// The result of clipping. This can be used to determine if the
@@ -123,7 +122,7 @@ class ThumbnailGenerator : public content::NotificationObserver,
history::TopSites* top_sites,
const GURL& url);
- // TabContentsObserver overrides.
+ // content::WebContentsObserver overrides.
virtual void DidStartLoading() OVERRIDE;
virtual void StopNavigation() OVERRIDE;
diff --git a/chrome/browser/tabs/tab_finder.cc b/chrome/browser/tabs/tab_finder.cc
index 655de82..f923178 100644
--- a/chrome/browser/tabs/tab_finder.cc
+++ b/chrome/browser/tabs/tab_finder.cc
@@ -16,22 +16,24 @@
#include "chrome/common/chrome_switches.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/frame_navigate_params.h"
#include "content/public/common/page_transition_types.h"
-class TabFinder::TabContentsObserverImpl : public TabContentsObserver {
+class TabFinder::WebContentsObserverImpl : public content::WebContentsObserver {
public:
- TabContentsObserverImpl(TabContents* tab, TabFinder* finder);
- virtual ~TabContentsObserverImpl();
+ WebContentsObserverImpl(TabContents* tab, TabFinder* finder);
+ virtual ~WebContentsObserverImpl();
- TabContents* tab_contents() { return TabContentsObserver::tab_contents(); }
+ TabContents* tab_contents() {
+ return content::WebContentsObserver::tab_contents();
+ }
- // TabContentsObserver overrides:
+ // content::WebContentsObserver overrides:
virtual void DidNavigateAnyFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) OVERRIDE;
@@ -40,26 +42,26 @@ class TabFinder::TabContentsObserverImpl : public TabContentsObserver {
private:
TabFinder* finder_;
- DISALLOW_COPY_AND_ASSIGN(TabContentsObserverImpl);
+ DISALLOW_COPY_AND_ASSIGN(WebContentsObserverImpl);
};
-TabFinder::TabContentsObserverImpl::TabContentsObserverImpl(
+TabFinder::WebContentsObserverImpl::WebContentsObserverImpl(
TabContents* tab,
TabFinder* finder)
- : TabContentsObserver(tab),
+ : content::WebContentsObserver(tab),
finder_(finder) {
}
-TabFinder::TabContentsObserverImpl::~TabContentsObserverImpl() {
+TabFinder::WebContentsObserverImpl::~WebContentsObserverImpl() {
}
-void TabFinder::TabContentsObserverImpl::DidNavigateAnyFrame(
+void TabFinder::WebContentsObserverImpl::DidNavigateAnyFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) {
finder_->DidNavigateAnyFrame(tab_contents(), details, params);
}
-void TabFinder::TabContentsObserverImpl::TabContentsDestroyed(
+void TabFinder::WebContentsObserverImpl::TabContentsDestroyed(
TabContents* tab) {
finder_->TabDestroyed(this);
delete this;
@@ -166,19 +168,19 @@ TabContents* TabFinder::FindTabInBrowser(Browser* browser, const GURL& url) {
}
void TabFinder::TrackTab(TabContents* tab) {
- for (TabContentsObservers::const_iterator i = tab_contents_observers_.begin();
+ for (WebContentsObservers::const_iterator i = tab_contents_observers_.begin();
i != tab_contents_observers_.end(); ++i) {
if ((*i)->tab_contents() == tab) {
// Already tracking the tab.
return;
}
}
- TabContentsObserverImpl* observer = new TabContentsObserverImpl(tab, this);
+ WebContentsObserverImpl* observer = new WebContentsObserverImpl(tab, this);
tab_contents_observers_.insert(observer);
FetchRedirectStart(tab);
}
-void TabFinder::TabDestroyed(TabContentsObserverImpl* observer) {
+void TabFinder::TabDestroyed(WebContentsObserverImpl* observer) {
DCHECK_GT(tab_contents_observers_.count(observer), 0u);
tab_contents_observers_.erase(observer);
}
diff --git a/chrome/browser/tabs/tab_finder.h b/chrome/browser/tabs/tab_finder.h
index 32b0f50..b89ceb3 100644
--- a/chrome/browser/tabs/tab_finder.h
+++ b/chrome/browser/tabs/tab_finder.h
@@ -53,15 +53,15 @@ class TabFinder : public content::NotificationObserver {
private:
friend struct DefaultSingletonTraits<TabFinder>;
- class TabContentsObserverImpl;
+ class WebContentsObserverImpl;
typedef std::map<TabContents*, GURL> TabContentsToURLMap;
- typedef std::set<TabContentsObserverImpl*> TabContentsObservers;
+ typedef std::set<WebContentsObserverImpl*> WebContentsObservers;
TabFinder();
virtual ~TabFinder();
- // Forwarded from TabContentsObserverImpl.
+ // Forwarded from WebContentsObserverImpl.
void DidNavigateAnyFrame(
TabContents* source,
const content::LoadCommittedDetails& details,
@@ -76,11 +76,11 @@ class TabFinder : public content::NotificationObserver {
TabContents* FindTabInBrowser(Browser* browser, const GURL& url);
// If we're not currently tracking |tab| this creates a
- // TabContentsObserverImpl to listen for navigations.
+ // WebContentsObserverImpl to listen for navigations.
void TrackTab(TabContents* tab);
// Invoked when a TabContents is being destroyed.
- void TabDestroyed(TabContentsObserverImpl* observer);
+ void TabDestroyed(WebContentsObserverImpl* observer);
// Cancels any pending requests for the specified tabs redirect chain.
void CancelRequestsFor(TabContents* tab_contents);
@@ -102,7 +102,7 @@ class TabFinder : public content::NotificationObserver {
content::NotificationRegistrar registrar_;
- TabContentsObservers tab_contents_observers_;
+ WebContentsObservers tab_contents_observers_;
DISALLOW_COPY_AND_ASSIGN(TabFinder);
};
diff --git a/chrome/browser/translate/translate_tab_helper.cc b/chrome/browser/translate/translate_tab_helper.cc
index dc00597..956f811 100644
--- a/chrome/browser/translate/translate_tab_helper.cc
+++ b/chrome/browser/translate/translate_tab_helper.cc
@@ -11,7 +11,7 @@
#include "content/public/browser/notification_service.h"
TranslateTabHelper::TranslateTabHelper(TabContents* tab_contents)
- : TabContentsObserver(tab_contents),
+ : content::WebContentsObserver(tab_contents),
language_state_(&tab_contents->GetController()) {
}
diff --git a/chrome/browser/translate/translate_tab_helper.h b/chrome/browser/translate/translate_tab_helper.h
index 86e6d7a..c6abd4b 100644
--- a/chrome/browser/translate/translate_tab_helper.h
+++ b/chrome/browser/translate/translate_tab_helper.h
@@ -8,9 +8,9 @@
#include "chrome/browser/tab_contents/language_state.h"
#include "chrome/common/translate_errors.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "content/public/browser/web_contents_observer.h"
-class TranslateTabHelper : public TabContentsObserver {
+class TranslateTabHelper : public content::WebContentsObserver {
public:
explicit TranslateTabHelper(TabContents* tab_contents);
virtual ~TranslateTabHelper();
@@ -18,7 +18,7 @@ class TranslateTabHelper : public TabContentsObserver {
LanguageState& language_state() { return language_state_; }
private:
- // TabContentsObserver implementation.
+ // content::WebContentsObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void DidNavigateAnyFrame(
const content::LoadCommittedDetails& details,
diff --git a/chrome/browser/ui/alternate_error_tab_observer.cc b/chrome/browser/ui/alternate_error_tab_observer.cc
index dbd8603..efd7d12 100644
--- a/chrome/browser/ui/alternate_error_tab_observer.cc
+++ b/chrome/browser/ui/alternate_error_tab_observer.cc
@@ -16,7 +16,7 @@
AlternateErrorPageTabObserver::AlternateErrorPageTabObserver(
TabContentsWrapper* wrapper)
- : TabContentsObserver(wrapper->tab_contents()),
+ : content::WebContentsObserver(wrapper->tab_contents()),
wrapper_(wrapper) {
PrefService* prefs = wrapper_->profile()->GetPrefs();
if (prefs) {
@@ -39,7 +39,7 @@ void AlternateErrorPageTabObserver::RegisterUserPrefs(PrefService* prefs) {
}
////////////////////////////////////////////////////////////////////////////////
-// TabContentsObserver overrides
+// WebContentsObserver overrides
void AlternateErrorPageTabObserver::RenderViewCreated(
RenderViewHost* render_view_host) {
diff --git a/chrome/browser/ui/alternate_error_tab_observer.h b/chrome/browser/ui/alternate_error_tab_observer.h
index 4431a28..fe5ecad 100644
--- a/chrome/browser/ui/alternate_error_tab_observer.h
+++ b/chrome/browser/ui/alternate_error_tab_observer.h
@@ -7,13 +7,13 @@
#pragma once
#include "chrome/browser/prefs/pref_change_registrar.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/web_contents_observer.h"
class TabContentsWrapper;
// Per-tab class to implement alternate error page functionality.
-class AlternateErrorPageTabObserver : public TabContentsObserver,
+class AlternateErrorPageTabObserver : public content::WebContentsObserver,
public content::NotificationObserver {
public:
explicit AlternateErrorPageTabObserver(TabContentsWrapper* wrapper);
@@ -22,7 +22,7 @@ class AlternateErrorPageTabObserver : public TabContentsObserver,
static void RegisterUserPrefs(PrefService* prefs);
private:
- // TabContentsObserver overrides:
+ // content::WebContentsObserver overrides:
virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE;
// content::NotificationObserver overrides:
diff --git a/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc b/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc
index aed0954..208f8f9 100644
--- a/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc
+++ b/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc
@@ -16,7 +16,7 @@
BlockedContentTabHelper::BlockedContentTabHelper(
TabContentsWrapper* tab_contents)
- : TabContentsObserver(tab_contents->tab_contents()),
+ : content::WebContentsObserver(tab_contents->tab_contents()),
blocked_contents_(new BlockedContentContainer(tab_contents)),
all_contents_blocked_(false),
tab_contents_wrapper_(tab_contents),
diff --git a/chrome/browser/ui/blocked_content/blocked_content_tab_helper.h b/chrome/browser/ui/blocked_content/blocked_content_tab_helper.h
index 1b447e8e..dd7ae57 100644
--- a/chrome/browser/ui/blocked_content/blocked_content_tab_helper.h
+++ b/chrome/browser/ui/blocked_content/blocked_content_tab_helper.h
@@ -8,8 +8,8 @@
#include "chrome/browser/ui/find_bar/find_bar_controller.h"
#include "chrome/browser/ui/find_bar/find_notification_details.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/web_contents_observer.h"
#include "webkit/glue/window_open_disposition.h"
class BlockedContentContainer;
@@ -17,7 +17,7 @@ class BlockedContentTabHelperDelegate;
class TabContentsWrapper;
// Per-tab class to manage blocked popups.
-class BlockedContentTabHelper : public TabContentsObserver {
+class BlockedContentTabHelper : public content::WebContentsObserver {
public:
explicit BlockedContentTabHelper(TabContentsWrapper* tab_contents);
virtual ~BlockedContentTabHelper();
@@ -55,7 +55,7 @@ class BlockedContentTabHelper : public TabContentsObserver {
void GetBlockedContents(
std::vector<TabContentsWrapper*>* blocked_contents) const;
- // TabContentsObserver overrides:
+ // content::WebContentsObserver overrides:
virtual void DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) OVERRIDE;
diff --git a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
index 2754c49..1ced986 100644
--- a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
@@ -24,7 +24,7 @@ bool CanShowBookmarkBar(WebUI* ui) {
} // namespace
BookmarkTabHelper::BookmarkTabHelper(TabContentsWrapper* tab_contents)
- : TabContentsObserver(tab_contents->tab_contents()),
+ : content::WebContentsObserver(tab_contents->tab_contents()),
is_starred_(false),
tab_contents_wrapper_(tab_contents),
delegate_(NULL),
diff --git a/chrome/browser/ui/bookmarks/bookmark_tab_helper.h b/chrome/browser/ui/bookmarks/bookmark_tab_helper.h
index 800ae4c..c165cc7 100644
--- a/chrome/browser/ui/bookmarks/bookmark_tab_helper.h
+++ b/chrome/browser/ui/bookmarks/bookmark_tab_helper.h
@@ -6,9 +6,9 @@
#define CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_TAB_HELPER_H_
#pragma once
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/web_contents_observer.h"
class BookmarkTabHelperDelegate;
class TabContentsWrapper;
@@ -16,7 +16,7 @@ struct BookmarkNodeData;
// Per-tab class to manage bookmarks.
class BookmarkTabHelper : public content::NotificationObserver,
- public TabContentsObserver {
+ public content::WebContentsObserver {
public:
// BookmarkDrag --------------------------------------------------------------
// Interface for forwarding bookmark drag and drop to extenstions.
@@ -42,7 +42,7 @@ class BookmarkTabHelper : public content::NotificationObserver,
// Returns true if the bookmark bar should be shown detached.
bool ShouldShowBookmarkBar();
- // TabContentsObserver overrides:
+ // content::WebContentsObserver overrides:
virtual void DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) OVERRIDE;
diff --git a/chrome/browser/ui/cocoa/hung_renderer_controller.h b/chrome/browser/ui/cocoa/hung_renderer_controller.h
index 7d4fd1c..250099a 100644
--- a/chrome/browser/ui/cocoa/hung_renderer_controller.h
+++ b/chrome/browser/ui/cocoa/hung_renderer_controller.h
@@ -26,7 +26,7 @@
@class MultiKeyEquivalentButton;
class TabContents;
-class TabContentsObserverBridge;
+class WebContentsObserverBridge;
@interface HungRendererController : NSWindowController<NSTableViewDataSource> {
@private
@@ -41,7 +41,7 @@ class TabContentsObserverBridge;
TabContents* hungContents_;
// Observes |hungContents_| in case it closes while the panel is up.
- scoped_ptr<TabContentsObserverBridge> hungContentsObserver_;
+ scoped_ptr<WebContentsObserverBridge> hungContentsObserver_;
// Backing data for |tableView_|. Titles of each TabContents that
// shares a renderer process with |hungContents_|.
diff --git a/chrome/browser/ui/cocoa/hung_renderer_controller.mm b/chrome/browser/ui/cocoa/hung_renderer_controller.mm
index 5a2147e..681cf09c 100644
--- a/chrome/browser/ui/cocoa/hung_renderer_controller.mm
+++ b/chrome/browser/ui/cocoa/hung_renderer_controller.mm
@@ -37,16 +37,16 @@ namespace {
HungRendererController* g_instance = NULL;
} // namespace
-class TabContentsObserverBridge : public TabContentsObserver {
+class WebContentsObserverBridge : public content::WebContentsObserver {
public:
- TabContentsObserverBridge(TabContents* tab_contents,
+ WebContentsObserverBridge(TabContents* tab_contents,
HungRendererController* controller)
- : TabContentsObserver(tab_contents),
+ : content::WebContentsObserver(tab_contents),
controller_(controller) {
}
protected:
- // TabContentsObserver overrides:
+ // WebContentsObserver overrides:
virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE {
[controller_ renderViewGone];
}
@@ -57,7 +57,7 @@ class TabContentsObserverBridge : public TabContentsObserver {
private:
HungRendererController* controller_; // weak
- DISALLOW_COPY_AND_ASSIGN(TabContentsObserverBridge);
+ DISALLOW_COPY_AND_ASSIGN(WebContentsObserverBridge);
};
@implementation HungRendererController
@@ -166,7 +166,7 @@ class TabContentsObserverBridge : public TabContentsObserver {
- (void)showForTabContents:(TabContents*)contents {
DCHECK(contents);
hungContents_ = contents;
- hungContentsObserver_.reset(new TabContentsObserverBridge(contents, self));
+ hungContentsObserver_.reset(new WebContentsObserverBridge(contents, self));
scoped_nsobject<NSMutableArray> titles([[NSMutableArray alloc] init]);
scoped_nsobject<NSMutableArray> favicons([[NSMutableArray alloc] init]);
for (TabContentsIterator it; !it.done(); ++it) {
diff --git a/chrome/browser/ui/constrained_window_tab_helper.cc b/chrome/browser/ui/constrained_window_tab_helper.cc
index 49a438d..bab46d5 100644
--- a/chrome/browser/ui/constrained_window_tab_helper.cc
+++ b/chrome/browser/ui/constrained_window_tab_helper.cc
@@ -16,7 +16,7 @@
ConstrainedWindowTabHelper::ConstrainedWindowTabHelper(
TabContentsWrapper* wrapper)
- : TabContentsObserver(wrapper->tab_contents()),
+ : content::WebContentsObserver(wrapper->tab_contents()),
wrapper_(wrapper),
delegate_(NULL) {
}
diff --git a/chrome/browser/ui/constrained_window_tab_helper.h b/chrome/browser/ui/constrained_window_tab_helper.h
index c65cd94..d5682fd 100644
--- a/chrome/browser/ui/constrained_window_tab_helper.h
+++ b/chrome/browser/ui/constrained_window_tab_helper.h
@@ -8,14 +8,14 @@
#include <deque>
-#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "content/public/browser/web_contents_observer.h"
class ConstrainedWindow;
class ConstrainedWindowTabHelperDelegate;
class TabContentsWrapper;
// Per-tab class to manage constrained windows.
-class ConstrainedWindowTabHelper : public TabContentsObserver {
+class ConstrainedWindowTabHelper : public content::WebContentsObserver {
public:
explicit ConstrainedWindowTabHelper(TabContentsWrapper* tab_contents);
virtual ~ConstrainedWindowTabHelper();
@@ -52,7 +52,7 @@ class ConstrainedWindowTabHelper : public TabContentsObserver {
}
private:
- // Overridden from TabContentsObserver:
+ // Overridden from content::WebContentsObserver:
virtual void DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) OVERRIDE;
diff --git a/chrome/browser/ui/find_bar/find_tab_helper.cc b/chrome/browser/ui/find_bar/find_tab_helper.cc
index a401f3f..39ba133 100644
--- a/chrome/browser/ui/find_bar/find_tab_helper.cc
+++ b/chrome/browser/ui/find_bar/find_tab_helper.cc
@@ -21,7 +21,7 @@ using WebKit::WebFindOptions;
int FindTabHelper::find_request_id_counter_ = -1;
FindTabHelper::FindTabHelper(TabContents* tab_contents)
- : TabContentsObserver(tab_contents),
+ : content::WebContentsObserver(tab_contents),
find_ui_active_(false),
find_op_aborted_(false),
current_find_request_id_(find_request_id_counter_++),
diff --git a/chrome/browser/ui/find_bar/find_tab_helper.h b/chrome/browser/ui/find_bar/find_tab_helper.h
index 5e26c31..f8bf5b3 100644
--- a/chrome/browser/ui/find_bar/find_tab_helper.h
+++ b/chrome/browser/ui/find_bar/find_tab_helper.h
@@ -8,10 +8,10 @@
#include "chrome/browser/ui/find_bar/find_bar_controller.h"
#include "chrome/browser/ui/find_bar/find_notification_details.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "content/public/browser/web_contents_observer.h"
// Per-tab find manager. Handles dealing with the life cycle of find sessions.
-class FindTabHelper : public TabContentsObserver {
+class FindTabHelper : public content::WebContentsObserver {
public:
explicit FindTabHelper(TabContents* tab_contents);
virtual ~FindTabHelper();
diff --git a/chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc b/chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc
index 306edcd..1a09a7a 100644
--- a/chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc
+++ b/chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc
@@ -41,15 +41,15 @@ class HungRendererDialogGtk {
private:
// Dismiss the panel if |contents_| is closed or its renderer exits.
- class TabContentsObserverImpl : public TabContentsObserver {
+ class WebContentsObserverImpl : public content::WebContentsObserver {
public:
- TabContentsObserverImpl(HungRendererDialogGtk* dialog,
+ WebContentsObserverImpl(HungRendererDialogGtk* dialog,
TabContents* contents)
- : TabContentsObserver(contents),
+ : content::WebContentsObserver(contents),
dialog_(dialog) {
}
- // TabContentsObserver overrides:
+ // content::WebContentsObserver overrides:
virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE {
dialog_->Hide();
}
@@ -60,7 +60,7 @@ class HungRendererDialogGtk {
private:
HungRendererDialogGtk* dialog_; // weak
- DISALLOW_COPY_AND_ASSIGN(TabContentsObserverImpl);
+ DISALLOW_COPY_AND_ASSIGN(WebContentsObserverImpl);
};
// The GtkTreeView column ids.
@@ -78,7 +78,7 @@ class HungRendererDialogGtk {
GtkDialog* dialog_;
GtkListStore* model_;
TabContents* contents_;
- scoped_ptr<TabContentsObserverImpl> contents_observer_;
+ scoped_ptr<WebContentsObserverImpl> contents_observer_;
DISALLOW_COPY_AND_ASSIGN(HungRendererDialogGtk);
};
@@ -176,7 +176,7 @@ void HungRendererDialogGtk::Init() {
void HungRendererDialogGtk::ShowForTabContents(TabContents* hung_contents) {
DCHECK(hung_contents && dialog_);
contents_ = hung_contents;
- contents_observer_.reset(new TabContentsObserverImpl(this, contents_));
+ contents_observer_.reset(new WebContentsObserverImpl(this, contents_));
gtk_list_store_clear(model_);
GtkTreeIter tree_iter;
diff --git a/chrome/browser/ui/pdf/pdf_tab_observer.cc b/chrome/browser/ui/pdf/pdf_tab_observer.cc
index 276d783..60ff1b4 100644
--- a/chrome/browser/ui/pdf/pdf_tab_observer.cc
+++ b/chrome/browser/ui/pdf/pdf_tab_observer.cc
@@ -9,7 +9,7 @@
#include "chrome/common/render_messages.h"
PDFTabObserver::PDFTabObserver(TabContentsWrapper* wrapper)
- : TabContentsObserver(wrapper->tab_contents()),
+ : content::WebContentsObserver(wrapper->tab_contents()),
wrapper_(wrapper) {
}
@@ -17,7 +17,7 @@ PDFTabObserver::~PDFTabObserver() {
}
////////////////////////////////////////////////////////////////////////////////
-// TabContentsObserver overrides
+// WebContentsObserver overrides
bool PDFTabObserver::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
diff --git a/chrome/browser/ui/pdf/pdf_tab_observer.h b/chrome/browser/ui/pdf/pdf_tab_observer.h
index 0ee2012..bde820c 100644
--- a/chrome/browser/ui/pdf/pdf_tab_observer.h
+++ b/chrome/browser/ui/pdf/pdf_tab_observer.h
@@ -6,18 +6,18 @@
#define CHROME_BROWSER_UI_PDF_PDF_TAB_OBSERVER_H_
#pragma once
-#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "content/public/browser/web_contents_observer.h"
class TabContentsWrapper;
// Per-tab class to handle PDF messages.
-class PDFTabObserver : public TabContentsObserver {
+class PDFTabObserver : public content::WebContentsObserver {
public:
explicit PDFTabObserver(TabContentsWrapper* wrapper);
virtual ~PDFTabObserver();
private:
- // TabContentsObserver overrides:
+ // content::WebContentsObserver overrides:
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
// Internal helpers ----------------------------------------------------------
diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.cc b/chrome/browser/ui/prefs/prefs_tab_helper.cc
index 010ead9..e4020b9 100644
--- a/chrome/browser/ui/prefs/prefs_tab_helper.cc
+++ b/chrome/browser/ui/prefs/prefs_tab_helper.cc
@@ -211,7 +211,7 @@ const size_t kPerScriptFontDefaultsLength = arraysize(kPerScriptFontDefaults);
} // namespace
PrefsTabHelper::PrefsTabHelper(TabContents* contents)
- : TabContentsObserver(contents),
+ : content::WebContentsObserver(contents),
contents_(contents) {
PrefService* prefs = GetProfile()->GetPrefs();
pref_change_registrar_.Init(prefs);
diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.h b/chrome/browser/ui/prefs/prefs_tab_helper.h
index b2f8f71..7888149 100644
--- a/chrome/browser/ui/prefs/prefs_tab_helper.h
+++ b/chrome/browser/ui/prefs/prefs_tab_helper.h
@@ -7,16 +7,15 @@
#pragma once
#include "chrome/browser/prefs/pref_change_registrar.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/web_contents_observer.h"
class PrefService;
class Profile;
-class TabContents;
struct WebPreferences;
// Per-tab class to handle user preferences.
-class PrefsTabHelper : public TabContentsObserver,
+class PrefsTabHelper : public content::WebContentsObserver,
public content::NotificationObserver {
public:
explicit PrefsTabHelper(TabContents* contents);
@@ -30,11 +29,11 @@ class PrefsTabHelper : public TabContentsObserver,
// Update the RenderView's WebPreferences. Exposed as protected for testing.
virtual void UpdateWebPreferences();
- // TabContentsObserver overrides, exposed as protected for testing.
+ // content::WebContentsObserver overrides, exposed as protected for testing.
virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE;
private:
- // TabContentsObserver overrides:
+ // content::WebContentsObserver overrides:
virtual void TabContentsDestroyed(TabContents* tab) OVERRIDE;
// content::NotificationObserver overrides:
diff --git a/chrome/browser/ui/sad_tab_observer.cc b/chrome/browser/ui/sad_tab_observer.cc
index 3e32108..9052eb3 100644
--- a/chrome/browser/ui/sad_tab_observer.cc
+++ b/chrome/browser/ui/sad_tab_observer.cc
@@ -20,7 +20,7 @@
#endif
SadTabObserver::SadTabObserver(TabContents* tab_contents)
- : TabContentsObserver(tab_contents) {
+ : content::WebContentsObserver(tab_contents) {
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_CONNECTED,
content::Source<TabContents>(tab_contents));
}
diff --git a/chrome/browser/ui/sad_tab_observer.h b/chrome/browser/ui/sad_tab_observer.h
index ace1044..64fec0b 100644
--- a/chrome/browser/ui/sad_tab_observer.h
+++ b/chrome/browser/ui/sad_tab_observer.h
@@ -7,9 +7,9 @@
#pragma once
#include "base/memory/scoped_ptr.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/web_contents_observer.h"
#include "ui/gfx/native_widget_types.h"
#if defined(OS_MACOSX)
@@ -27,7 +27,7 @@ class SadTabGtk;
#endif
// Per-tab class to manage sad tab views.
-class SadTabObserver : public TabContentsObserver,
+class SadTabObserver : public content::WebContentsObserver,
public content::NotificationObserver {
public:
explicit SadTabObserver(TabContents* tab_contents);
@@ -43,7 +43,7 @@ class SadTabObserver : public TabContentsObserver,
// Platform specific function to determine if there is a current sad tab page.
bool HasSadTab();
- // Overridden from TabContentsObserver:
+ // Overridden from content::WebContentsObserver:
virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE;
// Overridden from content::NotificationObserver:
diff --git a/chrome/browser/ui/search_engines/search_engine_tab_helper.cc b/chrome/browser/ui/search_engines/search_engine_tab_helper.cc
index 07e61e9..68911ae 100644
--- a/chrome/browser/ui/search_engines/search_engine_tab_helper.cc
+++ b/chrome/browser/ui/search_engines/search_engine_tab_helper.cc
@@ -25,7 +25,7 @@ bool IsFormSubmit(const NavigationEntry* entry) {
} // namespace
SearchEngineTabHelper::SearchEngineTabHelper(TabContents* tab_contents)
- : TabContentsObserver(tab_contents) {
+ : content::WebContentsObserver(tab_contents) {
DCHECK(tab_contents);
}
diff --git a/chrome/browser/ui/search_engines/search_engine_tab_helper.h b/chrome/browser/ui/search_engines/search_engine_tab_helper.h
index a2ffb49..0cdbc3b 100644
--- a/chrome/browser/ui/search_engines/search_engine_tab_helper.h
+++ b/chrome/browser/ui/search_engines/search_engine_tab_helper.h
@@ -9,13 +9,13 @@
#include "chrome/browser/ui/find_bar/find_bar_controller.h"
#include "chrome/browser/ui/find_bar/find_notification_details.h"
#include "chrome/common/search_provider.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "content/public/browser/web_contents_observer.h"
class SearchEngineTabHelperDelegate;
// Per-tab search engine manager. Handles dealing search engine processing
// functionality.
-class SearchEngineTabHelper : public TabContentsObserver {
+class SearchEngineTabHelper : public content::WebContentsObserver {
public:
explicit SearchEngineTabHelper(TabContents* tab_contents);
virtual ~SearchEngineTabHelper();
@@ -23,7 +23,7 @@ class SearchEngineTabHelper : public TabContentsObserver {
SearchEngineTabHelperDelegate* delegate() const { return delegate_; }
void set_delegate(SearchEngineTabHelperDelegate* d) { delegate_ = d; }
- // TabContentsObserver overrides.
+ // content::WebContentsObserver overrides.
virtual void DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) OVERRIDE;
diff --git a/chrome/browser/ui/snapshot_tab_helper.cc b/chrome/browser/ui/snapshot_tab_helper.cc
index 0078d57..7f9e1b0 100644
--- a/chrome/browser/ui/snapshot_tab_helper.cc
+++ b/chrome/browser/ui/snapshot_tab_helper.cc
@@ -10,7 +10,7 @@
#include "content/public/browser/notification_service.h"
SnapshotTabHelper::SnapshotTabHelper(TabContentsWrapper* wrapper)
- : TabContentsObserver(wrapper->tab_contents()),
+ : content::WebContentsObserver(wrapper->tab_contents()),
wrapper_(wrapper) {
}
@@ -22,7 +22,7 @@ void SnapshotTabHelper::CaptureSnapshot() {
}
////////////////////////////////////////////////////////////////////////////////
-// TabContentsObserver overrides
+// WebContentsObserver overrides
bool SnapshotTabHelper::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
diff --git a/chrome/browser/ui/snapshot_tab_helper.h b/chrome/browser/ui/snapshot_tab_helper.h
index 2e343e5..dca4ebb 100644
--- a/chrome/browser/ui/snapshot_tab_helper.h
+++ b/chrome/browser/ui/snapshot_tab_helper.h
@@ -6,13 +6,13 @@
#define CHROME_BROWSER_UI_SNAPSHOT_TAB_HELPER_H_
#pragma once
-#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "content/public/browser/web_contents_observer.h"
class SkBitmap;
class TabContentsWrapper;
// Per-tab class to handle snapshot functionality.
-class SnapshotTabHelper : public TabContentsObserver {
+class SnapshotTabHelper : public content::WebContentsObserver {
public:
explicit SnapshotTabHelper(TabContentsWrapper* wrapper);
virtual ~SnapshotTabHelper();
@@ -21,7 +21,7 @@ class SnapshotTabHelper : public TabContentsObserver {
void CaptureSnapshot();
private:
- // TabContentsObserver overrides:
+ // content::WebContentsObserver overrides:
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
// Internal helpers ----------------------------------------------------------
diff --git a/chrome/browser/ui/tab_contents/core_tab_helper.cc b/chrome/browser/ui/tab_contents/core_tab_helper.cc
index 10ecac5..000df30 100644
--- a/chrome/browser/ui/tab_contents/core_tab_helper.cc
+++ b/chrome/browser/ui/tab_contents/core_tab_helper.cc
@@ -12,7 +12,7 @@
#include "ui/base/l10n/l10n_util.h"
CoreTabHelper::CoreTabHelper(TabContentsWrapper* wrapper)
- : TabContentsObserver(wrapper->tab_contents()),
+ : content::WebContentsObserver(wrapper->tab_contents()),
delegate_(NULL),
wrapper_(wrapper) {
}
@@ -74,7 +74,7 @@ string16 CoreTabHelper::GetStatusText() const {
}
////////////////////////////////////////////////////////////////////////////////
-// TabContentsObserver overrides
+// WebContentsObserver overrides
void CoreTabHelper::DidBecomeSelected() {
WebCacheManager::GetInstance()->ObserveActivity(
diff --git a/chrome/browser/ui/tab_contents/core_tab_helper.h b/chrome/browser/ui/tab_contents/core_tab_helper.h
index 23e25d0..cd37ccd 100644
--- a/chrome/browser/ui/tab_contents/core_tab_helper.h
+++ b/chrome/browser/ui/tab_contents/core_tab_helper.h
@@ -6,13 +6,13 @@
#define CHROME_BROWSER_UI_TAB_CONTENTS_CORE_TAB_HELPER_H_
#pragma once
-#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "content/public/browser/web_contents_observer.h"
class CoreTabHelperDelegate;
class TabContentsWrapper;
// Per-tab class to handle functionality that is core to the operation of tabs.
-class CoreTabHelper : public TabContentsObserver {
+class CoreTabHelper : public content::WebContentsObserver {
public:
explicit CoreTabHelper(TabContentsWrapper* wrapper);
virtual ~CoreTabHelper();
@@ -27,7 +27,7 @@ class CoreTabHelper : public TabContentsObserver {
string16 GetStatusText() const;
private:
- // TabContentsObserver overrides:
+ // content::WebContentsObserver overrides:
virtual void DidBecomeSelected() OVERRIDE;
// Delegate for notifying our owner about stuff. Not owned by us.
diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
index 7705c3f..0135aa4 100644
--- a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
+++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
@@ -58,7 +58,7 @@ static base::LazyInstance<base::PropertyAccessor<TabContentsWrapper*> >
// TabContentsWrapper, public:
TabContentsWrapper::TabContentsWrapper(TabContents* contents)
- : TabContentsObserver(contents),
+ : content::WebContentsObserver(contents),
in_destructor_(false),
tab_contents_(contents) {
DCHECK(contents);
@@ -176,7 +176,7 @@ Profile* TabContentsWrapper::profile() const {
}
////////////////////////////////////////////////////////////////////////////////
-// TabContentsObserver overrides
+// WebContentsObserver overrides
void TabContentsWrapper::TabContentsDestroyed(TabContents* tab) {
// Destruction of the TabContents should only be done by us from our
diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper.h b/chrome/browser/ui/tab_contents/tab_contents_wrapper.h
index 08345c5..0f9813c 100644
--- a/chrome/browser/ui/tab_contents/tab_contents_wrapper.h
+++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper.h
@@ -14,7 +14,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/property_bag.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "content/public/browser/web_contents_observer.h"
class AlternateErrorPageTabObserver;
class AutocompleteHistoryManager;
@@ -52,10 +52,6 @@ class ThumbnailGenerator;
class TranslateTabHelper;
class WebIntentPickerController;
-namespace IPC {
-class Message;
-}
-
namespace prerender {
class PrerenderTabHelper;
}
@@ -76,7 +72,7 @@ class SafeBrowsingTabObserver;
// TODO(avi): 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 WebContents; <http://crbug.com/105875>.
-class TabContentsWrapper : public TabContentsObserver {
+class TabContentsWrapper : public content::WebContentsObserver {
public:
// Takes ownership of |contents|, which must be heap-allocated (as it lives
// in a scoped_ptr) and can not be NULL.
@@ -190,7 +186,7 @@ class TabContentsWrapper : public TabContentsObserver {
// Overrides -----------------------------------------------------------------
- // TabContentsObserver overrides:
+ // content::WebContentsObserver overrides:
virtual void TabContentsDestroyed(TabContents* tab) OVERRIDE;
private:
diff --git a/chrome/browser/ui/views/hung_renderer_view.cc b/chrome/browser/ui/views/hung_renderer_view.cc
index 9c89b2e..bc78c3d 100644
--- a/chrome/browser/ui/views/hung_renderer_view.cc
+++ b/chrome/browser/ui/views/hung_renderer_view.cc
@@ -77,20 +77,20 @@ class HungPagesTableModel : public views::GroupTableModel {
private:
// Used to track a single TabContents. If the TabContents is destroyed
// TabDestroyed() is invoked on the model.
- class TabContentsObserverImpl : public TabContentsObserver {
+ class WebContentsObserverImpl : public content::WebContentsObserver {
public:
- TabContentsObserverImpl(HungPagesTableModel* model,
+ WebContentsObserverImpl(HungPagesTableModel* model,
TabContentsWrapper* tab);
TabContents* tab_contents() const {
- return TabContentsObserver::tab_contents();
+ return content::WebContentsObserver::tab_contents();
}
FaviconTabHelper* favicon_tab_helper() {
return tab_->favicon_tab_helper();
}
- // TabContentsObserver overrides:
+ // WebContentsObserver overrides:
virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE;
virtual void TabContentsDestroyed(TabContents* tab) OVERRIDE;
@@ -98,14 +98,14 @@ class HungPagesTableModel : public views::GroupTableModel {
HungPagesTableModel* model_;
TabContentsWrapper* tab_;
- DISALLOW_COPY_AND_ASSIGN(TabContentsObserverImpl);
+ DISALLOW_COPY_AND_ASSIGN(WebContentsObserverImpl);
};
// Invoked when a TabContents is destroyed. Cleans up |tab_observers_| and
// notifies the observer and delegate.
- void TabDestroyed(TabContentsObserverImpl* tab);
+ void TabDestroyed(WebContentsObserverImpl* tab);
- typedef ScopedVector<TabContentsObserverImpl> TabObservers;
+ typedef ScopedVector<WebContentsObserverImpl> TabObservers;
TabObservers tab_observers_;
ui::TableModelObserver* observer_;
@@ -142,12 +142,12 @@ void HungPagesTableModel::InitForTabContents(TabContents* hung_contents) {
TabContentsWrapper* hung_wrapper =
TabContentsWrapper::GetCurrentWrapperForContents(hung_contents);
if (hung_wrapper)
- tab_observers_.push_back(new TabContentsObserverImpl(this, hung_wrapper));
+ tab_observers_.push_back(new WebContentsObserverImpl(this, hung_wrapper));
for (TabContentsIterator it; !it.done(); ++it) {
if (*it != hung_wrapper &&
it->tab_contents()->GetRenderProcessHost() ==
hung_contents->GetRenderProcessHost())
- tab_observers_.push_back(new TabContentsObserverImpl(this, *it));
+ tab_observers_.push_back(new WebContentsObserverImpl(this, *it));
}
}
// The world is different.
@@ -190,7 +190,7 @@ void HungPagesTableModel::GetGroupRangeForItem(int item,
range->length = RowCount();
}
-void HungPagesTableModel::TabDestroyed(TabContentsObserverImpl* tab) {
+void HungPagesTableModel::TabDestroyed(WebContentsObserverImpl* tab) {
// Clean up tab_observers_ and notify our observer.
TabObservers::iterator i = std::find(
tab_observers_.begin(), tab_observers_.end(), tab);
@@ -205,20 +205,20 @@ void HungPagesTableModel::TabDestroyed(TabContentsObserverImpl* tab) {
// WARNING: we've likely been deleted.
}
-HungPagesTableModel::TabContentsObserverImpl::TabContentsObserverImpl(
+HungPagesTableModel::WebContentsObserverImpl::WebContentsObserverImpl(
HungPagesTableModel* model,
TabContentsWrapper* tab)
- : TabContentsObserver(tab->tab_contents()),
+ : content::WebContentsObserver(tab->tab_contents()),
model_(model),
tab_(tab) {
}
-void HungPagesTableModel::TabContentsObserverImpl::RenderViewGone(
+void HungPagesTableModel::WebContentsObserverImpl::RenderViewGone(
base::TerminationStatus status) {
model_->TabDestroyed(this);
}
-void HungPagesTableModel::TabContentsObserverImpl::TabContentsDestroyed(
+void HungPagesTableModel::WebContentsObserverImpl::TabContentsDestroyed(
TabContents* tab) {
model_->TabDestroyed(this);
}
diff --git a/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
index 6da4b32..b6ad7ad 100644
--- a/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
+++ b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
@@ -20,8 +20,8 @@
#include "chrome/common/extensions/extension_messages.h"
#include "chrome/common/url_constants.h"
#include "content/browser/site_instance.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/web_contents_observer.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/base/ime/text_input_type.h"
@@ -65,7 +65,7 @@ gfx::Rect GetKeyboardPosition(int height) {
class KeyboardWidget
: public views::Widget,
public ui::AnimationDelegate,
- public TabContentsObserver,
+ public content::WebContentsObserver,
public ExtensionFunctionDispatcher::Delegate,
#if defined(OS_CHROMEOS)
public chromeos::input_method::InputMethodManager::VirtualKeyboardObserver,
@@ -108,7 +108,7 @@ class KeyboardWidget
virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE;
- // Overridden from TabContentsObserver.
+ // Overridden from content::WebContentsObserver.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE;
void OnRequest(const ExtensionHostMsg_Request_Params& params);
@@ -199,7 +199,8 @@ KeyboardWidget::KeyboardWidget()
SetContentsView(dom_view_);
// Setup observer so the events from the keyboard can be handled.
- TabContentsObserver::Observe(dom_view_->dom_contents()->tab_contents());
+ content::WebContentsObserver::Observe(
+ dom_view_->dom_contents()->tab_contents());
// Initialize the animation.
animation_.reset(new ui::SlideAnimation(this));
diff --git a/chrome/browser/ui/webui/constrained_html_ui_browsertest.cc b/chrome/browser/ui/webui/constrained_html_ui_browsertest.cc
index e70534a..20f1dad 100644
--- a/chrome/browser/ui/webui/constrained_html_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/constrained_html_ui_browsertest.cc
@@ -14,14 +14,15 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "content/public/browser/web_contents_observer.h"
namespace {
-class ConstrainedHtmlDialogBrowserTestObserver : public TabContentsObserver {
+class ConstrainedHtmlDialogBrowserTestObserver
+ : public content::WebContentsObserver {
public:
explicit ConstrainedHtmlDialogBrowserTestObserver(TabContents* contents)
- : TabContentsObserver(contents),
+ : content::WebContentsObserver(contents),
tab_destroyed_(false) {
}
virtual ~ConstrainedHtmlDialogBrowserTestObserver() {}
diff --git a/chrome/browser/ui/webui/hung_renderer_dialog.cc b/chrome/browser/ui/webui/hung_renderer_dialog.cc
index 228c464..cfcbe1d 100644
--- a/chrome/browser/ui/webui/hung_renderer_dialog.cc
+++ b/chrome/browser/ui/webui/hung_renderer_dialog.cc
@@ -74,22 +74,22 @@ void HungRendererDialog::HideHungRendererDialog(TabContents* contents) {
}
////////////////////////////////////////////////////////////////////////////////
-// HungRendererDialog::TabContentsObserverImpl
+// HungRendererDialog::WebContentsObserverImpl
-HungRendererDialog::TabContentsObserverImpl::TabContentsObserverImpl(
+HungRendererDialog::WebContentsObserverImpl::WebContentsObserverImpl(
HungRendererDialog* dialog,
TabContents* contents)
- : TabContentsObserver(contents),
+ : content::WebContentsObserver(contents),
contents_(contents),
dialog_(dialog) {
}
-void HungRendererDialog::TabContentsObserverImpl::RenderViewGone(
+void HungRendererDialog::WebContentsObserverImpl::RenderViewGone(
base::TerminationStatus status) {
dialog_->HideDialog(contents_);
}
-void HungRendererDialog::TabContentsObserverImpl::TabContentsDestroyed(
+void HungRendererDialog::WebContentsObserverImpl::TabContentsDestroyed(
TabContents* tab) {
dialog_->HideDialog(contents_);
}
@@ -124,7 +124,7 @@ void HungRendererDialog::ShowDialog(TabContents* contents) {
DCHECK(browser);
handler_ = new HungRendererDialogHandler(contents_);
window_ = browser->BrowserShowHtmlDialog(this, NULL, STYLE_GENERIC);
- contents_observer_.reset(new TabContentsObserverImpl(this, contents_));
+ contents_observer_.reset(new WebContentsObserverImpl(this, contents_));
}
void HungRendererDialog::HideDialog(TabContents* contents) {
diff --git a/chrome/browser/ui/webui/hung_renderer_dialog.h b/chrome/browser/ui/webui/hung_renderer_dialog.h
index 9c042d2..f42b31c 100644
--- a/chrome/browser/ui/webui/hung_renderer_dialog.h
+++ b/chrome/browser/ui/webui/hung_renderer_dialog.h
@@ -13,10 +13,9 @@
#include "base/string16.h"
#include "base/values.h"
#include "chrome/browser/ui/webui/html_dialog_ui.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "content/public/browser/web_contents_observer.h"
#include "ui/gfx/native_widget_types.h"
-class TabContents;
class HungRendererDialogHandler;
class HungRendererDialog : private HtmlDialogUIDelegate {
@@ -28,12 +27,12 @@ class HungRendererDialog : private HtmlDialogUIDelegate {
static void HideHungRendererDialog(TabContents* contents);
private:
- class TabContentsObserverImpl : public TabContentsObserver {
+ class WebContentsObserverImpl : public content::WebContentsObserver {
public:
- TabContentsObserverImpl(HungRendererDialog* dialog,
+ WebContentsObserverImpl(HungRendererDialog* dialog,
TabContents* contents);
- // TabContentsObserver overrides:
+ // content::WebContentsObserver overrides:
virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE;
virtual void TabContentsDestroyed(TabContents* tab) OVERRIDE;
@@ -41,7 +40,7 @@ class HungRendererDialog : private HtmlDialogUIDelegate {
TabContents* contents_; // weak
HungRendererDialog* dialog_; // weak
- DISALLOW_COPY_AND_ASSIGN(TabContentsObserverImpl);
+ DISALLOW_COPY_AND_ASSIGN(WebContentsObserverImpl);
};
friend class HungRendererDialogUITest;
@@ -88,7 +87,7 @@ class HungRendererDialog : private HtmlDialogUIDelegate {
// The dialog window.
gfx::NativeWindow window_;
- scoped_ptr<TabContentsObserverImpl> contents_observer_;
+ scoped_ptr<WebContentsObserverImpl> contents_observer_;
DISALLOW_COPY_AND_ASSIGN(HungRendererDialog);
};