diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-20 23:00:42 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-20 23:00:42 +0000 |
commit | 674bc59999a151a3a8f76bb4c24cc3bee2f39090 (patch) | |
tree | ee68efd3843d86b8f1bbb66b43c7d9f02399487e /chrome/browser/ui | |
parent | 7f2c5556f158abe6518cc907a33702c651a9cce0 (diff) | |
download | chromium_src-674bc59999a151a3a8f76bb4c24cc3bee2f39090.zip chromium_src-674bc59999a151a3a8f76bb4c24cc3bee2f39090.tar.gz chromium_src-674bc59999a151a3a8f76bb4c24cc3bee2f39090.tar.bz2 |
Move TabContentsDelegate to content/public/browser and put it in the content namespace.
- Rename TabContentsDelegate to WebContentsDelegate and move it to web_contents_delegate.*
BUG=98716,105875
R=jam@chromium.org
TBR=avi@chromium.org
Review URL: http://codereview.chromium.org/9008013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115213 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui')
27 files changed, 65 insertions, 61 deletions
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" |