summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/aeropeek_manager.cc2
-rw-r--r--chrome/browser/chromeos/login/html_page_screen.cc2
-rw-r--r--chrome/browser/chromeos/login/registration_screen.cc4
-rw-r--r--chrome/browser/chromeos/login/registration_screen.h2
-rw-r--r--chrome/browser/chromeos/login/web_page_screen.cc2
-rw-r--r--chrome/browser/chromeos/login/web_page_screen.h6
-rw-r--r--chrome/browser/chromeos/login/web_page_view.cc10
-rw-r--r--chrome/browser/chromeos/login/web_page_view.h13
-rw-r--r--chrome/browser/chromeos/login/webui_login_view.h6
-rw-r--r--chrome/browser/chromeos/notifications/balloon_view_host.h2
-rw-r--r--chrome/browser/content_settings/tab_specific_content_settings.cc2
-rw-r--r--chrome/browser/debugger/devtools_window.cc4
-rw-r--r--chrome/browser/debugger/devtools_window.h6
-rw-r--r--chrome/browser/download/download_request_limiter.cc2
-rw-r--r--chrome/browser/extensions/extension_host.h6
-rw-r--r--chrome/browser/external_tab_container_win.cc2
-rw-r--r--chrome/browser/external_tab_container_win.h8
-rw-r--r--chrome/browser/favicon/favicon_tab_helper.cc2
-rw-r--r--chrome/browser/history/history_tab_helper.cc3
-rw-r--r--chrome/browser/instant/instant_loader.cc6
-rw-r--r--chrome/browser/instant/instant_unload_handler.cc6
-rw-r--r--chrome/browser/notifications/balloon_host.h6
-rw-r--r--chrome/browser/notifications/notification_options_menu_model.cc2
-rw-r--r--chrome/browser/plugin_observer.cc2
-rw-r--r--chrome/browser/prerender/prerender_contents.cc6
-rw-r--r--chrome/browser/prerender/prerender_manager.cc4
-rw-r--r--chrome/browser/sidebar/sidebar_container.h6
-rw-r--r--chrome/browser/tab_contents/background_contents.h6
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.cc6
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.h2
-rw-r--r--chrome/browser/tab_contents/tab_contents_view_gtk.cc4
-rw-r--r--chrome/browser/tab_contents/tab_contents_view_mac.mm2
-rw-r--r--chrome/browser/tabs/tab_strip_model.cc2
-rw-r--r--chrome/browser/tabs/tab_strip_model.h2
-rw-r--r--chrome/browser/ui/blocked_content/blocked_content_container.cc2
-rw-r--r--chrome/browser/ui/blocked_content/blocked_content_container.h6
-rw-r--r--chrome/browser/ui/browser.cc2
-rw-r--r--chrome/browser/ui/browser.h10
-rw-r--r--chrome/browser/ui/browser_navigator.cc2
-rw-r--r--chrome/browser/ui/cocoa/applescript/tab_applescript.mm2
-rw-r--r--chrome/browser/ui/content_settings/content_setting_bubble_model.cc2
-rw-r--r--chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/html_dialog_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/html_dialog_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/tabs/drag_data.cc4
-rw-r--r--chrome/browser/ui/gtk/tabs/drag_data.h15
-rw-r--r--chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc4
-rw-r--r--chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h6
-rw-r--r--chrome/browser/ui/gtk/web_intent_picker_gtk.h6
-rw-r--r--chrome/browser/ui/login/login_prompt_gtk.cc2
-rw-r--r--chrome/browser/ui/views/aura/app_list_window.h6
-rw-r--r--chrome/browser/ui/views/create_application_shortcut_view.cc2
-rw-r--r--chrome/browser/ui/views/html_dialog_view.cc2
-rw-r--r--chrome/browser/ui/views/html_dialog_view.h2
-rw-r--r--chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc2
-rw-r--r--chrome/browser/ui/views/tabs/default_tab_drag_controller.cc6
-rw-r--r--chrome/browser/ui/views/tabs/default_tab_drag_controller.h15
-rw-r--r--chrome/browser/ui/webui/history_ui.cc2
-rw-r--r--chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h16
-rw-r--r--chrome/browser/ui/webui/options/options_ui.cc2
-rw-r--r--chrome/browser/ui/webui/options2/options_ui2.cc2
-rw-r--r--chrome/test/base/ui_test_utils.cc2
-rw-r--r--content/browser/debugger/devtools_manager_unittest.cc8
-rw-r--r--content/browser/tab_contents/navigation_controller.cc2
-rw-r--r--content/browser/tab_contents/navigation_controller_unittest.cc20
-rw-r--r--content/browser/tab_contents/tab_contents.cc8
-rw-r--r--content/browser/tab_contents/tab_contents.h12
-rw-r--r--content/browser/tab_contents/tab_contents_delegate_unittest.cc10
-rw-r--r--content/browser/tab_contents/tab_contents_view_win.cc2
-rw-r--r--content/content_browser.gypi4
-rw-r--r--content/public/browser/DEPS3
-rw-r--r--content/public/browser/intents_host.h2
-rw-r--r--content/public/browser/notification_types.h8
-rw-r--r--content/public/browser/web_contents.h14
-rw-r--r--content/public/browser/web_contents_delegate.cc (renamed from content/browser/tab_contents/tab_contents_delegate.cc)154
-rw-r--r--content/public/browser/web_contents_delegate.h (renamed from content/browser/tab_contents/tab_contents_delegate.h)24
-rw-r--r--content/public/common/file_chooser_params.h2
-rw-r--r--content/shell/shell.h6
78 files changed, 284 insertions, 269 deletions
diff --git a/chrome/browser/aeropeek_manager.cc b/chrome/browser/aeropeek_manager.cc
index 4d06cc5..94d9fd7 100644
--- a/chrome/browser/aeropeek_manager.cc
+++ b/chrome/browser/aeropeek_manager.cc
@@ -28,9 +28,9 @@
#include "content/browser/renderer_host/backing_store.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "skia/ext/image_operations.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/skia/include/core/SkBitmap.h"
diff --git a/chrome/browser/chromeos/login/html_page_screen.cc b/chrome/browser/chromeos/login/html_page_screen.cc
index edd985b..ca79715 100644
--- a/chrome/browser/chromeos/login/html_page_screen.cc
+++ b/chrome/browser/chromeos/login/html_page_screen.cc
@@ -62,7 +62,7 @@ void HTMLPageScreen::Refresh() {
Profile* profile = ProfileManager::GetDefaultProfile();
view()->InitDOM(profile,
SiteInstance::CreateSiteInstanceForURL(profile, url));
- view()->SetTabContentsDelegate(this);
+ view()->SetWebContentsDelegate(this);
view()->LoadURL(url);
}
diff --git a/chrome/browser/chromeos/login/registration_screen.cc b/chrome/browser/chromeos/login/registration_screen.cc
index eed7113..4d5e1e4 100644
--- a/chrome/browser/chromeos/login/registration_screen.cc
+++ b/chrome/browser/chromeos/login/registration_screen.cc
@@ -77,7 +77,7 @@ void RegistrationScreen::Refresh() {
Profile* profile = ProfileManager::GetDefaultProfile();
view()->InitDOM(profile,
SiteInstance::CreateSiteInstanceForURL(profile, url));
- view()->SetTabContentsDelegate(this);
+ view()->SetWebContentsDelegate(this);
view()->LoadURL(url);
}
@@ -106,7 +106,7 @@ void RegistrationScreen::OnPageLoadFailed(const std::string& url) {
}
///////////////////////////////////////////////////////////////////////////////
-// RegistrationScreen, TabContentsDelegate implementation:
+// RegistrationScreen, content::WebContentsDelegate implementation:
TabContents* RegistrationScreen::OpenURLFromTab(TabContents* source,
const OpenURLParams& params) {
diff --git a/chrome/browser/chromeos/login/registration_screen.h b/chrome/browser/chromeos/login/registration_screen.h
index 1e0d029..cd36f97 100644
--- a/chrome/browser/chromeos/login/registration_screen.h
+++ b/chrome/browser/chromeos/login/registration_screen.h
@@ -80,7 +80,7 @@ class RegistrationScreen : public ViewScreen<RegistrationView>,
virtual void Refresh() OVERRIDE;
virtual RegistrationView* AllocateView() OVERRIDE;
- // TabContentsDelegate implementation:
+ // content::WebContentsDelegate implementation:
virtual TabContents* OpenURLFromTab(TabContents* source,
const OpenURLParams& params) OVERRIDE;
diff --git a/chrome/browser/chromeos/login/web_page_screen.cc b/chrome/browser/chromeos/login/web_page_screen.cc
index 86e3a11..72a86b7 100644
--- a/chrome/browser/chromeos/login/web_page_screen.cc
+++ b/chrome/browser/chromeos/login/web_page_screen.cc
@@ -22,7 +22,7 @@ WebPageScreen::WebPageScreen() {}
WebPageScreen::~WebPageScreen() {}
///////////////////////////////////////////////////////////////////////////////
-// WebPageScreen, TabContentsDelegate implementation:
+// WebPageScreen, content::WebContentsDelegate implementation:
bool WebPageScreen::ShouldAddNavigationToHistory(
const history::HistoryAddPageArgs& add_page_args,
diff --git a/chrome/browser/chromeos/login/web_page_screen.h b/chrome/browser/chromeos/login/web_page_screen.h
index 53722d9..5d7adc4 100644
--- a/chrome/browser/chromeos/login/web_page_screen.h
+++ b/chrome/browser/chromeos/login/web_page_screen.h
@@ -10,12 +10,12 @@
#include "base/compiler_specific.h"
#include "base/timer.h"
#include "chrome/browser/chromeos/login/screen_observer.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
+#include "content/public/browser/web_contents_delegate.h"
namespace chromeos {
// Base class for wizard screen that holds web page.
-class WebPageScreen : public TabContentsDelegate {
+class WebPageScreen : public content::WebContentsDelegate {
public:
explicit WebPageScreen();
virtual ~WebPageScreen();
@@ -24,7 +24,7 @@ class WebPageScreen : public TabContentsDelegate {
virtual void CloseScreen(ScreenObserver::ExitCodes code) = 0;
protected:
- // TabContentsDelegate implementation:
+ // content::WebContentsDelegate implementation:
virtual bool ShouldAddNavigationToHistory(
const history::HistoryAddPageArgs& add_page_args,
content::NavigationType navigation_type) OVERRIDE;
diff --git a/chrome/browser/chromeos/login/web_page_view.cc b/chrome/browser/chromeos/login/web_page_view.cc
index 0826963..298bede 100644
--- a/chrome/browser/chromeos/login/web_page_view.cc
+++ b/chrome/browser/chromeos/login/web_page_view.cc
@@ -87,8 +87,8 @@ void WizardWebPageViewTabContents::DocumentLoadedInFrame(
///////////////////////////////////////////////////////////////////////////////
// WebPageDomView, public:
-void WebPageDomView::SetTabContentsDelegate(
- TabContentsDelegate* delegate) {
+void WebPageDomView::SetWebContentsDelegate(
+ content::WebContentsDelegate* delegate) {
dom_contents_->tab_contents()->SetDelegate(delegate);
}
@@ -134,9 +134,9 @@ void WebPageView::LoadURL(const GURL& url) {
dom_view()->LoadURL(url);
}
-void WebPageView::SetTabContentsDelegate(
- TabContentsDelegate* delegate) {
- dom_view()->SetTabContentsDelegate(delegate);
+void WebPageView::SetWebContentsDelegate(
+ content::WebContentsDelegate* delegate) {
+ dom_view()->SetWebContentsDelegate(delegate);
}
void WebPageView::SetWebPageDelegate(WebPageDelegate* delegate) {
diff --git a/chrome/browser/chromeos/login/web_page_view.h b/chrome/browser/chromeos/login/web_page_view.h
index ad9c10e..1669a6b 100644
--- a/chrome/browser/chromeos/login/web_page_view.h
+++ b/chrome/browser/chromeos/login/web_page_view.h
@@ -15,12 +15,15 @@
#include "ui/views/view.h"
class Profile;
-class TabContentsDelegate;
+
+namespace content {
+class WebContentsDelegate;
+}
namespace views {
class Label;
class Throbber;
-} // namespace views
+}
namespace chromeos {
@@ -66,7 +69,7 @@ class WebPageDomView : public DOMView {
WebPageDomView() : page_delegate_(NULL) {}
// Set delegate that will be notified about tab contents changes.
- void SetTabContentsDelegate(TabContentsDelegate* delegate);
+ void SetWebContentsDelegate(content::WebContentsDelegate* delegate);
// Set delegate that will be notified about page events.
void set_web_page_delegate(WebPageDelegate* delegate) {
@@ -98,11 +101,11 @@ class WebPageView : public views::View {
void InitDOM(Profile* profile, SiteInstance* site_instance);
// Loads the given URL into the page.
- // You must have previously called Init() and SetTabContentsDelegate.
+ // You must have previously called Init() and SetWebContentsDelegate.
void LoadURL(const GURL& url);
// Sets delegate for tab contents changes.
- void SetTabContentsDelegate(TabContentsDelegate* delegate);
+ void SetWebContentsDelegate(content::WebContentsDelegate* delegate);
// Set delegate that will be notified about page events.
void SetWebPageDelegate(WebPageDelegate* delegate);
diff --git a/chrome/browser/chromeos/login/webui_login_view.h b/chrome/browser/chromeos/login/webui_login_view.h
index 58dd63e..6413476 100644
--- a/chrome/browser/chromeos/login/webui_login_view.h
+++ b/chrome/browser/chromeos/login/webui_login_view.h
@@ -13,7 +13,7 @@
#include "chrome/browser/chromeos/status/status_area_button.h"
#include "chrome/browser/tab_first_render_watcher.h"
#include "chrome/browser/ui/views/unhandled_keyboard_event_handler.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_delegate.h"
@@ -34,7 +34,7 @@ namespace chromeos {
// DOMView.
class WebUILoginView : public views::WidgetDelegateView,
public StatusAreaButton::Delegate,
- public TabContentsDelegate,
+ public content::WebContentsDelegate,
public TabFirstRenderWatcher::Delegate {
public:
static const int kStatusAreaCornerPadding;
@@ -107,7 +107,7 @@ class WebUILoginView : public views::WidgetDelegateView,
// Map type for the accelerator-to-identifier map.
typedef std::map<ui::Accelerator, std::string> AccelMap;
- // Overridden from TabContentsDelegate.
+ // Overridden from content::WebContentsDelegate.
virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE;
virtual void HandleKeyboardEvent(
const NativeWebKeyboardEvent& event) OVERRIDE;
diff --git a/chrome/browser/chromeos/notifications/balloon_view_host.h b/chrome/browser/chromeos/notifications/balloon_view_host.h
index eca3f1d..e975844 100644
--- a/chrome/browser/chromeos/notifications/balloon_view_host.h
+++ b/chrome/browser/chromeos/notifications/balloon_view_host.h
@@ -38,7 +38,7 @@ class BalloonViewHost : public ::BalloonViewHost {
const MessageCallback& callback);
private:
- // TabContentsDelegate
+ // WebContentsDelegate
virtual void WebUISend(TabContents* tab,
const GURL& source_url,
const std::string& name,
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc
index 4542aa5..a3d2dc7 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings.cc
@@ -26,8 +26,8 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "webkit/fileapi/file_system_types.h"
using content::BrowserThread;
diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc
index c4e9283..0e79807 100644
--- a/chrome/browser/debugger/devtools_window.cc
+++ b/chrome/browser/debugger/devtools_window.cc
@@ -7,8 +7,8 @@
#include "base/command_line.h"
#include "base/json/json_writer.h"
#include "base/lazy_instance.h"
-#include "base/stringprintf.h"
#include "base/string_number_conversions.h"
+#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/browser_process.h"
@@ -685,5 +685,5 @@ content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() {
return inspected_tab_->tab_contents()->GetDelegate()->
GetJavaScriptDialogCreator();
}
- return TabContentsDelegate::GetJavaScriptDialogCreator();
+ return content::WebContentsDelegate::GetJavaScriptDialogCreator();
}
diff --git a/chrome/browser/debugger/devtools_window.h b/chrome/browser/debugger/devtools_window.h
index 6797edbe..c1e00a9 100644
--- a/chrome/browser/debugger/devtools_window.h
+++ b/chrome/browser/debugger/devtools_window.h
@@ -11,11 +11,11 @@
#include "base/basictypes.h"
#include "chrome/browser/debugger/devtools_toggle_action.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/public/browser/devtools_client_host.h"
#include "content/public/browser/devtools_frontend_host_delegate.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/web_contents_delegate.h"
namespace IPC {
class Message;
@@ -38,7 +38,7 @@ class DevToolsClientHost;
}
class DevToolsWindow : private content::NotificationObserver,
- private TabContentsDelegate,
+ private content::WebContentsDelegate,
private content::DevToolsFrontendHostDelegate {
public:
static const char kDevToolsApp[];
@@ -97,7 +97,7 @@ class DevToolsWindow : private content::NotificationObserver,
void AddDevToolsExtensionsToClient();
void CallClientFunction(const string16& function_name,
const base::Value& arg);
- // Overridden from TabContentsDelegate.
+ // Overridden from content::WebContentsDelegate.
virtual TabContents* OpenURLFromTab(TabContents* source,
const OpenURLParams& params) OVERRIDE;
virtual void AddNewContents(TabContents* source,
diff --git a/chrome/browser/download/download_request_limiter.cc b/chrome/browser/download/download_request_limiter.cc
index e507542b..0c8d2b8 100644
--- a/chrome/browser/download/download_request_limiter.cc
+++ b/chrome/browser/download/download_request_limiter.cc
@@ -15,10 +15,10 @@
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/web_contents_delegate.h"
using content::BrowserThread;
diff --git a/chrome/browser/extensions/extension_host.h b/chrome/browser/extensions/extension_host.h
index 954f8c6..4c3f846 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_delegate.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/common/view_type.h"
#if defined(TOOLKIT_VIEWS)
@@ -41,7 +41,7 @@ class RenderProcessHost;
// It handles setting up the renderer process, if needed, with special
// privileges available to extensions. It may have a view to be shown in the
// browser UI, or it may be hidden.
-class ExtensionHost : public TabContentsDelegate,
+class ExtensionHost : public content::WebContentsDelegate,
public TabContentsObserver,
public ExtensionFunctionDispatcher::Delegate,
public content::NotificationObserver {
@@ -116,7 +116,7 @@ class ExtensionHost : public TabContentsDelegate,
virtual void DocumentLoadedInFrame(int64 frame_id) OVERRIDE;
virtual void DidStopLoading() OVERRIDE;
- // TabContentsDelegate
+ // content::WebContentsDelegate
virtual TabContents* OpenURLFromTab(TabContents* source,
const OpenURLParams& params) OVERRIDE;
virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc
index 4b88ee1..b0c369f 100644
--- a/chrome/browser/external_tab_container_win.cc
+++ b/chrome/browser/external_tab_container_win.cc
@@ -343,7 +343,7 @@ ExternalTabContainer*
return tab_container;
}
////////////////////////////////////////////////////////////////////////////////
-// ExternalTabContainer, TabContentsDelegate implementation:
+// ExternalTabContainer, content::WebContentsDelegate implementation:
TabContents* ExternalTabContainer::OpenURLFromTab(TabContents* source,
const OpenURLParams& params) {
diff --git a/chrome/browser/external_tab_container_win.h b/chrome/browser/external_tab_container_win.h
index 6c5bcb3..fcb7afd 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_delegate.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 "ui/base/accelerators/accelerator.h"
#include "ui/views/widget/native_widget_win.h"
@@ -46,8 +46,8 @@ class ViewProp;
// This class serves as the container window for an external tab.
// An external tab is a Chrome tab that is meant to displayed in an
// external process. This class provides the FocusManger needed by the
-// TabContents as well as an implementation of TabContentsDelegate.
-class ExternalTabContainer : public TabContentsDelegate,
+// TabContents as well as an implementation of content::WebContentsDelegate.
+class ExternalTabContainer : public content::WebContentsDelegate,
public TabContentsObserver,
public content::NotificationObserver,
public views::NativeWidgetWin,
@@ -118,7 +118,7 @@ class ExternalTabContainer : public TabContentsDelegate,
// hosts the given tab window.
static ExternalTabContainer* GetContainerForTab(HWND tab_window);
- // Overridden from TabContentsDelegate:
+ // Overridden from content::WebContentsDelegate:
virtual TabContents* OpenURLFromTab(TabContents* source,
const OpenURLParams& params) OVERRIDE;
diff --git a/chrome/browser/favicon/favicon_tab_helper.cc b/chrome/browser/favicon/favicon_tab_helper.cc
index 6a1d721..b6402d4 100644
--- a/chrome/browser/favicon/favicon_tab_helper.cc
+++ b/chrome/browser/favicon/favicon_tab_helper.cc
@@ -13,10 +13,10 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/navigation_details.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/webui/web_ui.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "ui/gfx/codec/png_codec.h"
#include "ui/gfx/image/image.h"
diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/history/history_tab_helper.cc
index 8bc32c2..65b501d 100644
--- a/chrome/browser/history/history_tab_helper.cc
+++ b/chrome/browser/history/history_tab_helper.cc
@@ -11,12 +11,11 @@
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/browser/tab_contents/title_updated_details.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
-#include "content/public/browser/notification_details.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "content/public/common/frame_navigate_params.h"
HistoryTabHelper::HistoryTabHelper(TabContents* tab_contents)
diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc
index 1a8dce4..9e9ae45 100644
--- a/chrome/browser/instant/instant_loader.cc
+++ b/chrome/browser/instant/instant_loader.cc
@@ -38,7 +38,6 @@
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/provisional_load_details.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_observer.h"
@@ -46,6 +45,7 @@
#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_delegate.h"
#include "net/http/http_util.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/codec/png_codec.h"
@@ -163,7 +163,7 @@ void InstantLoader::FrameLoadObserver::Observe(
// TabContentsDelegateImpl -----------------------------------------------------
class InstantLoader::TabContentsDelegateImpl
- : public TabContentsDelegate,
+ : public content::WebContentsDelegate,
public CoreTabHelperDelegate,
public ConstrainedWindowTabHelperDelegate,
public content::NotificationObserver,
@@ -199,7 +199,7 @@ class InstantLoader::TabContentsDelegateImpl
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
- // TabContentsDelegate:
+ // content::WebContentsDelegate:
virtual void NavigationStateChanged(const TabContents* source,
unsigned changed_flags) OVERRIDE;
virtual void AddNavigationHeaders(const GURL& url,
diff --git a/chrome/browser/instant/instant_unload_handler.cc b/chrome/browser/instant/instant_unload_handler.cc
index c3f4f82..b6b2902 100644
--- a/chrome/browser/instant/instant_unload_handler.cc
+++ b/chrome/browser/instant/instant_unload_handler.cc
@@ -9,12 +9,12 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
+#include "content/public/browser/web_contents_delegate.h"
// TabContentsDelegate implementation. This owns the TabContents supplied to the
// constructor.
class InstantUnloadHandler::TabContentsDelegateImpl
- : public TabContentsDelegate {
+ : public content::WebContentsDelegate {
public:
TabContentsDelegateImpl(InstantUnloadHandler* handler,
TabContentsWrapper* tab_contents,
@@ -38,7 +38,7 @@ class InstantUnloadHandler::TabContentsDelegateImpl
// See description above field.
int index() const { return index_; }
- // TabContentsDelegate overrides:
+ // content::WebContentsDelegate overrides:
virtual void WillRunBeforeUnloadConfirm() {
handler_->Activate(this);
}
diff --git a/chrome/browser/notifications/balloon_host.h b/chrome/browser/notifications/balloon_host.h
index bc52624..6afbfd7 100644
--- a/chrome/browser/notifications/balloon_host.h
+++ b/chrome/browser/notifications/balloon_host.h
@@ -13,9 +13,9 @@
#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_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"
class Balloon;
class Browser;
@@ -25,7 +25,7 @@ namespace IPC {
class Message;
}
-class BalloonHost : public TabContentsDelegate,
+class BalloonHost : public content::WebContentsDelegate,
public TabContentsObserver,
public ExtensionFunctionDispatcher::Delegate {
public:
@@ -58,7 +58,7 @@ class BalloonHost : public TabContentsDelegate,
scoped_ptr<TabContents> tab_contents_;
private:
- // TabContentsDelegate implementation:
+ // content::WebContentsDelegate implementation:
virtual void CloseContents(TabContents* source) OVERRIDE;
virtual void HandleMouseDown() OVERRIDE;
virtual void UpdatePreferredSize(TabContents* source,
diff --git a/chrome/browser/notifications/notification_options_menu_model.cc b/chrome/browser/notifications/notification_options_menu_model.cc
index 94276fb..2578c3f 100644
--- a/chrome/browser/notifications/notification_options_menu_model.cc
+++ b/chrome/browser/notifications/notification_options_menu_model.cc
@@ -22,7 +22,7 @@
#include "chrome/common/content_settings_types.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/plugin_observer.cc b/chrome/browser/plugin_observer.cc
index 6547add..7c488ba 100644
--- a/chrome/browser/plugin_observer.cc
+++ b/chrome/browser/plugin_observer.cc
@@ -20,8 +20,8 @@
#include "chrome/common/url_constants.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/public/browser/user_metrics.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources_standard.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/prerender/prerender_contents.cc b/chrome/browser/prerender/prerender_contents.cc
index f122924..c975eb5 100644
--- a/chrome/browser/prerender/prerender_contents.cc
+++ b/chrome/browser/prerender/prerender_contents.cc
@@ -28,9 +28,9 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/resource_request_details.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "ui/gfx/rect.h"
#if defined(OS_MACOSX)
@@ -85,7 +85,7 @@ PrerenderContents::PendingPrerenderData::PendingPrerenderData(
// TabContentsDelegateImpl -----------------------------------------------------
class PrerenderContents::TabContentsDelegateImpl
- : public TabContentsDelegate {
+ : public content::WebContentsDelegate {
public:
explicit TabContentsDelegateImpl(PrerenderContents* prerender_contents) :
prerender_contents_(prerender_contents) {
@@ -104,7 +104,7 @@ class PrerenderContents::TabContentsDelegateImpl
return NULL;
}
- // TabContentsDelegate implementation:
+ // content::WebContentsDelegate implementation:
virtual bool ShouldAddNavigationToHistory(
const history::HistoryAddPageArgs& add_page_args,
content::NavigationType navigation_type) OVERRIDE {
diff --git a/chrome/browser/prerender/prerender_manager.cc b/chrome/browser/prerender/prerender_manager.cc
index b53878b..c213092 100644
--- a/chrome/browser/prerender/prerender_manager.cc
+++ b/chrome/browser/prerender/prerender_manager.cc
@@ -41,13 +41,13 @@
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/tab_contents/render_view_host_manager.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/devtools_agent_host_registry.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/render_process_host.h"
+#include "content/public/browser/web_contents_delegate.h"
using content::BrowserThread;
@@ -101,7 +101,7 @@ bool NeedMatchCompleteDummyForFinalStatus(FinalStatus final_status) {
} // namespace
class PrerenderManager::OnCloseTabContentsDeleter
- : public TabContentsDelegate,
+ : public content::WebContentsDelegate,
public base::SupportsWeakPtr<
PrerenderManager::OnCloseTabContentsDeleter> {
public:
diff --git a/chrome/browser/sidebar/sidebar_container.h b/chrome/browser/sidebar/sidebar_container.h
index 4fee1cc..917560a 100644
--- a/chrome/browser/sidebar/sidebar_container.h
+++ b/chrome/browser/sidebar/sidebar_container.h
@@ -12,7 +12,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/string16.h"
#include "chrome/browser/extensions/image_loading_tracker.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
+#include "content/public/browser/web_contents_delegate.h"
class SkBitmap;
class TabContents;
@@ -23,7 +23,7 @@ class TabContents;
// Stores one particular sidebar state: sidebar's content, its content id,
// tab it is linked to, mini tab icon, title etc.
//
-class SidebarContainer : public TabContentsDelegate,
+class SidebarContainer : public content::WebContentsDelegate,
private ImageLoadingTracker::Observer {
public:
// Interface to implement to listen for sidebar update notification.
@@ -90,7 +90,7 @@ class SidebarContainer : public TabContentsDelegate,
void SetTitle(const string16& title);
private:
- // Overridden from TabContentsDelegate:
+ // Overridden from content::WebContentsDelegate:
virtual content::JavaScriptDialogCreator*
GetJavaScriptDialogCreator() OVERRIDE;
diff --git a/chrome/browser/tab_contents/background_contents.h b/chrome/browser/tab_contents/background_contents.h
index cdcee26..d494254 100644
--- a/chrome/browser/tab_contents/background_contents.h
+++ b/chrome/browser/tab_contents/background_contents.h
@@ -9,17 +9,17 @@
#include <string>
#include "base/memory/scoped_ptr.h"
-#include "content/browser/tab_contents/tab_contents_delegate.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 "webkit/glue/window_open_disposition.h"
class Profile;
// This class consumes TabContents. It can host a renderer, but does not
// have any visible display.
-class BackgroundContents : public TabContentsDelegate,
+class BackgroundContents : public content::WebContentsDelegate,
public TabContentsObserver,
public content::NotificationObserver {
public:
@@ -45,7 +45,7 @@ class BackgroundContents : public TabContentsDelegate,
TabContents* tab_contents() { return tab_contents_.get(); }
virtual const GURL& GetURL() const;
- // TabContentsDelegate implementation:
+ // content::WebContentsDelegate implementation:
virtual void CloseContents(TabContents* source) OVERRIDE;
virtual bool ShouldSuppressDialogs() OVERRIDE;
virtual void DidNavigateMainFramePostCommit(TabContents* tab) OVERRIDE;
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
index 6cb37e3..b513795 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
@@ -9,8 +9,8 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/background/background_contents_service.h"
#include "chrome/browser/background/background_contents_service_factory.h"
-#include "chrome/browser/chrome_content_browser_client.h"
#include "chrome/browser/character_encoding.h"
+#include "chrome/browser/chrome_content_browser_client.h"
#include "chrome/browser/extensions/extension_process_manager.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_webkit_preferences.h"
@@ -36,11 +36,11 @@
#include "content/browser/site_instance.h"
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/browser/tab_contents/tab_contents_view.h"
+#include "content/common/view_messages.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_process_host.h"
-#include "content/common/view_messages.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "net/base/network_change_notifier.h"
namespace {
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.h b/chrome/browser/tab_contents/render_view_host_delegate_helper.h
index 7e0c2fb..918934a 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.h
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.h
@@ -65,7 +65,7 @@ class RenderViewHostDelegateViewHelper : public content::NotificationObserver {
TabContents* GetCreatedWindow(int route_id);
// These methods are meant to be called from TabContentsView implementations.
- // They take care of notifying the TabContentsDelegate.
+ // They take care of notifying the WebContentsDelegate.
TabContents* CreateNewWindowFromTabContents(
TabContents* tab_contents,
int route_id,
diff --git a/chrome/browser/tab_contents/tab_contents_view_gtk.cc b/chrome/browser/tab_contents/tab_contents_view_gtk.cc
index dfa7142..35fcb53 100644
--- a/chrome/browser/tab_contents/tab_contents_view_gtk.cc
+++ b/chrome/browser/tab_contents/tab_contents_view_gtk.cc
@@ -19,9 +19,9 @@
#include "content/browser/renderer_host/render_widget_host_view_gtk.h"
#include "content/browser/tab_contents/interstitial_page.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/browser/tab_contents/web_drag_dest_gtk.h"
#include "content/browser/tab_contents/web_drag_source_gtk.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "ui/base/gtk/gtk_expanded_container.h"
#include "ui/gfx/point.h"
#include "ui/gfx/rect.h"
@@ -59,7 +59,7 @@ gboolean OnMouseScroll(GtkWidget* widget, GdkEventScroll* event,
return FALSE;
}
- TabContentsDelegate* delegate = tab_contents->GetDelegate();
+ content::WebContentsDelegate* delegate = tab_contents->GetDelegate();
if (!delegate)
return FALSE;
diff --git a/chrome/browser/tab_contents/tab_contents_view_mac.mm b/chrome/browser/tab_contents/tab_contents_view_mac.mm
index 62745bc..901bfe7 100644
--- a/chrome/browser/tab_contents/tab_contents_view_mac.mm
+++ b/chrome/browser/tab_contents/tab_contents_view_mac.mm
@@ -21,10 +21,10 @@
#include "content/browser/renderer_host/render_widget_host_view_mac.h"
#include "content/browser/tab_contents/popup_menu_helper_mac.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#import "content/browser/tab_contents/web_drag_dest_mac.h"
#import "content/browser/tab_contents/web_drag_source_mac.h"
#include "content/common/view_messages.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "skia/ext/skia_utils_mac.h"
#import "third_party/mozilla/NSPasteboard+Utils.h"
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc
index 158e3d1..b730ee5 100644
--- a/chrome/browser/tabs/tab_strip_model.cc
+++ b/chrome/browser/tabs/tab_strip_model.cc
@@ -27,11 +27,11 @@
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/user_metrics.h"
+#include "content/public/browser/web_contents_delegate.h"
using content::UserMetricsAction;
diff --git a/chrome/browser/tabs/tab_strip_model.h b/chrome/browser/tabs/tab_strip_model.h
index f778617..c9b9170 100644
--- a/chrome/browser/tabs/tab_strip_model.h
+++ b/chrome/browser/tabs/tab_strip_model.h
@@ -265,7 +265,7 @@ class TabStripModel : public content::NotificationObserver {
// Returns the index of the specified TabContents wrapper given its raw
// TabContents, or TabStripModel::kNoTab if the TabContents is not in this
// TabStripModel. Note: This is only needed in rare cases where the wrapper
- // is not already present (such as implementing TabContentsDelegate methods,
+ // is not already present (such as implementing WebContentsDelegate methods,
// which don't know about the wrapper. Returns NULL if |contents| is not
// associated with any wrapper in the model.
int GetWrapperIndex(const TabContents* contents) const;
diff --git a/chrome/browser/ui/blocked_content/blocked_content_container.cc b/chrome/browser/ui/blocked_content/blocked_content_container.cc
index e2f3aee..6b38c3e 100644
--- a/chrome/browser/ui/blocked_content/blocked_content_container.cc
+++ b/chrome/browser/ui/blocked_content/blocked_content_container.cc
@@ -105,7 +105,7 @@ void BlockedContentContainer::Clear() {
blocked_contents_.clear();
}
-// Overridden from TabContentsDelegate:
+// Overridden from content::WebContentsDelegate:
TabContents* BlockedContentContainer::OpenURLFromTab(
TabContents* source,
diff --git a/chrome/browser/ui/blocked_content/blocked_content_container.h b/chrome/browser/ui/blocked_content/blocked_content_container.h
index 7044773..ad8593a 100644
--- a/chrome/browser/ui/blocked_content/blocked_content_container.h
+++ b/chrome/browser/ui/blocked_content/blocked_content_container.h
@@ -16,14 +16,14 @@
#include "base/compiler_specific.h"
#include "chrome/browser/ui/blocked_content/blocked_content_tab_helper_delegate.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
+#include "content/public/browser/web_contents_delegate.h"
class TabContents;
class TabContentsWrapper;
// Takes ownership of TabContents that are unrequested popup windows.
class BlockedContentContainer : public BlockedContentTabHelperDelegate,
- public TabContentsDelegate {
+ public content::WebContentsDelegate {
public:
// Creates a container for a certain TabContents:
explicit BlockedContentContainer(TabContentsWrapper* owner);
@@ -54,7 +54,7 @@ class BlockedContentContainer : public BlockedContentTabHelperDelegate,
virtual TabContentsWrapper* GetConstrainingContentsWrapper(
TabContentsWrapper* source) OVERRIDE;
- // Overridden from TabContentsDelegate:
+ // Overridden from content::WebContentsDelegate:
// Forwards OpenURLFromTab to our |owner_|.
virtual TabContents* OpenURLFromTab(TabContents* source,
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 94a725a..5d9b8d0 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -3414,7 +3414,7 @@ void Browser::TabStripEmpty() {
}
///////////////////////////////////////////////////////////////////////////////
-// Browser, TabContentsDelegate implementation:
+// Browser, content::WebContentsDelegate implementation:
TabContents* Browser::OpenURLFromTab(TabContents* source,
const OpenURLParams& params) {
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index 5e4ce47..8898e2d 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -19,11 +19,11 @@
#include "base/string16.h"
#include "chrome/browser/command_updater.h"
#include "chrome/browser/debugger/devtools_toggle_action.h"
-#include "chrome/browser/extensions/extension_tab_helper_delegate.h"
#include "chrome/browser/event_disposition.h"
+#include "chrome/browser/extensions/extension_tab_helper_delegate.h"
#include "chrome/browser/instant/instant_delegate.h"
-#include "chrome/browser/prefs/pref_member.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
+#include "chrome/browser/prefs/pref_member.h"
#include "chrome/browser/sessions/session_id.h"
#include "chrome/browser/sessions/tab_restore_service_observer.h"
#include "chrome/browser/sync/profile_sync_service_observer.h"
@@ -45,8 +45,8 @@
#include "chrome/common/content_settings_types.h"
#include "chrome/common/extensions/extension_constants.h"
#include "content/browser/tab_contents/page_navigator.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "content/public/common/page_transition_types.h"
#include "content/public/common/page_zoom.h"
#include "ui/base/ui_base_types.h"
@@ -74,7 +74,7 @@ class Point;
}
class Browser : public TabHandlerDelegate,
- public TabContentsDelegate,
+ public content::WebContentsDelegate,
public CoreTabHelperDelegate,
public SearchEngineTabHelperDelegate,
public ConstrainedWindowTabHelperDelegate,
@@ -917,7 +917,7 @@ class Browser : public TabHandlerDelegate,
BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN,
};
- // Overridden from TabContentsDelegate:
+ // Overridden from content::WebContentsDelegate:
virtual TabContents* OpenURLFromTab(TabContents* source,
const OpenURLParams& params) OVERRIDE;
virtual void NavigationStateChanged(const TabContents* source,
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc
index 234f2e9..84a673f 100644
--- a/chrome/browser/ui/browser_navigator.cc
+++ b/chrome/browser/ui/browser_navigator.cc
@@ -584,7 +584,7 @@ void Navigate(NavigateParams* params) {
if (params->disposition != CURRENT_TAB) {
content::NotificationService::current()->Notify(
content::NOTIFICATION_TAB_ADDED,
- content::Source<TabContentsDelegate>(params->browser),
+ content::Source<content::WebContentsDelegate>(params->browser),
content::Details<TabContents>(params->target_contents->tab_contents()));
}
}
diff --git a/chrome/browser/ui/cocoa/applescript/tab_applescript.mm b/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
index 13c4f5d..cf43749 100644
--- a/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
+++ b/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
@@ -23,7 +23,7 @@
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "googleurl/src/gurl.h"
@interface AnyResultValue : NSObject {
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
index d60fc74..4c2c374 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
@@ -23,9 +23,9 @@
#include "chrome/common/render_messages.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/user_metrics.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "grit/generated_resources.h"
#include "net/base/net_util.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.cc b/chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.cc
index 23adc0f..d4607f1 100644
--- a/chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.cc
+++ b/chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.cc
@@ -17,8 +17,8 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_resource.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
diff --git a/chrome/browser/ui/gtk/html_dialog_gtk.cc b/chrome/browser/ui/gtk/html_dialog_gtk.cc
index 44a06b7..f1059a8 100644
--- a/chrome/browser/ui/gtk/html_dialog_gtk.cc
+++ b/chrome/browser/ui/gtk/html_dialog_gtk.cc
@@ -151,7 +151,7 @@ bool HtmlDialogGtk::ShouldShowDialogTitle() const {
}
////////////////////////////////////////////////////////////////////////////////
-// TabContentsDelegate implementation:
+// content::WebContentsDelegate implementation:
// A simplified version of BrowserWindowGtk::HandleKeyboardEvent().
// We don't handle global keyboard shortcuts here, but that's fine since
diff --git a/chrome/browser/ui/gtk/html_dialog_gtk.h b/chrome/browser/ui/gtk/html_dialog_gtk.h
index 8f7f7733..4d69159 100644
--- a/chrome/browser/ui/gtk/html_dialog_gtk.h
+++ b/chrome/browser/ui/gtk/html_dialog_gtk.h
@@ -48,7 +48,7 @@ class HtmlDialogGtk : public HtmlDialogTabContentsDelegate,
virtual void CloseContents(TabContents* source) OVERRIDE;
virtual bool ShouldShowDialogTitle() const OVERRIDE;
- // Overridden from TabContentsDelegate:
+ // Overridden from content::WebContentsDelegate:
virtual void HandleKeyboardEvent(
const NativeWebKeyboardEvent& event) OVERRIDE;
diff --git a/chrome/browser/ui/gtk/tabs/drag_data.cc b/chrome/browser/ui/gtk/tabs/drag_data.cc
index 3246b11..ce9268a 100644
--- a/chrome/browser/ui/gtk/tabs/drag_data.cc
+++ b/chrome/browser/ui/gtk/tabs/drag_data.cc
@@ -8,7 +8,7 @@
#include "chrome/browser/ui/gtk/tabs/tab_gtk.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
+#include "content/public/browser/web_contents_delegate.h"
DraggedTabData::DraggedTabData()
: tab_(NULL),
@@ -21,7 +21,7 @@ DraggedTabData::DraggedTabData()
DraggedTabData::DraggedTabData(TabGtk* tab,
TabContentsWrapper* contents,
- TabContentsDelegate* original_delegate,
+ content::WebContentsDelegate* original_delegate,
int source_model_index,
bool pinned,
bool mini)
diff --git a/chrome/browser/ui/gtk/tabs/drag_data.h b/chrome/browser/ui/gtk/tabs/drag_data.h
index 59c43aa..827bb09 100644
--- a/chrome/browser/ui/gtk/tabs/drag_data.h
+++ b/chrome/browser/ui/gtk/tabs/drag_data.h
@@ -11,16 +11,19 @@
#include "base/basictypes.h"
class TabContents;
-class TabContentsDelegate;
class TabContentsWrapper;
class TabGtk;
+namespace content {
+class WebContentsDelegate;
+}
+
struct DraggedTabData {
public:
DraggedTabData();
DraggedTabData(TabGtk* tab,
TabContentsWrapper* contents,
- TabContentsDelegate* original_delegate,
+ content::WebContentsDelegate* original_delegate,
int source_model_index,
bool pinned,
bool mini);
@@ -36,10 +39,10 @@ struct DraggedTabData {
// The TabContents being dragged.
TabContentsWrapper* contents_;
- // The original TabContentsDelegate of |contents|, before it was detached
- // from the browser window. We store this so that we can forward certain
- // delegate notifications back to it if we can't handle them locally.
- TabContentsDelegate* original_delegate_;
+ // The original content::WebContentsDelegate of |contents|, before it was
+ // detached from the browser window. We store this so that we can forward
+ // certain delegate notifications back to it if we can't handle them locally.
+ content::WebContentsDelegate* original_delegate_;
// This is the index of |contents| in |source_tabstrip_| when the drag
// began. This is used to restore the previous state if the drag is aborted.
diff --git a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc
index 971abb4..c29c73e 100644
--- a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc
@@ -153,7 +153,7 @@ DraggedTabData DraggedTabControllerGtk::InitDraggedTabData(TabGtk* tab) {
// otherwise our dragged_contents() may be replaced and subsequently
// collected/destroyed while the drag is in process, leading to
// nasty crashes.
- TabContentsDelegate* original_delegate =
+ content::WebContentsDelegate* original_delegate =
contents->tab_contents()->GetDelegate();
contents->tab_contents()->SetDelegate(this);
@@ -167,7 +167,7 @@ DraggedTabData DraggedTabControllerGtk::InitDraggedTabData(TabGtk* tab) {
}
////////////////////////////////////////////////////////////////////////////////
-// DraggedTabControllerGtk, TabContentsDelegate implementation:
+// DraggedTabControllerGtk, content::WebContentsDelegate implementation:
TabContents* DraggedTabControllerGtk::OpenURLFromTab(
TabContents* source,
diff --git a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h
index c42a6c1..4cbf515 100644
--- a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h
+++ b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h
@@ -17,9 +17,9 @@
#include "base/timer.h"
#include "chrome/browser/ui/gtk/tabs/drag_data.h"
#include "chrome/browser/ui/tabs/dock_info.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "ui/base/x/x11_util.h"
class DraggedViewGtk;
@@ -29,7 +29,7 @@ class TabStripModel;
class TabContentsWrapper;
class DraggedTabControllerGtk : public content::NotificationObserver,
- public TabContentsDelegate {
+ public content::WebContentsDelegate {
public:
// |source_tabstrip| is the tabstrip where the tabs reside before any
// dragging occurs. |source_tab| is the tab that is under the mouse pointer
@@ -84,7 +84,7 @@ class DraggedTabControllerGtk : public content::NotificationObserver,
DraggedTabData InitDraggedTabData(TabGtk* tab);
- // Overridden from TabContentsDelegate:
+ // Overridden from content::WebContentsDelegate:
virtual TabContents* OpenURLFromTab(TabContents* source,
const OpenURLParams& params) OVERRIDE;
virtual void NavigationStateChanged(const TabContents* source,
diff --git a/chrome/browser/ui/gtk/web_intent_picker_gtk.h b/chrome/browser/ui/gtk/web_intent_picker_gtk.h
index 62c6905..9c434ed 100644
--- a/chrome/browser/ui/gtk/web_intent_picker_gtk.h
+++ b/chrome/browser/ui/gtk/web_intent_picker_gtk.h
@@ -15,7 +15,7 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
#include "chrome/browser/ui/intents/web_intent_picker.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "ui/base/gtk/gtk_signal.h"
#include "ui/base/gtk/owned_widget_gtk.h"
@@ -55,7 +55,7 @@ class WebIntentPickerGtk : public WebIntentPicker,
// This class is the policy delegate for the rendered page in the intents
// inline disposition bubble.
// TODO(gbillock): Move up to WebIntentPicker?
- class InlineDispositionDelegate : public TabContentsDelegate {
+ class InlineDispositionDelegate : public content::WebContentsDelegate {
public:
InlineDispositionDelegate();
virtual ~InlineDispositionDelegate();
@@ -104,7 +104,7 @@ class WebIntentPickerGtk : public WebIntentPicker,
// Widget for displaying the HTML in the inline disposition case.
scoped_ptr<TabContentsContainerGtk> tab_contents_container_;
- // TabContentsDelegate for the inline disposition dialog.
+ // content::WebContentsDelegate for the inline disposition dialog.
scoped_ptr<InlineDispositionDelegate> inline_disposition_delegate_;
DISALLOW_COPY_AND_ASSIGN(WebIntentPickerGtk);
diff --git a/chrome/browser/ui/login/login_prompt_gtk.cc b/chrome/browser/ui/login/login_prompt_gtk.cc
index 9a32c86..462b916 100644
--- a/chrome/browser/ui/login/login_prompt_gtk.cc
+++ b/chrome/browser/ui/login/login_prompt_gtk.cc
@@ -18,8 +18,8 @@
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "grit/generated_resources.h"
#include "net/url_request/url_request.h"
#include "ui/base/gtk/gtk_compat.h"
diff --git a/chrome/browser/ui/views/aura/app_list_window.h b/chrome/browser/ui/views/aura/app_list_window.h
index 23caa66..dac3fa9 100644
--- a/chrome/browser/ui/views/aura/app_list_window.h
+++ b/chrome/browser/ui/views/aura/app_list_window.h
@@ -9,7 +9,7 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/tab_first_render_watcher.h"
#include "chrome/browser/ui/webui/aura/app_list_ui_delegate.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "ui/aura_shell/shell_delegate.h"
#include "ui/views/widget/widget_delegate.h"
@@ -20,7 +20,7 @@ class Widget;
}
class AppListWindow : public views::WidgetDelegate,
- public TabContentsDelegate,
+ public content::WebContentsDelegate,
public TabFirstRenderWatcher::Delegate,
public AppListUIDelegate {
public:
@@ -37,7 +37,7 @@ class AppListWindow : public views::WidgetDelegate,
virtual views::Widget* GetWidget() OVERRIDE;
virtual const views::Widget* GetWidget() const OVERRIDE;
- // TabContentsDelegate implementation:
+ // content::WebContentsDelegate implementation:
virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE;
virtual void HandleKeyboardEvent(
const NativeWebKeyboardEvent& event) OVERRIDE;
diff --git a/chrome/browser/ui/views/create_application_shortcut_view.cc b/chrome/browser/ui/views/create_application_shortcut_view.cc
index 43bf2e8..3cff6a3 100644
--- a/chrome/browser/ui/views/create_application_shortcut_view.cc
+++ b/chrome/browser/ui/views/create_application_shortcut_view.cc
@@ -22,7 +22,7 @@
#include "chrome/common/extensions/extension_resource.h"
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
#include "grit/theme_resources.h"
diff --git a/chrome/browser/ui/views/html_dialog_view.cc b/chrome/browser/ui/views/html_dialog_view.cc
index f77d8d9..cda26ae 100644
--- a/chrome/browser/ui/views/html_dialog_view.cc
+++ b/chrome/browser/ui/views/html_dialog_view.cc
@@ -206,7 +206,7 @@ bool HtmlDialogView::HandleContextMenu(const ContextMenuParams& params) {
}
////////////////////////////////////////////////////////////////////////////////
-// TabContentsDelegate implementation:
+// content::WebContentsDelegate implementation:
void HtmlDialogView::MoveContents(TabContents* source, const gfx::Rect& pos) {
// The contained web page wishes to resize itself. We let it do this because
diff --git a/chrome/browser/ui/views/html_dialog_view.h b/chrome/browser/ui/views/html_dialog_view.h
index 6802aa8..d9feba7 100644
--- a/chrome/browser/ui/views/html_dialog_view.h
+++ b/chrome/browser/ui/views/html_dialog_view.h
@@ -78,7 +78,7 @@ class HtmlDialogView
virtual bool ShouldShowDialogTitle() const OVERRIDE;
virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE;
- // Overridden from TabContentsDelegate:
+ // Overridden from content::WebContentsDelegate:
virtual void MoveContents(TabContents* source, const gfx::Rect& pos) OVERRIDE;
virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event)
OVERRIDE;
diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc b/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc
index a9ca3f4..f99bd5d 100644
--- a/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc
+++ b/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc
@@ -17,8 +17,8 @@
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/browser/tab_contents/interstitial_page.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/public/browser/render_process_host.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "ui/gfx/screen.h"
#include "ui/views/focus/focus_manager.h"
#include "ui/views/focus/view_storage.h"
diff --git a/chrome/browser/ui/views/tabs/default_tab_drag_controller.cc b/chrome/browser/ui/views/tabs/default_tab_drag_controller.cc
index e414d06..7262925 100644
--- a/chrome/browser/ui/views/tabs/default_tab_drag_controller.cc
+++ b/chrome/browser/ui/views/tabs/default_tab_drag_controller.cc
@@ -429,7 +429,7 @@ TabContents* DefaultTabDragController::OpenURLFromTab(TabContents* source,
}
///////////////////////////////////////////////////////////////////////////////
-// DefaultTabDragController, TabContentsDelegate implementation:
+// DefaultTabDragController, content::WebContentsDelegate implementation:
void DefaultTabDragController::NavigationStateChanged(const TabContents* source,
unsigned changed_flags) {
@@ -479,8 +479,8 @@ void DefaultTabDragController::Observe(
const content::NotificationSource& source,
const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_TAB_CONTENTS_DELEGATE_DESTROYED) {
- TabContentsDelegate* delegate =
- content::Source<TabContentsDelegate>(source).ptr();
+ content::WebContentsDelegate* delegate =
+ content::Source<content::WebContentsDelegate>(source).ptr();
for (size_t i = 0; i < drag_data_.size(); ++i)
CHECK_NE(delegate, drag_data_[i].original_delegate);
return;
diff --git a/chrome/browser/ui/views/tabs/default_tab_drag_controller.h b/chrome/browser/ui/views/tabs/default_tab_drag_controller.h
index ce0968e2..e08dbc4 100644
--- a/chrome/browser/ui/views/tabs/default_tab_drag_controller.h
+++ b/chrome/browser/ui/views/tabs/default_tab_drag_controller.h
@@ -14,10 +14,10 @@
#include "chrome/browser/tabs/tab_strip_selection_model.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/browser/ui/tabs/dock_info.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "chrome/browser/ui/views/tabs/tab_drag_controller.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "ui/gfx/rect.h"
namespace views {
@@ -33,7 +33,7 @@ struct TabRendererData;
// TabDragController implementation that creates a widget representing the
// dragged tabs when detached (dragged out of the source window).
class DefaultTabDragController : public TabDragController,
- public TabContentsDelegate,
+ public content::WebContentsDelegate,
public content::NotificationObserver,
public MessageLoopForUI::Observer {
public:
@@ -85,10 +85,11 @@ class DefaultTabDragController : public TabDragController,
// The TabContentsWrapper being dragged.
TabContentsWrapper* contents;
- // The original TabContentsDelegate of |contents|, before it was detached
- // from the browser window. We store this so that we can forward certain
- // delegate notifications back to it if we can't handle them locally.
- TabContentsDelegate* original_delegate;
+ // The original content::WebContentsDelegate of |contents|, before it was
+ // detached from the browser window. We store this so that we can forward
+ // certain delegate notifications back to it if we can't handle them
+ // locally.
+ content::WebContentsDelegate* original_delegate;
// This is the index of the tab in |source_tabstrip_| when the drag
// began. This is used to restore the previous state if the drag is aborted.
@@ -112,7 +113,7 @@ class DefaultTabDragController : public TabDragController,
virtual void EndDrag(bool canceled) OVERRIDE;
virtual bool GetStartedDrag() const OVERRIDE;
- // Overridden from TabContentsDelegate:
+ // Overridden from content::WebContentsDelegate:
virtual TabContents* OpenURLFromTab(TabContents* source,
const OpenURLParams& params) OVERRIDE;
virtual void NavigationStateChanged(const TabContents* source,
diff --git a/chrome/browser/ui/webui/history_ui.cc b/chrome/browser/ui/webui/history_ui.cc
index ad44341..9e6209c 100644
--- a/chrome/browser/ui/webui/history_ui.cc
+++ b/chrome/browser/ui/webui/history_ui.cc
@@ -31,10 +31,10 @@
#include "chrome/common/time_format.h"
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/user_metrics.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "grit/browser_resources.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
diff --git a/chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h b/chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h
index 8dae71e..31f7c4a 100644
--- a/chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h
+++ b/chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h
@@ -7,16 +7,16 @@
#pragma once
#include "base/compiler_specific.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
+#include "content/public/browser/web_contents_delegate.h"
class Profile;
-// This class implements (and mostly ignores) most of TabContentsDelegate for
-// use in an HTML dialog. Subclasses need only override a few methods instead
-// of the everything from TabContentsDelegate; this way, implementations on
-// all platforms behave consistently.
-
-class HtmlDialogTabContentsDelegate : public TabContentsDelegate {
+// This class implements (and mostly ignores) most of
+// content::WebContentsDelegate for use in an HTML dialog. Subclasses need only
+// override a few methods instead of the everything from
+// content::WebContentsDelegate; this way, implementations on all platforms
+// behave consistently.
+class HtmlDialogTabContentsDelegate : public content::WebContentsDelegate {
public:
// Profile must be non-NULL.
explicit HtmlDialogTabContentsDelegate(Profile* profile);
@@ -31,7 +31,7 @@ class HtmlDialogTabContentsDelegate : public TabContentsDelegate {
// calls to profile() return NULL.
void Detach();
- // TabContentsDelegate declarations.
+ // content::WebContentsDelegate declarations.
virtual TabContents* OpenURLFromTab(TabContents* source,
const OpenURLParams& params) OVERRIDE;
diff --git a/chrome/browser/ui/webui/options/options_ui.cc b/chrome/browser/ui/webui/options/options_ui.cc
index c41a372..51433e9 100644
--- a/chrome/browser/ui/webui/options/options_ui.cc
+++ b/chrome/browser/ui/webui/options/options_ui.cc
@@ -45,10 +45,10 @@
#include "chrome/common/url_constants.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/user_metrics.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
diff --git a/chrome/browser/ui/webui/options2/options_ui2.cc b/chrome/browser/ui/webui/options2/options_ui2.cc
index c30742c..5a9bf18 100644
--- a/chrome/browser/ui/webui/options2/options_ui2.cc
+++ b/chrome/browser/ui/webui/options2/options_ui2.cc
@@ -43,9 +43,9 @@
#include "chrome/common/url_constants.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc
index aab83f2..ee65854 100644
--- a/chrome/test/base/ui_test_utils.cc
+++ b/chrome/test/base/ui_test_utils.cc
@@ -322,7 +322,7 @@ void WaitForNavigations(NavigationController* controller,
void WaitForNewTab(Browser* browser) {
TestNotificationObserver observer;
RegisterAndWait(&observer, content::NOTIFICATION_TAB_ADDED,
- content::Source<TabContentsDelegate>(browser));
+ content::Source<content::WebContentsDelegate>(browser));
}
void WaitForBrowserActionUpdated(ExtensionAction* browser_action) {
diff --git a/content/browser/debugger/devtools_manager_unittest.cc b/content/browser/debugger/devtools_manager_unittest.cc
index 244ebd2..31b0b5a 100644
--- a/content/browser/debugger/devtools_manager_unittest.cc
+++ b/content/browser/debugger/devtools_manager_unittest.cc
@@ -8,12 +8,12 @@
#include "content/browser/debugger/render_view_devtools_agent_host.h"
#include "content/browser/mock_content_browser_client.h"
#include "content/browser/renderer_host/test_render_view_host.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/browser/tab_contents/test_tab_contents.h"
#include "content/common/view_messages.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/devtools_agent_host_registry.h"
#include "content/public/browser/devtools_client_host.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "testing/gtest/include/gtest/gtest.h"
using base::TimeDelta;
@@ -75,9 +75,9 @@ class TestDevToolsClientHost : public DevToolsClientHost {
int TestDevToolsClientHost::close_counter = 0;
-class TestTabContentsDelegate : public TabContentsDelegate {
+class TestWebContentsDelegate : public content::WebContentsDelegate {
public:
- TestTabContentsDelegate() : renderer_unresponsive_received_(false) {}
+ TestWebContentsDelegate() : renderer_unresponsive_received_(false) {}
// Notification that the tab is hung.
virtual void RendererUnresponsive(TabContents* source) {
@@ -182,7 +182,7 @@ TEST_F(DevToolsManagerTest, NoUnresponsiveDialogInInspectedTab) {
TestRenderViewHost* inspected_rvh = rvh();
inspected_rvh->set_render_view_created(true);
EXPECT_FALSE(contents()->GetDelegate());
- TestTabContentsDelegate delegate;
+ TestWebContentsDelegate delegate;
contents()->SetDelegate(&delegate);
TestDevToolsClientHost client_host;
diff --git a/content/browser/tab_contents/navigation_controller.cc b/content/browser/tab_contents/navigation_controller.cc
index f5df5ca..eb5307b 100644
--- a/content/browser/tab_contents/navigation_controller.cc
+++ b/content/browser/tab_contents/navigation_controller.cc
@@ -19,12 +19,12 @@
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/common/view_messages.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/user_metrics.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "content/public/common/content_constants.h"
#include "net/base/escape.h"
#include "net/base/mime_util.h"
diff --git a/content/browser/tab_contents/navigation_controller_unittest.cc b/content/browser/tab_contents/navigation_controller_unittest.cc
index 7040251..26b523b 100644
--- a/content/browser/tab_contents/navigation_controller_unittest.cc
+++ b/content/browser/tab_contents/navigation_controller_unittest.cc
@@ -16,17 +16,17 @@
// #include "chrome/browser/sessions/session_service_factory.h"
// #include "chrome/browser/sessions/session_service_test_helper.h"
// #include "chrome/browser/sessions/session_types.h"
-#include "content/browser/site_instance.h"
#include "content/browser/renderer_host/test_render_view_host.h"
+#include "content/browser/site_instance.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/browser/tab_contents/test_tab_contents.h"
#include "content/common/view_messages.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "content/test/test_browser_context.h"
#include "content/test/test_notification_tracker.h"
#include "net/base/net_util.h"
@@ -52,9 +52,9 @@ void RegisterForAllNavNotifications(TestNotificationTracker* tracker,
content::Source<NavigationController>(controller));
}
-class TestTabContentsDelegate : public TabContentsDelegate {
+class TestWebContentsDelegate : public content::WebContentsDelegate {
public:
- explicit TestTabContentsDelegate() :
+ explicit TestWebContentsDelegate() :
navigation_state_change_count_(0) {}
int navigation_state_change_count() {
@@ -377,8 +377,8 @@ TEST_F(NavigationControllerTest, LoadURL_IgnorePreemptsPending) {
TestNotificationTracker notifications;
RegisterForAllNavNotifications(&notifications, &controller());
- // Set a TabContentsDelegate to listen for state changes.
- scoped_ptr<TestTabContentsDelegate> delegate(new TestTabContentsDelegate());
+ // Set a WebContentsDelegate to listen for state changes.
+ scoped_ptr<TestWebContentsDelegate> delegate(new TestWebContentsDelegate());
EXPECT_FALSE(contents()->GetDelegate());
contents()->SetDelegate(delegate.get());
@@ -415,8 +415,8 @@ TEST_F(NavigationControllerTest, LoadURL_AbortCancelsPending) {
TestNotificationTracker notifications;
RegisterForAllNavNotifications(&notifications, &controller());
- // Set a TabContentsDelegate to listen for state changes.
- scoped_ptr<TestTabContentsDelegate> delegate(new TestTabContentsDelegate());
+ // Set a WebContentsDelegate to listen for state changes.
+ scoped_ptr<TestWebContentsDelegate> delegate(new TestWebContentsDelegate());
EXPECT_FALSE(contents()->GetDelegate());
contents()->SetDelegate(delegate.get());
@@ -463,8 +463,8 @@ TEST_F(NavigationControllerTest, LoadURL_RedirectAbortCancelsPending) {
TestNotificationTracker notifications;
RegisterForAllNavNotifications(&notifications, &controller());
- // Set a TabContentsDelegate to listen for state changes.
- scoped_ptr<TestTabContentsDelegate> delegate(new TestTabContentsDelegate());
+ // Set a WebContentsDelegate to listen for state changes.
+ scoped_ptr<TestWebContentsDelegate> delegate(new TestWebContentsDelegate());
EXPECT_FALSE(contents()->GetDelegate());
contents()->SetDelegate(delegate.get());
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index cfbd561..6c96363 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -31,7 +31,6 @@
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/provisional_load_details.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/browser/tab_contents/title_updated_details.h"
@@ -44,6 +43,7 @@
#include "content/public/browser/download_manager.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/user_metrics.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "content/public/common/bindings_policy.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/content_restriction.h"
@@ -154,7 +154,7 @@ ViewMsg_Navigate_Type::Value GetNavigationType(
void MakeNavigateParams(const NavigationEntry& entry,
const NavigationController& controller,
- TabContentsDelegate* delegate,
+ content::WebContentsDelegate* delegate,
NavigationController::ReloadType reload_type,
ViewMsg_Navigate_Params* params) {
params->page_id = entry.page_id();
@@ -1415,11 +1415,11 @@ base::PropertyBag* TabContents::GetPropertyBag() {
return &property_bag_;
}
-TabContentsDelegate* TabContents::GetDelegate() {
+content::WebContentsDelegate* TabContents::GetDelegate() {
return delegate_;
}
-void TabContents::SetDelegate(TabContentsDelegate* delegate) {
+void TabContents::SetDelegate(content::WebContentsDelegate* delegate) {
// TODO(cbentzel): remove this debugging code?
if (delegate == delegate_)
return;
diff --git a/content/browser/tab_contents/tab_contents.h b/content/browser/tab_contents/tab_contents.h
index 6128f7f..eb07995 100644
--- a/content/browser/tab_contents/tab_contents.h
+++ b/content/browser/tab_contents/tab_contents.h
@@ -41,13 +41,13 @@ class LoadNotificationDetails;
class RenderViewHost;
class SessionStorageNamespace;
class SiteInstance;
-class TabContentsDelegate;
class TabContentsObserver;
class TabContentsView;
struct ViewHostMsg_DidFailProvisionalLoadWithError_Params;
namespace content {
class DownloadItem;
+class WebContentsDelegate;
}
namespace webkit_glue {
@@ -60,7 +60,7 @@ class CONTENT_EXPORT TabContents : public content::WebContents,
public RenderViewHostManager::Delegate,
public content::JavaScriptDialogDelegate {
public:
- // Flags passed to the TabContentsDelegate.NavigationStateChanged to tell it
+ // Flags passed to the WebContentsDelegate.NavigationStateChanged to tell it
// what has changed. Combine them to update more than one thing.
enum InvalidateTypes {
INVALIDATE_URL = 1 << 0, // The URL has changed.
@@ -216,7 +216,7 @@ class CONTENT_EXPORT TabContents : public content::WebContents,
bool is_being_destroyed() const { return is_being_destroyed_; }
// Convenience method for notifying the delegate of a navigation state
- // change. See TabContentsDelegate.
+ // change. See WebContentsDelegate.
void NotifyNavigationStateChanged(unsigned changed_flags);
// Invoked when the tab contents becomes selected. If you override, be sure
@@ -478,8 +478,8 @@ class CONTENT_EXPORT TabContents : public content::WebContents,
// content::WebContents ------------------------------------------------------
virtual const base::PropertyBag* GetPropertyBag() const OVERRIDE;
virtual base::PropertyBag* GetPropertyBag() OVERRIDE;
- virtual TabContentsDelegate* GetDelegate() OVERRIDE;
- virtual void SetDelegate(TabContentsDelegate* delegate) OVERRIDE;
+ virtual content::WebContentsDelegate* GetDelegate() OVERRIDE;
+ virtual void SetDelegate(content::WebContentsDelegate* delegate) OVERRIDE;
virtual RenderViewHost* GetRenderViewHost() const OVERRIDE;
@@ -764,7 +764,7 @@ class CONTENT_EXPORT TabContents : public content::WebContents,
// Data for core operation ---------------------------------------------------
// Delegate for notifying our owner about stuff. Not owned by us.
- TabContentsDelegate* delegate_;
+ content::WebContentsDelegate* delegate_;
// Handles the back/forward list and loading.
NavigationController controller_;
diff --git a/content/browser/tab_contents/tab_contents_delegate_unittest.cc b/content/browser/tab_contents/tab_contents_delegate_unittest.cc
index 8075ce1..9f9be0d 100644
--- a/content/browser/tab_contents/tab_contents_delegate_unittest.cc
+++ b/content/browser/tab_contents/tab_contents_delegate_unittest.cc
@@ -6,15 +6,15 @@
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "content/test/test_browser_context.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
-class MockTabContentsDelegate : public TabContentsDelegate {
+class MockWebContentsDelegate : public content::WebContentsDelegate {
public:
- virtual ~MockTabContentsDelegate() {}
+ virtual ~MockWebContentsDelegate() {}
virtual TabContents* OpenURLFromTab(TabContents* source,
const OpenURLParams& params) OVERRIDE {
@@ -52,7 +52,7 @@ class MockTabContentsDelegate : public TabContentsDelegate {
const GURL& url) {}
};
-TEST(TabContentsDelegateTest, UnregisterInDestructor) {
+TEST(WebContentsDelegateTest, UnregisterInDestructor) {
MessageLoop loop(MessageLoop::TYPE_UI);
TestBrowserContext browser_context;
@@ -63,7 +63,7 @@ TEST(TabContentsDelegateTest, UnregisterInDestructor) {
EXPECT_TRUE(contents_a->GetDelegate() == NULL);
EXPECT_TRUE(contents_b->GetDelegate() == NULL);
- scoped_ptr<MockTabContentsDelegate> delegate(new MockTabContentsDelegate());
+ scoped_ptr<MockWebContentsDelegate> delegate(new MockWebContentsDelegate());
// Setting a delegate should work correctly.
contents_a->SetDelegate(delegate.get());
diff --git a/content/browser/tab_contents/tab_contents_view_win.cc b/content/browser/tab_contents/tab_contents_view_win.cc
index b854c2c..296bf69 100644
--- a/content/browser/tab_contents/tab_contents_view_win.cc
+++ b/content/browser/tab_contents/tab_contents_view_win.cc
@@ -8,8 +8,8 @@
#include "content/browser/renderer_host/render_widget_host_view_win.h"
#include "content/browser/tab_contents/interstitial_page.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/browser/tab_contents/tab_contents_view_win_delegate.h"
+#include "content/public/browser/web_contents_delegate.h"
TabContentsViewWin::TabContentsViewWin(TabContents* tab_contents,
TabContentsViewWinDelegate* delegate)
diff --git a/content/content_browser.gypi b/content/content_browser.gypi
index 2a4d924..a281807 100644
--- a/content/content_browser.gypi
+++ b/content/content_browser.gypi
@@ -67,6 +67,8 @@
'public/browser/sensors_listener.h',
'public/browser/user_metrics.h',
'public/browser/web_contents.h',
+ 'public/browser/web_contents_delegate.cc',
+ 'public/browser/web_contents_delegate.h',
'browser/accessibility/browser_accessibility.cc',
'browser/accessibility/browser_accessibility.h',
'browser/accessibility/browser_accessibility_cocoa.h',
@@ -594,8 +596,6 @@
'browser/tab_contents/render_view_host_manager.h',
'browser/tab_contents/tab_contents.cc',
'browser/tab_contents/tab_contents.h',
- 'browser/tab_contents/tab_contents_delegate.cc',
- 'browser/tab_contents/tab_contents_delegate.h',
'browser/tab_contents/tab_contents_observer.cc',
'browser/tab_contents/tab_contents_observer.h',
'browser/tab_contents/tab_contents_view.cc',
diff --git a/content/public/browser/DEPS b/content/public/browser/DEPS
index 9d8d403..fdfd72c 100644
--- a/content/public/browser/DEPS
+++ b/content/public/browser/DEPS
@@ -5,4 +5,7 @@ include_rules = [
"+content/browser/download/download_id.h",
"+content/browser/download/download_state_info.h",
"+content/browser/download/interrupt_reasons.h",
+ "+content/browser/javascript_dialogs.h",
+ "+content/browser/tab_contents/navigation_entry.h",
+ "+content/browser/tab_contents/tab_contents.h",
]
diff --git a/content/public/browser/intents_host.h b/content/public/browser/intents_host.h
index 5eb6507..7eae638 100644
--- a/content/public/browser/intents_host.h
+++ b/content/public/browser/intents_host.h
@@ -19,7 +19,7 @@ namespace content {
// This class is the coordinator for dispatching web intents and seeing that
// return messages are sent to the correct invoking context. The TabContents
// for the invoking context will create one of these for each intent and hand
-// ownership to the client TabContentsDelegate code. The TabContentsDelegate
+// ownership to the client WebContentsDelegate code. The WebContentsDelegate
// code can then read the intent data, create UI to pick the service, and
// create a new context for that service. At that point, it should call
// DispatchIntent, which will connect the object to the new context.
diff --git a/content/public/browser/notification_types.h b/content/public/browser/notification_types.h
index e5d9654..57cd41e 100644
--- a/content/public/browser/notification_types.h
+++ b/content/public/browser/notification_types.h
@@ -204,8 +204,8 @@ enum NotificationType {
// Tabs --------------------------------------------------------------------
- // Sent when a tab is added to a TabContentsDelegate. The source is the
- // TabContentsDelegate and the details is the added TabContents.
+ // Sent when a tab is added to a WebContentsDelegate. The source is the
+ // WebContentsDelegate and the details is the added TabContents.
NOTIFICATION_TAB_ADDED,
// This notification is sent after a tab has been appended to the tab_strip.
@@ -258,8 +258,8 @@ enum NotificationType {
// Source<TabContents>.
NOTIFICATION_TAB_CONTENTS_DESTROYED,
- // This notification is sent when a TabContentsDelegate is being
- // destroyed. The source is a Source<TabContentsDelegate>.
+ // This notification is sent when a WebContentsDelegate is being
+ // destroyed. The source is a Source<WebContentsDelegate>.
// TODO(sky): Remove when we figure out http://crbug.com/107172.
NOTIFICATION_TAB_CONTENTS_DELEGATE_DESTROYED,
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index af1dd4d..a8b387a 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -9,9 +9,6 @@
#include "base/string16.h"
#include "content/common/content_export.h"
-// TODO(jam): of course we will have to rename TabContentsDelgate,
-// TabContentsView etc to use WebContents.
-class TabContentsDelegate;
class RenderViewHost;
namespace base {
@@ -20,6 +17,10 @@ class PropertyBag;
namespace content {
+// TODO(jam): of course we will have to rename TabContentsView etc to use
+// WebPage.
+class WebContentsDelegate;
+
// Describes what goes in the main content area of a tab.
class WebContents {
public:
@@ -31,13 +32,12 @@ class WebContents {
virtual const base::PropertyBag* GetPropertyBag() const = 0;
virtual base::PropertyBag* GetPropertyBag() = 0;
- // Get/Set the delegate.
- virtual TabContentsDelegate* GetDelegate() = 0;
- virtual void SetDelegate(TabContentsDelegate* delegate) = 0;
+ // Gets/Sets the delegate.
+ virtual WebContentsDelegate* GetDelegate() = 0;
+ virtual void SetDelegate(WebContentsDelegate* delegate) = 0;
// Gets the current RenderViewHost for this tab.
virtual RenderViewHost* GetRenderViewHost() const = 0;
-
};
} // namespace content
diff --git a/content/browser/tab_contents/tab_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
index 7b05703..eccd4cfe 100644
--- a/content/browser/tab_contents/tab_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/browser/tab_contents/tab_contents_delegate.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "base/compiler_specific.h"
#include "base/logging.h"
@@ -16,137 +16,137 @@
#include "ui/gfx/rect.h"
#include "webkit/glue/web_intent_data.h"
-using content::DownloadItem;
+namespace content {
-TabContentsDelegate::TabContentsDelegate() {
+WebContentsDelegate::WebContentsDelegate() {
}
-TabContents* TabContentsDelegate::OpenURLFromTab(TabContents* source,
+TabContents* WebContentsDelegate::OpenURLFromTab(TabContents* source,
const OpenURLParams& params) {
return NULL;
}
-void TabContentsDelegate::NavigationStateChanged(const TabContents* source,
+void WebContentsDelegate::NavigationStateChanged(const TabContents* source,
unsigned changed_flags) {
}
-void TabContentsDelegate::AddNavigationHeaders(const GURL& url,
+void WebContentsDelegate::AddNavigationHeaders(const GURL& url,
std::string* headers) {
}
-void TabContentsDelegate::AddNewContents(TabContents* source,
+void WebContentsDelegate::AddNewContents(TabContents* source,
TabContents* new_contents,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
bool user_gesture) {
}
-void TabContentsDelegate::ActivateContents(TabContents* contents) {
+void WebContentsDelegate::ActivateContents(TabContents* contents) {
}
-void TabContentsDelegate::DeactivateContents(TabContents* contents) {
+void WebContentsDelegate::DeactivateContents(TabContents* contents) {
}
-void TabContentsDelegate::LoadingStateChanged(TabContents* source) {
+void WebContentsDelegate::LoadingStateChanged(TabContents* source) {
}
-void TabContentsDelegate::LoadProgressChanged(double progress) {
+void WebContentsDelegate::LoadProgressChanged(double progress) {
}
-void TabContentsDelegate::CloseContents(TabContents* source) {
+void WebContentsDelegate::CloseContents(TabContents* source) {
}
-void TabContentsDelegate::SwappedOut(TabContents* source) {
+void WebContentsDelegate::SwappedOut(TabContents* source) {
}
-void TabContentsDelegate::MoveContents(TabContents* source,
+void WebContentsDelegate::MoveContents(TabContents* source,
const gfx::Rect& pos) {
}
-void TabContentsDelegate::DetachContents(TabContents* source) {
+void WebContentsDelegate::DetachContents(TabContents* source) {
}
-bool TabContentsDelegate::IsPopupOrPanel(const TabContents* source) const {
+bool WebContentsDelegate::IsPopupOrPanel(const TabContents* source) const {
return false;
}
-void TabContentsDelegate::UpdateTargetURL(TabContents* source,
+void WebContentsDelegate::UpdateTargetURL(TabContents* source,
int32 page_id,
const GURL& url) {
}
-void TabContentsDelegate::ContentsMouseEvent(
+void WebContentsDelegate::ContentsMouseEvent(
TabContents* source, const gfx::Point& location, bool motion) {
}
-void TabContentsDelegate::ContentsZoomChange(bool zoom_in) { }
+void WebContentsDelegate::ContentsZoomChange(bool zoom_in) { }
-bool TabContentsDelegate::IsApplication() const { return false; }
+bool WebContentsDelegate::IsApplication() const { return false; }
-void TabContentsDelegate::ConvertContentsToApplication(TabContents* source) { }
+void WebContentsDelegate::ConvertContentsToApplication(TabContents* source) { }
-bool TabContentsDelegate::CanReloadContents(TabContents* source) const {
+bool WebContentsDelegate::CanReloadContents(TabContents* source) const {
return true;
}
-void TabContentsDelegate::WillRunBeforeUnloadConfirm() {
+void WebContentsDelegate::WillRunBeforeUnloadConfirm() {
}
-bool TabContentsDelegate::ShouldSuppressDialogs() {
+bool WebContentsDelegate::ShouldSuppressDialogs() {
return false;
}
-void TabContentsDelegate::BeforeUnloadFired(TabContents* tab,
+void WebContentsDelegate::BeforeUnloadFired(TabContents* tab,
bool proceed,
bool* proceed_to_fire_unload) {
*proceed_to_fire_unload = true;
}
-void TabContentsDelegate::SetFocusToLocationBar(bool select_all) {}
+void WebContentsDelegate::SetFocusToLocationBar(bool select_all) {}
-bool TabContentsDelegate::ShouldFocusPageAfterCrash() {
+bool WebContentsDelegate::ShouldFocusPageAfterCrash() {
return true;
}
-void TabContentsDelegate::RenderWidgetShowing() {}
+void WebContentsDelegate::RenderWidgetShowing() {}
-bool TabContentsDelegate::TakeFocus(bool reverse) {
+bool WebContentsDelegate::TakeFocus(bool reverse) {
return false;
}
-void TabContentsDelegate::LostCapture() {
+void WebContentsDelegate::LostCapture() {
}
-void TabContentsDelegate::TabContentsFocused(TabContents* tab_content) {
+void WebContentsDelegate::TabContentsFocused(TabContents* tab_content) {
}
-int TabContentsDelegate::GetExtraRenderViewHeight() const {
+int WebContentsDelegate::GetExtraRenderViewHeight() const {
return 0;
}
-bool TabContentsDelegate::CanDownload(TabContents* source, int request_id) {
+bool WebContentsDelegate::CanDownload(TabContents* source, int request_id) {
return true;
}
-void TabContentsDelegate::OnStartDownload(TabContents* source,
+void WebContentsDelegate::OnStartDownload(TabContents* source,
DownloadItem* download) {
}
-bool TabContentsDelegate::HandleContextMenu(const ContextMenuParams& params) {
+bool WebContentsDelegate::HandleContextMenu(const ContextMenuParams& params) {
return false;
}
-bool TabContentsDelegate::ExecuteContextMenuCommand(int command) {
+bool WebContentsDelegate::ExecuteContextMenuCommand(int command) {
return false;
}
-void TabContentsDelegate::ShowPageInfo(content::BrowserContext* browser_context,
+void WebContentsDelegate::ShowPageInfo(content::BrowserContext* browser_context,
const GURL& url,
const NavigationEntry::SSLStatus& ssl,
bool show_history) {
}
-void TabContentsDelegate::ViewSourceForTab(TabContents* source,
+void WebContentsDelegate::ViewSourceForTab(TabContents* source,
const GURL& page_url) {
// Fall back implementation based entirely on the view-source scheme.
// It suffers from http://crbug.com/523 and that is why browser overrides
@@ -158,7 +158,7 @@ void TabContentsDelegate::ViewSourceForTab(TabContents* source,
content::PAGE_TRANSITION_LINK, false));
}
-void TabContentsDelegate::ViewSourceForFrame(TabContents* source,
+void WebContentsDelegate::ViewSourceForFrame(TabContents* source,
const GURL& frame_url,
const std::string& content_state) {
// Same as ViewSourceForTab, but for given subframe.
@@ -169,66 +169,66 @@ void TabContentsDelegate::ViewSourceForFrame(TabContents* source,
content::PAGE_TRANSITION_LINK, false));
}
-bool TabContentsDelegate::PreHandleKeyboardEvent(
+bool WebContentsDelegate::PreHandleKeyboardEvent(
const NativeWebKeyboardEvent& event,
bool* is_keyboard_shortcut) {
return false;
}
-void TabContentsDelegate::HandleKeyboardEvent(
+void WebContentsDelegate::HandleKeyboardEvent(
const NativeWebKeyboardEvent& event) {
}
-void TabContentsDelegate::HandleMouseDown() {
+void WebContentsDelegate::HandleMouseDown() {
}
-void TabContentsDelegate::HandleMouseUp() {
+void WebContentsDelegate::HandleMouseUp() {
}
-void TabContentsDelegate::HandleMouseActivate() {
+void WebContentsDelegate::HandleMouseActivate() {
}
-void TabContentsDelegate::DragEnded() {
+void WebContentsDelegate::DragEnded() {
}
-void TabContentsDelegate::ShowRepostFormWarningDialog(
+void WebContentsDelegate::ShowRepostFormWarningDialog(
TabContents* tab_contents) {
}
-bool TabContentsDelegate::OnGoToEntryOffset(int offset) {
+bool WebContentsDelegate::OnGoToEntryOffset(int offset) {
return true;
}
-bool TabContentsDelegate::ShouldAddNavigationToHistory(
+bool WebContentsDelegate::ShouldAddNavigationToHistory(
const history::HistoryAddPageArgs& add_page_args,
content::NavigationType navigation_type) {
return true;
}
-gfx::NativeWindow TabContentsDelegate::GetFrameNativeWindow() {
+gfx::NativeWindow WebContentsDelegate::GetFrameNativeWindow() {
return NULL;
}
-void TabContentsDelegate::TabContentsCreated(TabContents* new_contents) {
+void WebContentsDelegate::TabContentsCreated(TabContents* new_contents) {
}
-void TabContentsDelegate::ContentRestrictionsChanged(TabContents* source) {
+void WebContentsDelegate::ContentRestrictionsChanged(TabContents* source) {
}
-void TabContentsDelegate::RendererUnresponsive(TabContents* source) {
+void WebContentsDelegate::RendererUnresponsive(TabContents* source) {
}
-void TabContentsDelegate::RendererResponsive(TabContents* source) {
+void WebContentsDelegate::RendererResponsive(TabContents* source) {
}
-void TabContentsDelegate::WorkerCrashed(TabContents* source) {
+void WebContentsDelegate::WorkerCrashed(TabContents* source) {
}
-void TabContentsDelegate::DidNavigateMainFramePostCommit(
+void WebContentsDelegate::DidNavigateMainFramePostCommit(
TabContents* tab) {
}
-void TabContentsDelegate::DidNavigateToPendingEntry(TabContents* tab) {
+void WebContentsDelegate::DidNavigateToPendingEntry(TabContents* tab) {
}
// A stubbed-out version of JavaScriptDialogCreator that doesn't do anything.
@@ -265,36 +265,36 @@ class JavaScriptDialogCreatorStub : public content::JavaScriptDialogCreator {
};
content::JavaScriptDialogCreator*
-TabContentsDelegate::GetJavaScriptDialogCreator() {
+WebContentsDelegate::GetJavaScriptDialogCreator() {
return JavaScriptDialogCreatorStub::GetInstance();
}
-void TabContentsDelegate::RunFileChooser(
+void WebContentsDelegate::RunFileChooser(
TabContents* tab, const content::FileChooserParams& params) {
}
-void TabContentsDelegate::EnumerateDirectory(TabContents* tab, int request_id,
+void WebContentsDelegate::EnumerateDirectory(TabContents* tab, int request_id,
const FilePath& path) {
}
-void TabContentsDelegate::ToggleFullscreenModeForTab(TabContents* tab,
+void WebContentsDelegate::ToggleFullscreenModeForTab(TabContents* tab,
bool enter_fullscreen) {
}
-bool TabContentsDelegate::IsFullscreenForTab(const TabContents* tab) const {
+bool WebContentsDelegate::IsFullscreenForTab(const TabContents* tab) const {
return false;
}
-void TabContentsDelegate::JSOutOfMemory(TabContents* tab) {
+void WebContentsDelegate::JSOutOfMemory(TabContents* tab) {
}
-void TabContentsDelegate::RegisterProtocolHandler(TabContents* tab,
+void WebContentsDelegate::RegisterProtocolHandler(TabContents* tab,
const std::string& protocol,
const GURL& url,
const string16& title) {
}
-void TabContentsDelegate::RegisterIntentHandler(TabContents* tab,
+void WebContentsDelegate::RegisterIntentHandler(TabContents* tab,
const string16& action,
const string16& type,
const string16& href,
@@ -302,7 +302,7 @@ void TabContentsDelegate::RegisterIntentHandler(TabContents* tab,
const string16& disposition) {
}
-void TabContentsDelegate::WebIntentDispatch(
+void WebContentsDelegate::WebIntentDispatch(
TabContents* tab,
content::IntentsHost* intents_host) {
// The caller passes this method ownership of the |intents_host|, but this
@@ -310,7 +310,7 @@ void TabContentsDelegate::WebIntentDispatch(
delete intents_host;
}
-void TabContentsDelegate::FindReply(TabContents* tab,
+void WebContentsDelegate::FindReply(TabContents* tab,
int request_id,
int number_of_matches,
const gfx::Rect& selection_rect,
@@ -318,24 +318,27 @@ void TabContentsDelegate::FindReply(TabContents* tab,
bool final_update) {
}
-void TabContentsDelegate::CrashedPlugin(TabContents* tab,
+void WebContentsDelegate::CrashedPlugin(TabContents* tab,
const FilePath& plugin_path) {
}
-void TabContentsDelegate::UpdatePreferredSize(TabContents* tab,
+void WebContentsDelegate::UpdatePreferredSize(TabContents* tab,
const gfx::Size& pref_size) {
}
-void TabContentsDelegate::WebUISend(TabContents* tab,
+void WebContentsDelegate::WebUISend(TabContents* tab,
const GURL& source_url,
const std::string& name,
const base::ListValue& args) {
}
-void TabContentsDelegate::RequestToLockMouse(TabContents* tab) {
+void WebContentsDelegate::RequestToLockMouse(TabContents* tab) {
}
-TabContentsDelegate::~TabContentsDelegate() {
+void WebContentsDelegate::LostMouseLock() {
+}
+
+WebContentsDelegate::~WebContentsDelegate() {
while (!attached_contents_.empty()) {
TabContents* tab_contents = *attached_contents_.begin();
tab_contents->SetDelegate(NULL);
@@ -343,19 +346,18 @@ TabContentsDelegate::~TabContentsDelegate() {
DCHECK(attached_contents_.empty());
content::NotificationService::current()->Notify(
content::NOTIFICATION_TAB_CONTENTS_DELEGATE_DESTROYED,
- content::Source<TabContentsDelegate>(this),
+ content::Source<WebContentsDelegate>(this),
content::NotificationService::NoDetails());
}
-void TabContentsDelegate::Attach(TabContents* tab_contents) {
+void WebContentsDelegate::Attach(TabContents* tab_contents) {
DCHECK(attached_contents_.find(tab_contents) == attached_contents_.end());
attached_contents_.insert(tab_contents);
}
-void TabContentsDelegate::Detach(TabContents* tab_contents) {
+void WebContentsDelegate::Detach(TabContents* tab_contents) {
DCHECK(attached_contents_.find(tab_contents) != attached_contents_.end());
attached_contents_.erase(tab_contents);
}
-void TabContentsDelegate::LostMouseLock() {
-}
+} // namespace content
diff --git a/content/browser/tab_contents/tab_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index df23caf..ba9d31b 100644
--- a/content/browser/tab_contents/tab_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_
-#define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_
+#ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
+#define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
#pragma once
#include <set>
@@ -50,11 +50,13 @@ namespace webkit_glue {
struct WebIntentData;
}
+namespace content {
+
// Objects implement this interface to get notified about changes in the
// TabContents and to provide necessary functionality.
-class CONTENT_EXPORT TabContentsDelegate {
+class CONTENT_EXPORT WebContentsDelegate {
public:
- TabContentsDelegate();
+ WebContentsDelegate();
// Opens a new URL inside the passed in TabContents (if source is 0 open
// in the current front-most tab), unless |disposition| indicates the url
@@ -185,7 +187,7 @@ class CONTENT_EXPORT TabContentsDelegate {
virtual void RenderWidgetShowing();
// This is called when WebKit tells us that it is done tabbing through
- // controls on the page. Provides a way for TabContentsDelegates to handle
+ // controls on the page. Provides a way for WebContentsDelegates to handle
// this. Returns true if the delegate successfully handled it.
virtual bool TakeFocus(bool reverse);
@@ -363,19 +365,21 @@ class CONTENT_EXPORT TabContentsDelegate {
virtual void LostMouseLock();
protected:
- virtual ~TabContentsDelegate();
+ virtual ~WebContentsDelegate();
private:
- friend class TabContents;
+ friend class ::TabContents;
- // Called when |this| becomes the TabContentsDelegate for |source|.
+ // Called when |this| becomes the WebContentsDelegate for |source|.
void Attach(TabContents* source);
- // Called when |this| is no longer the TabContentsDelegate for |source|.
+ // Called when |this| is no longer the WebContentsDelegate for |source|.
void Detach(TabContents* source);
// The TabContents that this is currently a delegate for.
std::set<TabContents*> attached_contents_;
};
-#endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
diff --git a/content/public/common/file_chooser_params.h b/content/public/common/file_chooser_params.h
index 7088a92..7807cbd 100644
--- a/content/public/common/file_chooser_params.h
+++ b/content/public/common/file_chooser_params.h
@@ -14,7 +14,7 @@
namespace content {
-// Struct used by TabContentsDelegate.
+// Struct used by WebContentsDelegate.
struct CONTENT_EXPORT FileChooserParams {
FileChooserParams();
~FileChooserParams();
diff --git a/content/shell/shell.h b/content/shell/shell.h
index af5128c..ad8467e 100644
--- a/content/shell/shell.h
+++ b/content/shell/shell.h
@@ -12,7 +12,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/string_piece.h"
-#include "content/browser/tab_contents/tab_contents_delegate.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "ui/gfx/native_widget_types.h"
class GURL;
@@ -25,7 +25,7 @@ class BrowserContext;
// This represents one window of the Content Shell, i.e. all the UI including
// buttons and url bar, as well as the web content area.
-class Shell : public TabContentsDelegate {
+class Shell : public WebContentsDelegate {
public:
virtual ~Shell();
@@ -84,7 +84,7 @@ class Shell : public TabContentsDelegate {
gfx::NativeView GetContentView();
- // TabContentsDelegate
+ // content::WebContentsDelegate
virtual void LoadingStateChanged(TabContents* source) OVERRIDE;
virtual void DidNavigateMainFramePostCommit(TabContents* tab) OVERRIDE;
virtual void UpdatePreferredSize(TabContents* source,