diff options
Diffstat (limited to 'chrome/browser')
61 files changed, 139 insertions, 133 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" |