summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/app_controller_mac.mm1
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit.cc4
-rw-r--r--chrome/browser/autofill/autofill_external_delegate.cc4
-rw-r--r--chrome/browser/automation/automation_provider.cc4
-rw-r--r--chrome/browser/automation/automation_provider_observers.cc8
-rw-r--r--chrome/browser/background/background_contents_service.cc2
-rw-r--r--chrome/browser/bookmarks/bookmark_manager_extension_api.cc3
-rw-r--r--chrome/browser/chrome_browser_application_mac.mm4
-rw-r--r--chrome/browser/chromeos/accessibility/accessibility_util.cc2
-rw-r--r--chrome/browser/chromeos/external_protocol_dialog.cc18
-rw-r--r--chrome/browser/chromeos/external_protocol_dialog.h7
-rw-r--r--chrome/browser/chromeos/login/html_page_screen.cc1
-rw-r--r--chrome/browser/chromeos/login/lock_window_gtk.cc4
-rw-r--r--chrome/browser/chromeos/login/registration_screen.cc1
-rw-r--r--chrome/browser/chromeos/login/web_page_view.cc4
-rw-r--r--chrome/browser/chromeos/login/webui_login_view.cc12
-rw-r--r--chrome/browser/chromeos/media/media_player.cc1
-rw-r--r--chrome/browser/chromeos/notifications/balloon_view.cc2
-rw-r--r--chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc2
-rw-r--r--chrome/browser/debugger/browser_list_tabcontents_provider.cc2
-rw-r--r--chrome/browser/debugger/devtools_window.cc4
-rw-r--r--chrome/browser/debugger/devtools_window.h2
-rw-r--r--chrome/browser/download/chrome_download_manager_delegate.cc12
-rw-r--r--chrome/browser/download/chrome_download_manager_delegate.h6
-rw-r--r--chrome/browser/download/download_browsertest.cc2
-rw-r--r--chrome/browser/download/download_file_picker.cc11
-rw-r--r--chrome/browser/download/download_file_picker.h7
-rw-r--r--chrome/browser/download/download_manager_unittest.cc3
-rw-r--r--chrome/browser/download/download_request_limiter.cc14
-rw-r--r--chrome/browser/download/download_request_limiter.h5
-rw-r--r--chrome/browser/download/download_util.cc3
-rw-r--r--chrome/browser/download/save_package_file_picker.cc16
-rw-r--r--chrome/browser/extensions/execute_code_in_tab_function.cc10
-rw-r--r--chrome/browser/extensions/extension_debugger_api.cc38
-rw-r--r--chrome/browser/extensions/extension_debugger_api.h7
-rw-r--r--chrome/browser/extensions/extension_devtools_bridge.cc7
-rw-r--r--chrome/browser/extensions/extension_devtools_bridge.h2
-rw-r--r--chrome/browser/extensions/extension_disabled_infobar_delegate.cc2
-rw-r--r--chrome/browser/extensions/extension_message_service.cc25
-rw-r--r--chrome/browser/extensions/extension_message_service.h7
-rw-r--r--chrome/browser/extensions/extension_page_actions_module.cc4
-rw-r--r--chrome/browser/extensions/extension_page_capture_api.cc3
-rw-r--r--chrome/browser/extensions/extension_processes_api.cc4
-rw-r--r--chrome/browser/extensions/extension_webstore_private_api.cc2
-rw-r--r--chrome/browser/external_protocol/external_protocol_observer.cc7
-rw-r--r--chrome/browser/external_protocol/external_protocol_observer.h2
-rw-r--r--chrome/browser/favicon/favicon_tab_helper.cc6
-rw-r--r--chrome/browser/favicon/favicon_tab_helper.h2
-rw-r--r--chrome/browser/geolocation/chrome_geolocation_permission_context.cc26
-rw-r--r--chrome/browser/history/history_tab_helper.cc2
-rw-r--r--chrome/browser/infobars/infobar_extension_api.cc2
-rw-r--r--chrome/browser/instant/instant_controller.cc10
-rw-r--r--chrome/browser/notifications/desktop_notification_service.cc2
-rw-r--r--chrome/browser/prerender/prerender_browsertest.cc2
-rw-r--r--chrome/browser/prerender/prerender_tab_helper.cc4
-rw-r--r--chrome/browser/printing/background_printing_manager.cc20
-rw-r--r--chrome/browser/printing/print_preview_message_handler.cc29
-rw-r--r--chrome/browser/printing/print_preview_message_handler.h6
-rw-r--r--chrome/browser/printing/print_view_manager.cc8
-rw-r--r--chrome/browser/profiles/off_the_record_profile_impl.cc2
-rw-r--r--chrome/browser/safe_browsing/malware_details_history.cc2
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service.cc13
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_tab_observer.cc8
-rw-r--r--chrome/browser/sessions/restore_tab_helper.cc15
-rw-r--r--chrome/browser/sessions/restore_tab_helper.h4
-rw-r--r--chrome/browser/sessions/session_restore.cc2
-rw-r--r--chrome/browser/sessions/session_service.cc22
-rw-r--r--chrome/browser/speech/speech_input_bubble_views.cc2
-rw-r--r--chrome/browser/ssl/ssl_add_cert_handler.cc7
-rw-r--r--chrome/browser/tab_contents/confirm_infobar_delegate.cc1
-rw-r--r--chrome/browser/tab_contents/insecure_content_infobar_delegate.cc2
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu.cc3
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu_gtk.cc2
-rw-r--r--chrome/browser/tab_contents/tab_contents_ssl_helper.cc3
-rw-r--r--chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.cc4
-rw-r--r--chrome/browser/tab_contents/web_drag_bookmark_handler_mac.mm4
-rw-r--r--chrome/browser/tab_contents/web_drag_source_win.cc2
-rw-r--r--chrome/browser/tab_contents/web_drop_target_win.cc2
-rw-r--r--chrome/browser/task_manager/task_manager.cc6
-rw-r--r--chrome/browser/task_manager/task_manager_notification_resource_provider.cc2
-rw-r--r--chrome/browser/task_manager/task_manager_resource_providers.cc39
-rw-r--r--chrome/browser/translate/translate_infobar_delegate.cc2
-rw-r--r--chrome/browser/translate/translate_tab_helper.cc8
-rw-r--r--chrome/browser/translate/translate_tab_helper.h2
-rw-r--r--chrome/browser/ui/browser.cc2
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm6
-rw-r--r--chrome/browser/ui/sad_tab_observer.cc8
-rw-r--r--content/browser/debugger/devtools_frontend_host.cc7
-rw-r--r--content/browser/debugger/devtools_frontend_host.h2
-rw-r--r--content/browser/debugger/devtools_http_handler_impl.cc11
-rw-r--r--content/browser/debugger/devtools_manager_impl.cc4
-rw-r--r--content/browser/debugger/devtools_manager_impl.h2
-rw-r--r--content/browser/debugger/devtools_manager_unittest.cc2
-rw-r--r--content/browser/download/download_manager_impl.cc4
-rw-r--r--content/browser/download/mock_download_manager_delegate.h6
-rw-r--r--content/browser/download/save_package.cc4
-rw-r--r--content/browser/download/save_package.h1
-rw-r--r--content/browser/tab_contents/tab_contents.cc4
-rw-r--r--content/public/browser/devtools_client_host.h7
-rw-r--r--content/public/browser/devtools_frontend_host_delegate.h2
-rw-r--r--content/public/browser/devtools_http_handler_delegate.h6
-rw-r--r--content/public/browser/devtools_manager.h2
-rw-r--r--content/public/browser/download_manager_delegate.h11
-rw-r--r--content/public/browser/notification_types.h6
-rw-r--r--content/shell/shell_download_manager_delegate.cc8
-rw-r--r--content/shell/shell_download_manager_delegate.h6
107 files changed, 357 insertions, 325 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index cb0493c..a693a20 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -61,7 +61,6 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/service_messages.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/download_manager.h"
#include "content/public/browser/notification_service.h"
diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc
index 14e3d91f..974a73f 100644
--- a/chrome/browser/autocomplete/autocomplete_edit.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit.cc
@@ -42,9 +42,9 @@
#include "chrome/common/chrome_switches.h"
#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/public/browser/notification_service.h"
#include "content/public/browser/user_metrics.h"
+#include "content/public/browser/web_contents.h"
#include "googleurl/src/gurl.h"
#include "googleurl/src/url_util.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -1073,7 +1073,7 @@ void AutocompleteEditModel::DoPrerender(const AutocompleteMatch& match) {
prerender::PrerenderManager* prerender_manager =
prerender::PrerenderManagerFactory::GetForProfile(tab->profile());
if (prerender_manager) {
- RenderViewHost* current_host = tab->tab_contents()->GetRenderViewHost();
+ RenderViewHost* current_host = tab->web_contents()->GetRenderViewHost();
prerender_manager->AddPrerenderFromOmnibox(
match.destination_url, current_host->session_storage_namespace());
}
diff --git a/chrome/browser/autofill/autofill_external_delegate.cc b/chrome/browser/autofill/autofill_external_delegate.cc
index 6301920..6d0a6f3 100644
--- a/chrome/browser/autofill/autofill_external_delegate.cc
+++ b/chrome/browser/autofill/autofill_external_delegate.cc
@@ -9,7 +9,7 @@
#include "chrome/common/autofill_messages.h"
#include "chrome/common/chrome_constants.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -26,7 +26,7 @@ AutofillExternalDelegate::AutofillExternalDelegate(
void AutofillExternalDelegate::SelectAutofillSuggestionAtIndex(int listIndex) {
RenderViewHost* host =
- tab_contents_wrapper_->tab_contents()->GetRenderViewHost();
+ tab_contents_wrapper_->web_contents()->GetRenderViewHost();
host->Send(new AutofillMsg_SelectAutofillSuggestionAtIndex(
host->routing_id(),
listIndex));
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 9e4b25f..f33ca73 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -82,10 +82,10 @@
#include "content/browser/download/save_package.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/ssl/ssl_manager.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/download_item.h"
+#include "content/public/browser/web_contents.h"
#include "net/proxy/proxy_config_service_fixed.h"
#include "net/proxy/proxy_service.h"
#include "net/url_request/url_request_context.h"
@@ -634,7 +634,7 @@ void AutomationProvider::OverrideEncoding(int tab_handle,
}
} else {
// There is no UI, Chrome probably runs as Chrome-Frame mode.
- // Try to get TabContents and call its override_encoding method.
+ // Try to get WebContents and call its override_encoding method.
WebContents* contents = nav->GetWebContents();
if (!contents)
return;
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index 74eb429..223014d 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -76,10 +76,10 @@
#include "chrome/common/extensions/extension.h"
#include "content/browser/download/save_package.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_process_host.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/common/process_type.h"
#include "googleurl/src/gurl.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -394,7 +394,7 @@ void TabStripNotificationObserver::Observe(
if (type == notification_) {
if (type == content::NOTIFICATION_TAB_PARENTED) {
ObserveTab(&(content::Source<TabContentsWrapper>(source).ptr()->
- tab_contents()->GetController()));
+ web_contents()->GetController()));
} else {
ObserveTab(content::Source<NavigationController>(source).ptr());
}
@@ -2675,7 +2675,7 @@ AllViewsStoppedLoadingObserver::AllViewsStoppedLoadingObserver(
browser->GetTabContentsWrapperAt(i);
StartObserving(contents_wrapper->automation_tab_helper());
if (contents_wrapper->automation_tab_helper()->has_pending_loads())
- pending_tabs_.insert(contents_wrapper->tab_contents());
+ pending_tabs_.insert(contents_wrapper->web_contents());
}
}
CheckIfNoMorePendingLoads();
@@ -2753,7 +2753,7 @@ void NewTabObserver::Observe(int type,
DCHECK_EQ(content::NOTIFICATION_TAB_PARENTED, type);
NavigationController* controller =
&(content::Source<TabContentsWrapper>(source).ptr()->
- tab_contents()->GetController());
+ web_contents()->GetController());
if (automation_) {
// TODO(phajdan.jr): Clean up this hack. We write the correct return type
// here, but don't send the message. NavigationNotificationObserver
diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc
index 6b60a8d..5072851 100644
--- a/chrome/browser/background/background_contents_service.cc
+++ b/chrome/browser/background/background_contents_service.cc
@@ -28,8 +28,8 @@
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/pref_names.h"
#include "content/browser/site_instance.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/bookmarks/bookmark_manager_extension_api.cc b/chrome/browser/bookmarks/bookmark_manager_extension_api.cc
index 2d52b4c..1e1718e 100644
--- a/chrome/browser/bookmarks/bookmark_manager_extension_api.cc
+++ b/chrome/browser/bookmarks/bookmark_manager_extension_api.cc
@@ -24,7 +24,8 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/chrome_view_type.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/browser/renderer_host/render_view_host_delegate.h"
+#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/chrome_browser_application_mac.mm b/chrome/browser/chrome_browser_application_mac.mm
index 708943b..3ddba2c 100644
--- a/chrome/browser/chrome_browser_application_mac.mm
+++ b/chrome/browser/chrome_browser_application_mac.mm
@@ -17,7 +17,7 @@
#import "chrome/common/mac/objc_zombie.h"
#include "content/browser/accessibility/browser_accessibility_state.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/web_contents.h"
// The implementation of NSExceptions break various assumptions in the
// Chrome code. This category defines a replacement for
@@ -479,7 +479,7 @@ void SwizzleInit() {
++it) {
if (TabContentsWrapper* contents = *it) {
if (RenderViewHost* rvh =
- contents->tab_contents()->GetRenderViewHost()) {
+ contents->web_contents()->GetRenderViewHost()) {
rvh->EnableRendererAccessibility();
}
}
diff --git a/chrome/browser/chromeos/accessibility/accessibility_util.cc b/chrome/browser/chromeos/accessibility/accessibility_util.cc
index 664c041..db66dc4 100644
--- a/chrome/browser/chromeos/accessibility/accessibility_util.cc
+++ b/chrome/browser/chromeos/accessibility/accessibility_util.cc
@@ -20,8 +20,8 @@
#include "chrome/common/pref_names.h"
#include "content/browser/accessibility/browser_accessibility_state.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/webui/web_ui.h"
+#include "content/public/browser/web_contents.h"
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/chromeos/external_protocol_dialog.cc b/chrome/browser/chromeos/external_protocol_dialog.cc
index fc279c6..4be17fb 100644
--- a/chrome/browser/chromeos/external_protocol_dialog.cc
+++ b/chrome/browser/chromeos/external_protocol_dialog.cc
@@ -11,8 +11,8 @@
#include "chrome/browser/tab_contents/tab_util.h"
#include "chrome/browser/ui/dialog_style.h"
#include "chrome/browser/ui/views/window.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
+#include "content/public/browser/web_contents.h"
#include "googleurl/src/gurl.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -21,6 +21,8 @@
#include "ui/views/controls/message_box_view.h"
#include "ui/views/widget/widget.h"
+using content::WebContents;
+
namespace {
const int kMessageWidth = 400;
@@ -33,10 +35,10 @@ const int kMessageWidth = 400;
// static
void ExternalProtocolHandler::RunExternalProtocolDialog(
const GURL& url, int render_process_host_id, int routing_id) {
- TabContents* tab_contents = tab_util::GetTabContentsByID(
+ WebContents* web_contents = tab_util::GetWebContentsByID(
render_process_host_id, routing_id);
- DCHECK(tab_contents);
- new ExternalProtocolDialog(tab_contents, url);
+ DCHECK(web_contents);
+ new ExternalProtocolDialog(web_contents, url);
}
///////////////////////////////////////////////////////////////////////////////
@@ -93,7 +95,7 @@ views::Widget* ExternalProtocolDialog::GetWidget() {
///////////////////////////////////////////////////////////////////////////////
// ExternalProtocolDialog, private:
-ExternalProtocolDialog::ExternalProtocolDialog(TabContents* tab_contents,
+ExternalProtocolDialog::ExternalProtocolDialog(WebContents* web_contents,
const GURL& url)
: creation_time_(base::TimeTicks::Now()),
scheme_(url.scheme()) {
@@ -116,10 +118,10 @@ ExternalProtocolDialog::ExternalProtocolDialog(TabContents* tab_contents,
l10n_util::GetStringUTF16(IDS_EXTERNAL_PROTOCOL_CHECKBOX_TEXT));
gfx::NativeWindow parent_window;
- if (tab_contents) {
- parent_window = tab_contents->GetView()->GetTopLevelNativeWindow();
+ if (web_contents) {
+ parent_window = web_contents->GetView()->GetTopLevelNativeWindow();
} else {
- // Dialog is top level if we don't have a tab_contents associated with us.
+ // Dialog is top level if we don't have a web_contents associated with us.
parent_window = NULL;
}
browser::CreateViewsWindow(parent_window, this, STYLE_GENERIC)->Show();
diff --git a/chrome/browser/chromeos/external_protocol_dialog.h b/chrome/browser/chromeos/external_protocol_dialog.h
index 8384253..0a4f068 100644
--- a/chrome/browser/chromeos/external_protocol_dialog.h
+++ b/chrome/browser/chromeos/external_protocol_dialog.h
@@ -13,7 +13,10 @@
#include "ui/views/window/dialog_delegate.h"
class GURL;
-class TabContents;
+
+namespace content {
+class WebContents;
+}
namespace views {
class MessageBoxView;
@@ -25,7 +28,7 @@ class MessageBoxView;
class ExternalProtocolDialog : public views::DialogDelegate {
public:
// RunExternalProtocolDialog calls this private constructor.
- ExternalProtocolDialog(TabContents* tab_contents, const GURL& url);
+ ExternalProtocolDialog(content::WebContents* web_contents, const GURL& url);
virtual ~ExternalProtocolDialog();
diff --git a/chrome/browser/chromeos/login/html_page_screen.cc b/chrome/browser/chromeos/login/html_page_screen.cc
index ca79715..a2d7f26 100644
--- a/chrome/browser/chromeos/login/html_page_screen.cc
+++ b/chrome/browser/chromeos/login/html_page_screen.cc
@@ -14,7 +14,6 @@
#include "chrome/browser/ui/views/handle_web_keyboard_event.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/site_instance.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "googleurl/src/gurl.h"
#include "ui/views/events/event.h"
diff --git a/chrome/browser/chromeos/login/lock_window_gtk.cc b/chrome/browser/chromeos/login/lock_window_gtk.cc
index c375336..184e1c3 100644
--- a/chrome/browser/chromeos/login/lock_window_gtk.cc
+++ b/chrome/browser/chromeos/login/lock_window_gtk.cc
@@ -28,9 +28,9 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/url_constants.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/web_contents.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/x/x11_util.h"
#include "ui/gfx/screen.h"
@@ -79,7 +79,7 @@ LockWindow* LockWindow::Create() {
void LockWindowGtk::Grab(DOMView* dom_view) {
// Grab on the RenderWidgetHostView hosting the WebUI login screen.
- grab_widget_ = dom_view->dom_contents()->tab_contents()->
+ grab_widget_ = dom_view->dom_contents()->web_contents()->
GetRenderWidgetHostView()->GetNativeView();
ClearGtkGrab();
diff --git a/chrome/browser/chromeos/login/registration_screen.cc b/chrome/browser/chromeos/login/registration_screen.cc
index 2d6e104..1229ef5 100644
--- a/chrome/browser/chromeos/login/registration_screen.cc
+++ b/chrome/browser/chromeos/login/registration_screen.cc
@@ -15,7 +15,6 @@
#include "content/browser/child_process_security_policy.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/site_instance.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "googleurl/src/gurl.h"
#include "net/url_request/url_request_about_job.h"
#include "net/url_request/url_request_filter.h"
diff --git a/chrome/browser/chromeos/login/web_page_view.cc b/chrome/browser/chromeos/login/web_page_view.cc
index 298bede..a9cd10e 100644
--- a/chrome/browser/chromeos/login/web_page_view.cc
+++ b/chrome/browser/chromeos/login/web_page_view.cc
@@ -13,8 +13,8 @@
#include "chrome/browser/chromeos/login/rounded_rect_painter.h"
#include "chrome/browser/profiles/profile.h"
#include "content/browser/child_process_security_policy.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/webui/web_ui.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/common/bindings_policy.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -89,7 +89,7 @@ void WizardWebPageViewTabContents::DocumentLoadedInFrame(
void WebPageDomView::SetWebContentsDelegate(
content::WebContentsDelegate* delegate) {
- dom_contents_->tab_contents()->SetDelegate(delegate);
+ dom_contents_->web_contents()->SetDelegate(delegate);
}
///////////////////////////////////////////////////////////////////////////////
diff --git a/chrome/browser/chromeos/login/webui_login_view.cc b/chrome/browser/chromeos/login/webui_login_view.cc
index 267cc33..42b81fd 100644
--- a/chrome/browser/chromeos/login/webui_login_view.cc
+++ b/chrome/browser/chromeos/login/webui_login_view.cc
@@ -21,8 +21,8 @@
#include "chrome/browser/ui/views/dom_view.h"
#include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
#include "chrome/common/render_messages.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/render_view_host_observer.h"
+#include "content/public/browser/web_contents.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
#include "ui/views/widget/widget.h"
@@ -148,10 +148,10 @@ void WebUILoginView::Init(views::Widget* login_window) {
webui_login_->Init(ProfileManager::GetDefaultProfile(), NULL);
webui_login_->SetVisible(true);
- TabContents* tab_contents = webui_login_->dom_contents()->tab_contents();
- tab_contents->SetDelegate(this);
+ WebContents* web_contents = webui_login_->dom_contents()->web_contents();
+ web_contents->SetDelegate(this);
- tab_watcher_.reset(new TabFirstRenderWatcher(tab_contents, this));
+ tab_watcher_.reset(new TabFirstRenderWatcher(web_contents, this));
}
std::string WebUILoginView::GetClassName() const {
@@ -209,7 +209,7 @@ void WebUILoginView::LoadURL(const GURL & url) {
}
WebUI* WebUILoginView::GetWebUI() {
- return webui_login_->dom_contents()->tab_contents()->GetWebUI();
+ return webui_login_->dom_contents()->web_contents()->GetWebUI();
}
void WebUILoginView::SetStatusAreaEnabled(bool enable) {
@@ -408,7 +408,7 @@ bool WebUILoginView::TakeFocus(bool reverse) {
void WebUILoginView::ReturnFocus(bool reverse) {
// Return the focus to the web contents.
- webui_login_->dom_contents()->tab_contents()->
+ webui_login_->dom_contents()->web_contents()->
FocusThroughTabTraversal(reverse);
GetWidget()->Activate();
}
diff --git a/chrome/browser/chromeos/media/media_player.cc b/chrome/browser/chromeos/media/media_player.cc
index 4642824..5fbe6ee 100644
--- a/chrome/browser/chromeos/media/media_player.cc
+++ b/chrome/browser/chromeos/media/media_player.cc
@@ -35,7 +35,6 @@
#include "chrome/common/jstemplate_builder.h"
#include "chrome/common/time_format.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/download_manager.h"
#include "content/public/browser/user_metrics.h"
diff --git a/chrome/browser/chromeos/notifications/balloon_view.cc b/chrome/browser/chromeos/notifications/balloon_view.cc
index c669f63..63ac25f 100644
--- a/chrome/browser/chromeos/notifications/balloon_view.cc
+++ b/chrome/browser/chromeos/notifications/balloon_view.cc
@@ -21,9 +21,9 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
+#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
diff --git a/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc b/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc
index 2375954..85cd869 100644
--- a/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc
+++ b/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc
@@ -9,8 +9,8 @@
#include "chrome/browser/google/google_util.h"
#include "chrome/browser/infobars/infobar_tab_helper.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/user_metrics.h"
+#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/debugger/browser_list_tabcontents_provider.cc b/chrome/browser/debugger/browser_list_tabcontents_provider.cc
index 1a96ca3..ae02cd0 100644
--- a/chrome/browser/debugger/browser_list_tabcontents_provider.cc
+++ b/chrome/browser/debugger/browser_list_tabcontents_provider.cc
@@ -21,7 +21,7 @@ BrowserListTabContentsProvider::GetInspectableTabs() {
end = BrowserList::end(); it != end; ++it) {
TabStripModel* model = (*it)->tabstrip_model();
for (int i = 0, size = model->count(); i < size; ++i)
- tabs.push_back(model->GetTabContentsAt(i)->tab_contents());
+ tabs.push_back(model->GetTabContentsAt(i)->web_contents());
}
return tabs;
}
diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc
index 110697a..d7cdb8fe 100644
--- a/chrome/browser/debugger/devtools_window.cc
+++ b/chrome/browser/debugger/devtools_window.cc
@@ -194,7 +194,7 @@ DevToolsWindow::DevToolsWindow(TabContentsWrapper* tab_contents,
action_on_load_(DEVTOOLS_TOGGLE_ACTION_NONE),
frontend_host_(NULL) {
frontend_host_ = DevToolsClientHost::CreateDevToolsFrontendHost(
- tab_contents->tab_contents(),
+ tab_contents->web_contents(),
this);
g_instances.Get().push_back(this);
// Wipe out page icon so that the default application icon is used.
@@ -257,7 +257,7 @@ void DevToolsWindow::InspectedTabClosing() {
}
}
-void DevToolsWindow::TabReplaced(TabContents* new_tab) {
+void DevToolsWindow::TabReplaced(WebContents* new_tab) {
TabContentsWrapper* new_tab_wrapper =
TabContentsWrapper::GetCurrentWrapperForContents(new_tab);
DCHECK(new_tab_wrapper);
diff --git a/chrome/browser/debugger/devtools_window.h b/chrome/browser/debugger/devtools_window.h
index b8fb5da..f1fc5d7 100644
--- a/chrome/browser/debugger/devtools_window.h
+++ b/chrome/browser/debugger/devtools_window.h
@@ -61,7 +61,7 @@ class DevToolsWindow : private content::NotificationObserver,
// Overridden from DevToolsClientHost.
virtual void InspectedTabClosing() OVERRIDE;
- virtual void TabReplaced(TabContents* new_tab) OVERRIDE;
+ virtual void TabReplaced(content::WebContents* new_tab) OVERRIDE;
RenderViewHost* GetRenderViewHost();
void Show(DevToolsToggleAction action);
diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc
index c15775e..3eff442 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
@@ -32,11 +32,11 @@
#include "chrome/common/extensions/user_script.h"
#include "chrome/common/pref_names.h"
#include "content/browser/download/download_status_updater.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/download_file.h"
#include "content/public/browser/download_item.h"
#include "content/public/browser/download_manager.h"
#include "content/public/browser/notification_source.h"
+#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -125,12 +125,12 @@ bool ChromeDownloadManagerDelegate::ShouldStartDownload(int32 download_id) {
}
void ChromeDownloadManagerDelegate::ChooseDownloadPath(
- TabContents* tab_contents,
+ WebContents* web_contents,
const FilePath& suggested_path,
void* data) {
// Deletes itself.
new DownloadFilePicker(
- download_manager_, tab_contents, suggested_path, data);
+ download_manager_, web_contents, suggested_path, data);
}
bool ChromeDownloadManagerDelegate::OverrideIntermediatePath(
@@ -161,7 +161,7 @@ bool ChromeDownloadManagerDelegate::OverrideIntermediatePath(
}
WebContents* ChromeDownloadManagerDelegate::
- GetAlternativeTabContentsToNotifyForDownload() {
+ GetAlternativeWebContentsToNotifyForDownload() {
// Start the download in the last active browser. This is not ideal but better
// than fully hiding the download from the user.
Browser* last_active = BrowserList::GetLastActiveWithProfile(profile_);
@@ -276,11 +276,11 @@ void ChromeDownloadManagerDelegate::RemoveItemsFromPersistentStoreBetween(
download_history_->RemoveEntriesBetween(remove_begin, remove_end);
}
-void ChromeDownloadManagerDelegate::GetSaveDir(TabContents* tab_contents,
+void ChromeDownloadManagerDelegate::GetSaveDir(WebContents* web_contents,
FilePath* website_save_dir,
FilePath* download_save_dir) {
Profile* profile =
- Profile::FromBrowserContext(tab_contents->GetBrowserContext());
+ Profile::FromBrowserContext(web_contents->GetBrowserContext());
PrefService* prefs = profile->GetPrefs();
// Check whether the preference has the preferred directory for saving file.
diff --git a/chrome/browser/download/chrome_download_manager_delegate.h b/chrome/browser/download/chrome_download_manager_delegate.h
index 052035b..b1e7817 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.h
+++ b/chrome/browser/download/chrome_download_manager_delegate.h
@@ -55,13 +55,13 @@ class ChromeDownloadManagerDelegate
virtual void Shutdown() OVERRIDE;
virtual bool ShouldStartDownload(int32 download_id) OVERRIDE;
- virtual void ChooseDownloadPath(TabContents* tab_contents,
+ virtual void ChooseDownloadPath(content::WebContents* web_contents,
const FilePath& suggested_path,
void* data) OVERRIDE;
virtual bool OverrideIntermediatePath(content::DownloadItem* item,
FilePath* intermediate_path) OVERRIDE;
virtual content::WebContents*
- GetAlternativeTabContentsToNotifyForDownload() OVERRIDE;
+ GetAlternativeWebContentsToNotifyForDownload() OVERRIDE;
virtual bool ShouldOpenFileBasedOnExtension(const FilePath& path) OVERRIDE;
virtual bool ShouldCompleteDownload(content::DownloadItem* item) OVERRIDE;
virtual bool ShouldOpenDownload(content::DownloadItem* item) OVERRIDE;
@@ -78,7 +78,7 @@ class ChromeDownloadManagerDelegate
virtual void RemoveItemsFromPersistentStoreBetween(
base::Time remove_begin,
base::Time remove_end) OVERRIDE;
- virtual void GetSaveDir(TabContents* tab_contents,
+ virtual void GetSaveDir(content::WebContents* web_contents,
FilePath* website_save_dir,
FilePath* download_save_dir) OVERRIDE;
virtual void ChooseSavePath(const base::WeakPtr<SavePackage>& save_package,
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc
index 547aaa0..267ae05 100644
--- a/chrome/browser/download/download_browsertest.cc
+++ b/chrome/browser/download/download_browsertest.cc
@@ -154,7 +154,7 @@ class PickSuggestedFileDelegate : public ChromeDownloadManagerDelegate {
DownloadServiceFactory::GetForProfile(profile)->GetDownloadManager());
}
- virtual void ChooseDownloadPath(TabContents* tab_contents,
+ virtual void ChooseDownloadPath(WebContents* web_contents,
const FilePath& suggested_path,
void* data) OVERRIDE {
if (download_manager_)
diff --git a/chrome/browser/download/download_file_picker.cc b/chrome/browser/download/download_file_picker.cc
index 233b74b..22d6365 100644
--- a/chrome/browser/download/download_file_picker.cc
+++ b/chrome/browser/download/download_file_picker.cc
@@ -8,15 +8,16 @@
#include "chrome/browser/platform_util.h"
#include "chrome/browser/profiles/profile.h"
#include "content/browser/download/save_package.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
using content::DownloadManager;
+using content::WebContents;
DownloadFilePicker::DownloadFilePicker(
DownloadManager* download_manager,
- TabContents* tab_contents,
+ WebContents* web_contents,
const FilePath& suggested_path,
void* params)
: download_manager_(download_manager) {
@@ -29,14 +30,14 @@ DownloadFilePicker::DownloadFilePicker(
file_type_info.extensions[0].push_back(extension);
}
file_type_info.include_all_files = true;
- gfx::NativeWindow owning_window = tab_contents ?
- platform_util::GetTopLevel(tab_contents->GetNativeView()) : NULL;
+ gfx::NativeWindow owning_window = web_contents ?
+ platform_util::GetTopLevel(web_contents->GetNativeView()) : NULL;
select_file_dialog_->SelectFile(SelectFileDialog::SELECT_SAVEAS_FILE,
string16(),
suggested_path,
&file_type_info, 0, FILE_PATH_LITERAL(""),
- tab_contents, owning_window, params);
+ web_contents, owning_window, params);
}
DownloadFilePicker::~DownloadFilePicker() {
diff --git a/chrome/browser/download/download_file_picker.h b/chrome/browser/download/download_file_picker.h
index 81e7d31..f7d7340 100644
--- a/chrome/browser/download/download_file_picker.h
+++ b/chrome/browser/download/download_file_picker.h
@@ -10,14 +10,17 @@
#include "content/public/browser/download_manager.h"
class FilePath;
-class TabContents;
+
+namespace content {
+class WebContents;
+}
// Handles showing a dialog to the user to ask for the filename for a download.
class DownloadFilePicker : public content::DownloadManager::Observer,
public SelectFileDialog::Listener {
public:
DownloadFilePicker(content::DownloadManager* download_manager,
- TabContents* tab_contents,
+ content::WebContents* web_contents,
const FilePath& suggested_path,
void* params);
virtual ~DownloadFilePicker();
diff --git a/chrome/browser/download/download_manager_unittest.cc b/chrome/browser/download/download_manager_unittest.cc
index 965924f..42e6a2c 100644
--- a/chrome/browser/download/download_manager_unittest.cc
+++ b/chrome/browser/download/download_manager_unittest.cc
@@ -60,6 +60,7 @@ using content::BrowserThread;
using content::DownloadFile;
using content::DownloadItem;
using content::DownloadManager;
+using content::WebContents;
namespace {
@@ -92,7 +93,7 @@ class TestDownloadManagerDelegate : public ChromeDownloadManagerDelegate {
mark_content_dangerous_(false) {
}
- virtual void ChooseDownloadPath(TabContents* tab_contents,
+ virtual void ChooseDownloadPath(WebContents* web_contents,
const FilePath& suggested_path,
void* data) OVERRIDE {
if (!expected_suggested_path_.empty()) {
diff --git a/chrome/browser/download/download_request_limiter.cc b/chrome/browser/download/download_request_limiter.cc
index b5cc56e..78f2acd 100644
--- a/chrome/browser/download/download_request_limiter.cc
+++ b/chrome/browser/download/download_request_limiter.cc
@@ -12,12 +12,12 @@
#include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h"
#include "chrome/browser/ui/blocked_content/blocked_content_tab_helper_delegate.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
using content::BrowserThread;
@@ -71,7 +71,7 @@ void DownloadRequestLimiter::TabDownloadState::OnUserGesture() {
}
void DownloadRequestLimiter::TabDownloadState::PromptUserForDownload(
- TabContents* tab,
+ WebContents* tab,
DownloadRequestLimiter::Callback* callback) {
callbacks_.push_back(callback);
@@ -197,7 +197,7 @@ DownloadRequestLimiter::~DownloadRequestLimiter() {
}
DownloadRequestLimiter::DownloadStatus
- DownloadRequestLimiter::GetDownloadStatus(TabContents* tab) {
+ DownloadRequestLimiter::GetDownloadStatus(WebContents* tab) {
TabDownloadState* state = GetDownloadState(&tab->GetController(), NULL, false);
return state ? state->download_status() : ALLOW_ONE_DOWNLOAD;
}
@@ -253,8 +253,8 @@ void DownloadRequestLimiter::CanDownload(int render_process_host_id,
Callback* callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- TabContents* originating_tab =
- tab_util::GetTabContentsByID(render_process_host_id, render_view_id);
+ WebContents* originating_tab =
+ tab_util::GetWebContentsByID(render_process_host_id, render_view_id);
if (!originating_tab) {
// The tab was closed, don't allow the download.
ScheduleNotification(callback, false);
@@ -291,7 +291,7 @@ void DownloadRequestLimiter::CanDownloadImpl(
}
TabDownloadState* state = GetDownloadState(
- &effective_wrapper->tab_contents()->GetController(),
+ &effective_wrapper->web_contents()->GetController(),
&tab->GetController(), true);
switch (state->download_status()) {
case ALLOW_ALL_DOWNLOADS:
@@ -312,7 +312,7 @@ void DownloadRequestLimiter::CanDownloadImpl(
break;
case PROMPT_BEFORE_DOWNLOAD:
- state->PromptUserForDownload(effective_wrapper->tab_contents(), callback);
+ state->PromptUserForDownload(effective_wrapper->web_contents(), callback);
state->increment_download_count();
break;
diff --git a/chrome/browser/download/download_request_limiter.h b/chrome/browser/download/download_request_limiter.h
index 5cf4b50..7e08ef4 100644
--- a/chrome/browser/download/download_request_limiter.h
+++ b/chrome/browser/download/download_request_limiter.h
@@ -15,7 +15,6 @@
#include "content/public/browser/notification_registrar.h"
class DownloadRequestInfoBarDelegate;
-class TabContents;
class TabContentsWrapper;
namespace content {
@@ -109,7 +108,7 @@ class DownloadRequestLimiter
// Asks the user if they really want to allow the download.
// See description above CanDownloadOnIOThread for details on lifetime of
// callback.
- void PromptUserForDownload(TabContents* tab,
+ void PromptUserForDownload(content::WebContents* tab,
DownloadRequestLimiter::Callback* callback);
// Are we showing a prompt to the user?
@@ -173,7 +172,7 @@ class DownloadRequestLimiter
// Returns the download status for a page. This does not change the state in
// anyway.
- DownloadStatus GetDownloadStatus(TabContents* tab);
+ DownloadStatus GetDownloadStatus(content::WebContents* tab);
// Updates the state of the page as necessary and notifies the callback.
// WARNING: both this call and the callback are invoked on the io thread.
diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc
index 5295e15..737f30a 100644
--- a/chrome/browser/download/download_util.cc
+++ b/chrome/browser/download/download_util.cc
@@ -36,7 +36,6 @@
#include "content/browser/download/download_types.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/download_file.h"
#include "content/public/browser/download_item.h"
@@ -388,7 +387,7 @@ void DragDownload(const DownloadItem* download,
if (mime_type.empty())
net::GetMimeTypeFromFile(full_path, &mime_type);
- // Add URL so that we can load supported files when dragged to TabContents.
+ // Add URL so that we can load supported files when dragged to WebContents.
if (net::IsSupportedMimeType(mime_type)) {
data.SetURL(net::FilePathToFileURL(full_path),
download->GetFileNameToReportUser().LossyDisplayName());
diff --git a/chrome/browser/download/save_package_file_picker.cc b/chrome/browser/download/save_package_file_picker.cc
index dd0e0f3..8cec092 100644
--- a/chrome/browser/download/save_package_file_picker.cc
+++ b/chrome/browser/download/save_package_file_picker.cc
@@ -12,11 +12,13 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.h"
#include "content/browser/download/save_package.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/download_manager.h"
+#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
+using content::WebContents;
+
namespace {
// If false, we don't prompt the user as to where to save the file. This
@@ -120,16 +122,16 @@ SavePackageFilePicker::SavePackageFilePicker(
if (g_should_prompt_for_filename) {
select_file_dialog_ = SelectFileDialog::Create(this);
- TabContents* tab_contents = save_package_->tab_contents();
+ WebContents* web_contents = save_package_->web_contents();
select_file_dialog_->SelectFile(SelectFileDialog::SELECT_SAVEAS_FILE,
string16(),
suggested_path,
&file_type_info,
file_type_index,
default_extension,
- tab_contents,
+ web_contents,
platform_util::GetTopLevel(
- tab_contents->GetNativeView()),
+ web_contents->GetNativeView()),
NULL);
} else {
// Just use 'suggested_path' instead of opening the dialog prompt.
@@ -153,10 +155,10 @@ void SavePackageFilePicker::FileSelected(const FilePath& path,
index <= kSelectFileCompleteIndex);
if (save_package_) {
- TabContents* tab_contents = save_package_->tab_contents();
+ WebContents* web_contents = save_package_->web_contents();
SavePackage::SavePackageType save_type = kIndexToSaveType[index];
Profile* profile =
- Profile::FromBrowserContext(tab_contents->GetBrowserContext());
+ Profile::FromBrowserContext(web_contents->GetBrowserContext());
PrefService* prefs = profile->GetPrefs();
if (select_file_dialog_ &&
select_file_dialog_->HasMultipleFileTypeChoices())
@@ -171,7 +173,7 @@ void SavePackageFilePicker::FileSelected(const FilePath& path,
#endif
// If user change the default saving directory, we will remember it just
// like IE and FireFox.
- if (!tab_contents->GetBrowserContext()->IsOffTheRecord() &&
+ if (!web_contents->GetBrowserContext()->IsOffTheRecord() &&
save_file_path.GetValue() != path_string) {
save_file_path.SetValue(path_string);
}
diff --git a/chrome/browser/extensions/execute_code_in_tab_function.cc b/chrome/browser/extensions/execute_code_in_tab_function.cc
index a63fd88..35e7b3c 100644
--- a/chrome/browser/extensions/execute_code_in_tab_function.cc
+++ b/chrome/browser/extensions/execute_code_in_tab_function.cc
@@ -24,7 +24,7 @@
#include "chrome/common/extensions/extension_messages.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/web_contents.h"
using content::BrowserThread;
@@ -87,7 +87,7 @@ bool ExecuteCodeInTabFunction::RunImpl() {
CHECK(browser);
CHECK(contents);
if (!GetExtension()->CanExecuteScriptOnPage(
- contents->tab_contents()->GetURL(), NULL, &error_)) {
+ contents->web_contents()->GetURL(), NULL, &error_)) {
return false;
}
@@ -224,11 +224,11 @@ bool ExecuteCodeInTabFunction::Execute(const std::string& code_string) {
params.code = code_string;
params.all_frames = all_frames_;
params.in_main_world = false;
- contents->tab_contents()->GetRenderViewHost()->Send(
+ contents->web_contents()->GetRenderViewHost()->Send(
new ExtensionMsg_ExecuteCode(
- contents->tab_contents()->GetRenderViewHost()->routing_id(), params));
+ contents->web_contents()->GetRenderViewHost()->routing_id(), params));
- Observe(contents->tab_contents());
+ Observe(contents->web_contents());
AddRef(); // balanced in OnExecuteCodeFinished()
return true;
}
diff --git a/chrome/browser/extensions/extension_debugger_api.cc b/chrome/browser/extensions/extension_debugger_api.cc
index e3698b9..dde36fa 100644
--- a/chrome/browser/extensions/extension_debugger_api.cc
+++ b/chrome/browser/extensions/extension_debugger_api.cc
@@ -29,9 +29,9 @@
#include "content/public/browser/devtools_agent_host_registry.h"
#include "content/public/browser/devtools_client_host.h"
#include "content/public/browser/devtools_manager.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
+#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
#include "webkit/glue/webkit_glue.h"
#include "ui/base/l10n/l10n_util.h"
@@ -43,6 +43,8 @@ using content::DevToolsManager;
namespace keys = extension_debugger_api_constants;
+using content::WebContents;
+
class ExtensionDevToolsInfoBarDelegate : public ConfirmInfoBarDelegate {
public:
ExtensionDevToolsInfoBarDelegate(
@@ -69,14 +71,14 @@ class ExtensionDevToolsInfoBarDelegate : public ConfirmInfoBarDelegate {
class ExtensionDevToolsClientHost : public DevToolsClientHost,
public content::NotificationObserver {
public:
- ExtensionDevToolsClientHost(TabContents* tab_contents,
+ ExtensionDevToolsClientHost(WebContents* web_contents,
const std::string& extension_id,
const std::string& extension_name,
int tab_id);
~ExtensionDevToolsClientHost();
- bool MatchesContentsAndExtensionId(TabContents* tab_contents,
+ bool MatchesContentsAndExtensionId(WebContents* web_contents,
const std::string& extension_id);
void Close();
void InfoBarDestroyed();
@@ -87,7 +89,7 @@ class ExtensionDevToolsClientHost : public DevToolsClientHost,
// DevToolsClientHost interface
virtual void InspectedTabClosing();
virtual void DispatchOnInspectorFrontend(const std::string& message);
- virtual void TabReplaced(TabContents* tab_contents);
+ virtual void TabReplaced(WebContents* web_contents);
virtual void FrameNavigating(const std::string& url) {}
private:
@@ -98,7 +100,7 @@ class ExtensionDevToolsClientHost : public DevToolsClientHost,
const content::NotificationSource& source,
const content::NotificationDetails& details);
- TabContents* tab_contents_;
+ WebContents* web_contents_;
std::string extension_id_;
int tab_id_;
content::NotificationRegistrar registrar_;
@@ -157,11 +159,11 @@ class AttachedClientHosts {
} // namespace
ExtensionDevToolsClientHost::ExtensionDevToolsClientHost(
- TabContents* tab_contents,
+ WebContents* web_contents,
const std::string& extension_id,
const std::string& extension_name,
int tab_id)
- : tab_contents_(tab_contents),
+ : web_contents_(web_contents),
extension_id_(extension_id),
tab_id_(tab_id),
last_request_id_(0),
@@ -170,17 +172,17 @@ ExtensionDevToolsClientHost::ExtensionDevToolsClientHost(
// Detach from debugger when extension unloads.
Profile* profile =
- Profile::FromBrowserContext(tab_contents_->GetBrowserContext());
+ Profile::FromBrowserContext(web_contents_->GetBrowserContext());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
content::Source<Profile>(profile));
// Attach to debugger and tell it we are ready.
DevToolsAgentHost* agent = DevToolsAgentHostRegistry::GetDevToolsAgentHost(
- tab_contents_->GetRenderViewHost());
+ web_contents_->GetRenderViewHost());
DevToolsManager::GetInstance()->RegisterDevToolsClientHostFor(agent, this);
TabContentsWrapper* wrapper =
- TabContentsWrapper::GetCurrentWrapperForContents(tab_contents_);
+ TabContentsWrapper::GetCurrentWrapperForContents(web_contents_);
infobar_delegate_ = new ExtensionDevToolsInfoBarDelegate(
wrapper->infobar_tab_helper(), extension_name, this);
wrapper->infobar_tab_helper()->AddInfoBar(infobar_delegate_);
@@ -190,7 +192,7 @@ ExtensionDevToolsClientHost::~ExtensionDevToolsClientHost() {
if (infobar_delegate_) {
infobar_delegate_->ClearClientHost();
TabContentsWrapper* wrapper =
- TabContentsWrapper::GetCurrentWrapperForContents(tab_contents_);
+ TabContentsWrapper::GetCurrentWrapperForContents(web_contents_);
InfoBarTabHelper* helper = wrapper->infobar_tab_helper();
if(helper)
helper->RemoveInfoBar(infobar_delegate_);
@@ -199,9 +201,9 @@ ExtensionDevToolsClientHost::~ExtensionDevToolsClientHost() {
}
bool ExtensionDevToolsClientHost::MatchesContentsAndExtensionId(
- TabContents* tab_contents,
+ WebContents* web_contents,
const std::string& extension_id) {
- return tab_contents == tab_contents_ && extension_id_ == extension_id;
+ return web_contents == web_contents_ && extension_id_ == extension_id;
}
// DevToolsClientHost interface
@@ -211,8 +213,8 @@ void ExtensionDevToolsClientHost::InspectedTabClosing() {
}
void ExtensionDevToolsClientHost::TabReplaced(
- TabContents* tab_contents) {
- tab_contents_ = tab_contents;
+ WebContents* web_contents) {
+ web_contents_ = web_contents;
}
void ExtensionDevToolsClientHost::Close() {
@@ -245,7 +247,7 @@ void ExtensionDevToolsClientHost::SendMessageToBackend(
void ExtensionDevToolsClientHost::SendDetachedEvent() {
Profile* profile =
- Profile::FromBrowserContext(tab_contents_->GetBrowserContext());
+ Profile::FromBrowserContext(web_contents_->GetBrowserContext());
if (profile != NULL && profile->GetExtensionEventRouter()) {
ListValue args;
args.Append(CreateDebuggeeId(tab_id_));
@@ -272,7 +274,7 @@ void ExtensionDevToolsClientHost::Observe(
void ExtensionDevToolsClientHost::DispatchOnInspectorFrontend(
const std::string& message) {
Profile* profile =
- Profile::FromBrowserContext(tab_contents_->GetBrowserContext());
+ Profile::FromBrowserContext(web_contents_->GetBrowserContext());
if (profile == NULL || !profile->GetExtensionEventRouter())
return;
@@ -369,7 +371,7 @@ bool DebuggerFunction::InitTabContents() {
base::IntToString(tab_id_));
return false;
}
- contents_ = wrapper->tab_contents();
+ contents_ = wrapper->web_contents();
if (ChromeWebUIFactory::GetInstance()->HasWebUIScheme(contents_->GetURL())) {
error_ = ExtensionErrorUtils::FormatErrorMessage(
diff --git a/chrome/browser/extensions/extension_debugger_api.h b/chrome/browser/extensions/extension_debugger_api.h
index d50e743..3943bf1 100644
--- a/chrome/browser/extensions/extension_debugger_api.h
+++ b/chrome/browser/extensions/extension_debugger_api.h
@@ -16,12 +16,15 @@
// Base debugger function.
class ExtensionDevToolsClientHost;
-class TabContents;
namespace base {
class DictionaryValue;
}
+namespace content {
+class WebContents;
+}
+
class DebuggerFunction : public AsyncExtensionFunction {
protected:
DebuggerFunction();
@@ -30,7 +33,7 @@ class DebuggerFunction : public AsyncExtensionFunction {
bool InitTabContents();
bool InitClientHost();
- TabContents* contents_;
+ content::WebContents* contents_;
int tab_id_;
ExtensionDevToolsClientHost* client_host_;
};
diff --git a/chrome/browser/extensions/extension_devtools_bridge.cc b/chrome/browser/extensions/extension_devtools_bridge.cc
index 6b13e31..e31767f 100644
--- a/chrome/browser/extensions/extension_devtools_bridge.cc
+++ b/chrome/browser/extensions/extension_devtools_bridge.cc
@@ -15,13 +15,14 @@
#include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/devtools_agent_host_registry.h"
#include "content/public/browser/devtools_manager.h"
+#include "content/public/browser/web_contents.h"
using content::DevToolsAgentHost;
using content::DevToolsAgentHostRegistry;
using content::DevToolsManager;
+using content::WebContents;
ExtensionDevToolsBridge::ExtensionDevToolsBridge(int tab_id,
Profile* profile)
@@ -61,7 +62,7 @@ bool ExtensionDevToolsBridge::RegisterAsDevToolsClientHost() {
&contents, &tab_index)) {
DevToolsManager* devtools_manager = DevToolsManager::GetInstance();
DevToolsAgentHost* agent = DevToolsAgentHostRegistry::GetDevToolsAgentHost(
- contents->tab_contents()->GetRenderViewHost());
+ contents->web_contents()->GetRenderViewHost());
if (devtools_manager->GetDevToolsClientHostFor(agent))
return false;
@@ -119,7 +120,7 @@ void ExtensionDevToolsBridge::DispatchOnInspectorFrontend(
on_page_event_name_, json, profile_, GURL());
}
-void ExtensionDevToolsBridge::TabReplaced(TabContents* new_tab) {
+void ExtensionDevToolsBridge::TabReplaced(WebContents* new_tab) {
// We don't update the tab id as it needs to remain the same so that we can
// properly unregister.
}
diff --git a/chrome/browser/extensions/extension_devtools_bridge.h b/chrome/browser/extensions/extension_devtools_bridge.h
index 6c5c292..880f42c 100644
--- a/chrome/browser/extensions/extension_devtools_bridge.h
+++ b/chrome/browser/extensions/extension_devtools_bridge.h
@@ -31,7 +31,7 @@ class ExtensionDevToolsBridge : public content::DevToolsClientHost {
// DevToolsClientHost, called to dispatch a message on this client.
virtual void DispatchOnInspectorFrontend(const std::string& message) OVERRIDE;
- virtual void TabReplaced(TabContents* new_tab) OVERRIDE;
+ virtual void TabReplaced(content::WebContents* new_tab) OVERRIDE;
private:
virtual void FrameNavigating(const std::string& url) OVERRIDE {}
diff --git a/chrome/browser/extensions/extension_disabled_infobar_delegate.cc b/chrome/browser/extensions/extension_disabled_infobar_delegate.cc
index 96f45ff..a090e95 100644
--- a/chrome/browser/extensions/extension_disabled_infobar_delegate.cc
+++ b/chrome/browser/extensions/extension_disabled_infobar_delegate.cc
@@ -17,10 +17,10 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension_file_util.h"
#include "chrome/common/extensions/extension_resource.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
+#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/extensions/extension_message_service.cc b/chrome/browser/extensions/extension_message_service.cc
index 34aef3f..8c3ad18 100644
--- a/chrome/browser/extensions/extension_message_service.cc
+++ b/chrome/browser/extensions/extension_message_service.cc
@@ -18,10 +18,13 @@
#include "chrome/common/extensions/extension_messages.h"
#include "content/browser/child_process_security_policy.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/browser/site_instance.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_process_host.h"
+#include "content/public/browser/web_contents.h"
+
+using content::WebContents;
// Since we have 2 ports for every channel, we just index channels by half the
// port ID.
@@ -165,7 +168,7 @@ void ExtensionMessageService::OpenChannelToExtension(
MessagePort receiver(
GetExtensionProcess(profile, target_extension_id),
MSG_ROUTING_CONTROL);
- TabContents* source_contents = tab_util::GetTabContentsByID(
+ WebContents* source_contents = tab_util::GetWebContentsByID(
source_process_id, source_routing_id);
// Include info about the opener's tab (if it was a tab).
@@ -194,12 +197,12 @@ void ExtensionMessageService::OpenChannelToTab(
MessagePort receiver;
if (ExtensionTabUtil::GetTabById(tab_id, profile, true,
NULL, NULL, &contents, NULL)) {
- receiver.sender = contents->tab_contents()->GetRenderViewHost();
+ receiver.sender = contents->web_contents()->GetRenderViewHost();
receiver.routing_id =
- contents->tab_contents()->GetRenderViewHost()->routing_id();
+ contents->web_contents()->GetRenderViewHost()->routing_id();
}
- if (contents && contents->tab_contents()->GetController().NeedsReload()) {
+ if (contents && contents->web_contents()->GetController().NeedsReload()) {
// The tab isn't loaded yet. Don't attempt to connect. Treat this as a
// disconnect.
DispatchOnDisconnect(MessagePort(source, MSG_ROUTING_CONTROL),
@@ -207,7 +210,7 @@ void ExtensionMessageService::OpenChannelToTab(
return;
}
- TabContents* source_contents = tab_util::GetTabContentsByID(
+ WebContents* source_contents = tab_util::GetWebContentsByID(
source_process_id, source_routing_id);
// Include info about the opener's tab (if it was a tab).
@@ -284,10 +287,10 @@ int ExtensionMessageService::OpenSpecialChannelToExtension(
int ExtensionMessageService::OpenSpecialChannelToTab(
const std::string& extension_id, const std::string& channel_name,
- TabContents* target_tab_contents, IPC::Message::Sender* source) {
- DCHECK(target_tab_contents);
+ WebContents* target_web_contents, IPC::Message::Sender* source) {
+ DCHECK(target_web_contents);
- if (target_tab_contents->GetController().NeedsReload()) {
+ if (target_web_contents->GetController().NeedsReload()) {
// The tab isn't loaded yet. Don't attempt to connect.
return -1;
}
@@ -298,8 +301,8 @@ int ExtensionMessageService::OpenSpecialChannelToTab(
AllocatePortIdPair(&port1_id, &port2_id);
MessagePort receiver(
- target_tab_contents->GetRenderViewHost(),
- target_tab_contents->GetRenderViewHost()->routing_id());
+ target_web_contents->GetRenderViewHost(),
+ target_web_contents->GetRenderViewHost()->routing_id());
if (!OpenChannelImpl(source, "null", receiver, port2_id,
extension_id, extension_id, channel_name))
return -1;
diff --git a/chrome/browser/extensions/extension_message_service.h b/chrome/browser/extensions/extension_message_service.h
index 147b863..37a3eae 100644
--- a/chrome/browser/extensions/extension_message_service.h
+++ b/chrome/browser/extensions/extension_message_service.h
@@ -17,7 +17,10 @@
#include "ipc/ipc_message.h"
class Profile;
-class TabContents;
+
+namespace content {
+class WebContents;
+}
// This class manages message and event passing between renderer processes.
// It maintains a list of processes that are listening to events and a set of
@@ -103,7 +106,7 @@ class ExtensionMessageService
// the code doesn't detect whether the extension actually exists.
int OpenSpecialChannelToTab(
const std::string& extension_id, const std::string& channel_name,
- TabContents* target_tab_contents, IPC::Message::Sender* source);
+ content::WebContents* target_web_contents, IPC::Message::Sender* source);
// Closes the message channel associated with the given port, and notifies
// the other side.
diff --git a/chrome/browser/extensions/extension_page_actions_module.cc b/chrome/browser/extensions/extension_page_actions_module.cc
index f8ce2d2..203c87d 100644
--- a/chrome/browser/extensions/extension_page_actions_module.cc
+++ b/chrome/browser/extensions/extension_page_actions_module.cc
@@ -18,8 +18,8 @@
#include "chrome/common/extensions/extension_action.h"
#include "chrome/common/extensions/extension_error_utils.h"
#include "chrome/common/render_messages.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/navigation_entry.h"
+#include "content/public/browser/web_contents.h"
using content::NavigationEntry;
@@ -83,7 +83,7 @@ bool PageActionFunction::SetPageActionEnabled(bool enable) {
// Make sure the URL hasn't changed.
NavigationEntry* entry =
- contents->tab_contents()->GetController().GetActiveEntry();
+ contents->web_contents()->GetController().GetActiveEntry();
if (!entry || url != entry->GetURL().spec()) {
error_ = ExtensionErrorUtils::FormatErrorMessage(kUrlNotActiveError, url);
return false;
diff --git a/chrome/browser/extensions/extension_page_capture_api.cc b/chrome/browser/extensions/extension_page_capture_api.cc
index 369a823..b198242 100644
--- a/chrome/browser/extensions/extension_page_capture_api.cc
+++ b/chrome/browser/extensions/extension_page_capture_api.cc
@@ -12,11 +12,12 @@
#include "chrome/common/extensions/extension_messages.h"
#include "content/browser/child_process_security_policy.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/download/mhtml_generation_manager.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/render_process_host.h"
+#include "content/public/browser/web_contents.h"
using content::BrowserThread;
using content::WebContents;
diff --git a/chrome/browser/extensions/extension_processes_api.cc b/chrome/browser/extensions/extension_processes_api.cc
index 5ca38b3..ff58808 100644
--- a/chrome/browser/extensions/extension_processes_api.cc
+++ b/chrome/browser/extensions/extension_processes_api.cc
@@ -20,9 +20,9 @@
#include "chrome/browser/task_manager/task_manager.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/extensions/extension_error_utils.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_process_host.h"
+#include "content/public/browser/web_contents.h"
namespace keys = extension_processes_api_constants;
@@ -171,7 +171,7 @@ bool GetProcessIdForTabFunction::RunImpl() {
}
// Return the process ID of the tab as an integer.
- int id = base::GetProcId(contents->tab_contents()->
+ int id = base::GetProcId(contents->web_contents()->
GetRenderProcessHost()->GetHandle());
result_.reset(Value::CreateIntegerValue(id));
return true;
diff --git a/chrome/browser/extensions/extension_webstore_private_api.cc b/chrome/browser/extensions/extension_webstore_private_api.cc
index 4bc5285..07d0e4c 100644
--- a/chrome/browser/extensions/extension_webstore_private_api.cc
+++ b/chrome/browser/extensions/extension_webstore_private_api.cc
@@ -26,9 +26,9 @@
#include "chrome/common/extensions/extension_error_utils.h"
#include "chrome/common/extensions/extension_l10n_util.h"
#include "chrome/common/net/gaia/gaia_constants.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
+#include "content/public/browser/web_contents.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/external_protocol/external_protocol_observer.cc b/chrome/browser/external_protocol/external_protocol_observer.cc
index d563473..72990ae 100644
--- a/chrome/browser/external_protocol/external_protocol_observer.cc
+++ b/chrome/browser/external_protocol/external_protocol_observer.cc
@@ -5,10 +5,11 @@
#include "chrome/browser/external_protocol/external_protocol_observer.h"
#include "chrome/browser/external_protocol/external_protocol_handler.h"
-#include "content/browser/tab_contents/tab_contents.h"
-ExternalProtocolObserver::ExternalProtocolObserver(TabContents* tab_contents)
- : content::WebContentsObserver(tab_contents) {
+using content::WebContents;
+
+ExternalProtocolObserver::ExternalProtocolObserver(WebContents* web_contents)
+ : content::WebContentsObserver(web_contents) {
}
ExternalProtocolObserver::~ExternalProtocolObserver() {
diff --git a/chrome/browser/external_protocol/external_protocol_observer.h b/chrome/browser/external_protocol/external_protocol_observer.h
index 55ac16f..a412733 100644
--- a/chrome/browser/external_protocol/external_protocol_observer.h
+++ b/chrome/browser/external_protocol/external_protocol_observer.h
@@ -11,7 +11,7 @@
// TabContents relating to external protocols.
class ExternalProtocolObserver : public content::WebContentsObserver {
public:
- explicit ExternalProtocolObserver(TabContents* tab_contents);
+ explicit ExternalProtocolObserver(content::WebContents* web_contents);
virtual ~ExternalProtocolObserver();
// content::WebContentsObserver overrides.
diff --git a/chrome/browser/favicon/favicon_tab_helper.cc b/chrome/browser/favicon/favicon_tab_helper.cc
index 2c09c75..4e473f0 100644
--- a/chrome/browser/favicon/favicon_tab_helper.cc
+++ b/chrome/browser/favicon/favicon_tab_helper.cc
@@ -27,9 +27,9 @@ using content::NavigationController;
using content::NavigationEntry;
using content::WebContents;
-FaviconTabHelper::FaviconTabHelper(TabContents* tab_contents)
- : content::WebContentsObserver(tab_contents),
- profile_(Profile::FromBrowserContext(tab_contents->GetBrowserContext())) {
+FaviconTabHelper::FaviconTabHelper(WebContents* web_contents)
+ : content::WebContentsObserver(web_contents),
+ profile_(Profile::FromBrowserContext(web_contents->GetBrowserContext())) {
favicon_handler_.reset(new FaviconHandler(profile_, this,
FaviconHandler::FAVICON));
if (chrome::kEnableTouchIcon)
diff --git a/chrome/browser/favicon/favicon_tab_helper.h b/chrome/browser/favicon/favicon_tab_helper.h
index 2d4417a..126a412 100644
--- a/chrome/browser/favicon/favicon_tab_helper.h
+++ b/chrome/browser/favicon/favicon_tab_helper.h
@@ -31,7 +31,7 @@ class SkBitmap;
class FaviconTabHelper : public content::WebContentsObserver,
public FaviconHandlerDelegate {
public:
- explicit FaviconTabHelper(TabContents* tab_contents);
+ explicit FaviconTabHelper(content::WebContents* web_contents);
virtual ~FaviconTabHelper();
// Initiates loading the favicon for the specified url.
diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context.cc
index b1f57f3..5777801 100644
--- a/chrome/browser/geolocation/chrome_geolocation_permission_context.cc
+++ b/chrome/browser/geolocation/chrome_geolocation_permission_context.cc
@@ -24,13 +24,13 @@
#include "chrome/common/pref_names.h"
#include "content/browser/geolocation/geolocation_provider.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
#include "grit/theme_resources.h"
@@ -471,7 +471,7 @@ void GeolocationInfoBarQueueController::Observe(
for (PendingInfoBarRequests::iterator i = pending_infobar_requests_.begin();
i != pending_infobar_requests_.end();) {
if (i->infobar_delegate == NULL &&
- web_contents == tab_util::GetTabContentsByID(i->render_process_id,
+ web_contents == tab_util::GetWebContentsByID(i->render_process_id,
i->render_view_id)) {
i = pending_infobar_requests_.erase(i);
} else {
@@ -482,8 +482,8 @@ void GeolocationInfoBarQueueController::Observe(
void GeolocationInfoBarQueueController::ShowQueuedInfoBar(int render_process_id,
int render_view_id) {
- TabContents* tab_contents =
- tab_util::GetTabContentsByID(render_process_id, render_view_id);
+ WebContents* tab_contents =
+ tab_util::GetWebContentsByID(render_process_id, render_view_id);
TabContentsWrapper* wrapper = NULL;
if (tab_contents)
wrapper = TabContentsWrapper::GetCurrentWrapperForContents(tab_contents);
@@ -521,15 +521,15 @@ GeolocationInfoBarQueueController::PendingInfoBarRequests::iterator
if (!delegate)
return pending_infobar_requests_.erase(i);
- TabContents* tab_contents =
- tab_util::GetTabContentsByID(i->render_process_id, i->render_view_id);
- if (!tab_contents)
+ WebContents* web_contents =
+ tab_util::GetWebContentsByID(i->render_process_id, i->render_view_id);
+ if (!web_contents)
return pending_infobar_requests_.erase(i);
- // TabContents will destroy the InfoBar, which will remove from our vector
+ // WebContents will destroy the InfoBar, which will remove from our vector
// asynchronously.
TabContentsWrapper* wrapper =
- TabContentsWrapper::GetCurrentWrapperForContents(tab_contents);
+ TabContentsWrapper::GetCurrentWrapperForContents(web_contents);
wrapper->infobar_tab_helper()->RemoveInfoBar(i->infobar_delegate);
return ++i;
}
@@ -581,9 +581,9 @@ void ChromeGeolocationPermissionContext::RequestGeolocationPermission(
}
}
- TabContents* tab_contents =
- tab_util::GetTabContentsByID(render_process_id, render_view_id);
- if (!tab_contents || tab_contents->GetViewType() !=
+ WebContents* web_contents =
+ tab_util::GetWebContentsByID(render_process_id, render_view_id);
+ if (!web_contents || web_contents->GetViewType() !=
content::VIEW_TYPE_TAB_CONTENTS) {
// The tab may have gone away, or the request may not be from a tab at all.
// TODO(mpcomplete): the request could be from a background page or
@@ -597,7 +597,7 @@ void ChromeGeolocationPermissionContext::RequestGeolocationPermission(
return;
}
- GURL embedder = tab_contents->GetURL();
+ GURL embedder = web_contents->GetURL();
if (!requesting_frame.is_valid() || !embedder.is_valid()) {
LOG(WARNING) << "Attempt to use geolocation from an invalid URL: "
<< requesting_frame << "," << embedder
diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/history/history_tab_helper.cc
index e9e0871..2a833a0 100644
--- a/chrome/browser/history/history_tab_helper.cc
+++ b/chrome/browser/history/history_tab_helper.cc
@@ -8,7 +8,6 @@
#include "chrome/browser/history/top_sites.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/render_messages.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/title_updated_details.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
@@ -16,6 +15,7 @@
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/web_contents_delegate.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/common/frame_navigate_params.h"
using content::NavigationEntry;
diff --git a/chrome/browser/infobars/infobar_extension_api.cc b/chrome/browser/infobars/infobar_extension_api.cc
index 5b0d280..359480f 100644
--- a/chrome/browser/infobars/infobar_extension_api.cc
+++ b/chrome/browser/infobars/infobar_extension_api.cc
@@ -18,7 +18,7 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_error_utils.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
namespace {
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
index 74a0d72..6bcbd54 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -27,8 +27,8 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/web_contents.h"
#if defined(TOOLKIT_VIEWS)
#include "ui/views/focus/focus_manager.h"
@@ -269,8 +269,8 @@ TabContentsWrapper* InstantController::CommitCurrentPreview(
InstantCommitType type) {
DCHECK(loader_.get());
TabContentsWrapper* tab = ReleasePreviewContents(type);
- tab->tab_contents()->GetController().CopyStateFromAndPrune(
- &tab_contents_->tab_contents()->GetController());
+ tab->web_contents()->GetController().CopyStateFromAndPrune(
+ &tab_contents_->web_contents()->GetController());
delegate_->CommitInstant(tab);
CompleteRelease(tab);
return tab;
@@ -305,7 +305,7 @@ void InstantController::OnAutocompleteLostFocus(
}
RenderWidgetHostView* rwhv =
- GetPreviewContents()->tab_contents()->GetRenderWidgetHostView();
+ GetPreviewContents()->web_contents()->GetRenderWidgetHostView();
if (!view_gaining_focus || !rwhv) {
DestroyPreviewContents();
return;
@@ -331,7 +331,7 @@ void InstantController::OnAutocompleteLostFocus(
#endif
gfx::NativeView tab_view =
- GetPreviewContents()->tab_contents()->GetNativeView();
+ GetPreviewContents()->web_contents()->GetNativeView();
// Focus is going to the renderer.
if (rwhv->GetNativeView() == view_gaining_focus ||
tab_view == view_gaining_focus) {
diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc
index 6c55931..d47c0d8 100644
--- a/chrome/browser/notifications/desktop_notification_service.cc
+++ b/chrome/browser/notifications/desktop_notification_service.cc
@@ -31,10 +31,10 @@
#include "content/browser/browser_child_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/site_instance.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/worker_host/worker_process_host.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/common/show_desktop_notification_params.h"
#include "grit/browser_resources.h"
#include "grit/chromium_strings.h"
diff --git a/chrome/browser/prerender/prerender_browsertest.cc b/chrome/browser/prerender/prerender_browsertest.cc
index 1c7f99d..16913f8 100644
--- a/chrome/browser/prerender/prerender_browsertest.cc
+++ b/chrome/browser/prerender/prerender_browsertest.cc
@@ -408,7 +408,7 @@ class FakeDevToolsClientHost : public DevToolsClientHost {
virtual void InspectedTabClosing() OVERRIDE {}
virtual void FrameNavigating(const std::string& url) OVERRIDE {}
virtual void DispatchOnInspectorFrontend(const std::string& msg) OVERRIDE {}
- virtual void TabReplaced(TabContents* new_tab) OVERRIDE {}
+ virtual void TabReplaced(WebContents* new_tab) OVERRIDE {}
};
} // namespace
diff --git a/chrome/browser/prerender/prerender_tab_helper.cc b/chrome/browser/prerender/prerender_tab_helper.cc
index 09e6337..07f704b 100644
--- a/chrome/browser/prerender/prerender_tab_helper.cc
+++ b/chrome/browser/prerender/prerender_tab_helper.cc
@@ -12,7 +12,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/tab_contents/core_tab_helper.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/web_contents.h"
namespace prerender {
@@ -166,7 +166,7 @@ class PrerenderTabHelper::HoverData {
};
PrerenderTabHelper::PrerenderTabHelper(TabContentsWrapper* tab)
- : content::WebContentsObserver(tab->tab_contents()),
+ : content::WebContentsObserver(tab->web_contents()),
tab_(tab),
pplt_load_start_(),
last_hovers_(new HoverData[kNumHoverThresholds]) {
diff --git a/chrome/browser/printing/background_printing_manager.cc b/chrome/browser/printing/background_printing_manager.cc
index 46b076d..0e99444 100644
--- a/chrome/browser/printing/background_printing_manager.cc
+++ b/chrome/browser/printing/background_printing_manager.cc
@@ -12,10 +12,11 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
+#include "content/public/browser/web_contents.h"
using content::BrowserThread;
using content::WebContents;
@@ -46,7 +47,7 @@ void BackgroundPrintingManager::OwnPrintPreviewTab(
content::Source<TabContentsWrapper>(preview_tab));
// OwnInitiatorTabContents() may have already added this notification.
- TabContents* preview_contents = preview_tab->tab_contents();
+ WebContents* preview_contents = preview_tab->web_contents();
if (!registrar_.IsRegistered(
this,
content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
@@ -61,7 +62,7 @@ void BackgroundPrintingManager::OwnPrintPreviewTab(
// Multiple sites may share the same RenderProcessHost, so check if this
// notification has already been added.
content::RenderProcessHost* rph =
- preview_tab->tab_contents()->GetRenderProcessHost();
+ preview_tab->web_contents()->GetRenderProcessHost();
if (!registrar_.IsRegistered(this,
content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
content::Source<content::RenderProcessHost>(
@@ -79,8 +80,7 @@ void BackgroundPrintingManager::OwnPrintPreviewTab(
tab_controller->GetInitiatorTab(preview_tab);
if (!initiator_tab)
return;
- static_cast<RenderViewHostDelegate*>(
- initiator_tab->tab_contents())->Activate();
+ initiator_tab->web_contents()->GetRenderViewHost()->delegate()->Activate();
}
void BackgroundPrintingManager::Observe(
@@ -116,7 +116,7 @@ void BackgroundPrintingManager::OnRendererProcessClosed(
TabContentsWrapperSet::const_iterator it;
for (it = begin(); it != end(); ++it) {
TabContentsWrapper* preview_tab = *it;
- if (preview_tab->tab_contents()->GetRenderProcessHost() == rph) {
+ if (preview_tab->web_contents()->GetRenderProcessHost() == rph) {
preview_tabs_pending_deletion.insert(preview_tab);
}
}
@@ -136,7 +136,7 @@ void BackgroundPrintingManager::OnTabContentsDestroyed(
TabContentsWrapper* preview_tab) {
// Always need to remove this notification since the tab is gone.
registrar_.Remove(this, content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
- content::Source<WebContents>(preview_tab->tab_contents()));
+ content::Source<WebContents>(preview_tab->web_contents()));
if (!HasPrintPreviewTab(preview_tab)) {
NOTREACHED();
@@ -149,7 +149,7 @@ void BackgroundPrintingManager::OnTabContentsDestroyed(
HasSharedRenderProcessHost(printing_tabs_pending_deletion_, preview_tab);
if (!shared_rph) {
content::RenderProcessHost* rph =
- preview_tab->tab_contents()->GetRenderProcessHost();
+ preview_tab->web_contents()->GetRenderProcessHost();
registrar_.Remove(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
content::Source<content::RenderProcessHost>(rph));
}
@@ -177,13 +177,13 @@ void BackgroundPrintingManager::DeletePreviewTab(TabContentsWrapper* tab) {
bool BackgroundPrintingManager::HasSharedRenderProcessHost(
const TabContentsWrapperSet& set,
TabContentsWrapper* tab) {
- content::RenderProcessHost* rph = tab->tab_contents()->GetRenderProcessHost();
+ content::RenderProcessHost* rph = tab->web_contents()->GetRenderProcessHost();
for (TabContentsWrapperSet::const_iterator it = set.begin();
it != set.end();
++it) {
TabContentsWrapper* iter_tab = *it;
if ((iter_tab != tab) &&
- (iter_tab->tab_contents()->GetRenderProcessHost() == rph)) {
+ (iter_tab->web_contents()->GetRenderProcessHost() == rph)) {
return true;
}
}
diff --git a/chrome/browser/printing/print_preview_message_handler.cc b/chrome/browser/printing/print_preview_message_handler.cc
index e4a4d77..74b36e9 100644
--- a/chrome/browser/printing/print_preview_message_handler.cc
+++ b/chrome/browser/printing/print_preview_message_handler.cc
@@ -19,13 +19,14 @@
#include "chrome/browser/ui/webui/print_preview_ui.h"
#include "chrome/common/print_messages.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/web_contents.h"
#include "printing/page_size_margins.h"
#include "printing/print_job_constants.h"
using content::BrowserThread;
using content::NavigationController;
+using content::WebContents;
namespace {
@@ -64,9 +65,9 @@ RefCountedBytes* GetDataFromHandle(base::SharedMemoryHandle handle,
namespace printing {
PrintPreviewMessageHandler::PrintPreviewMessageHandler(
- TabContents* tab_contents)
- : content::WebContentsObserver(tab_contents) {
- DCHECK(tab_contents);
+ WebContents* web_contents)
+ : content::WebContentsObserver(web_contents) {
+ DCHECK(web_contents);
}
PrintPreviewMessageHandler::~PrintPreviewMessageHandler() {
@@ -92,11 +93,11 @@ PrintPreviewUI* PrintPreviewMessageHandler::OnFailure(int document_cookie) {
// Inform the print preview tab of the failure.
TabContentsWrapper* print_preview_tab = GetPrintPreviewTab();
// User might have closed it already.
- if (!print_preview_tab || !print_preview_tab->tab_contents()->GetWebUI())
+ if (!print_preview_tab || !print_preview_tab->web_contents()->GetWebUI())
return NULL;
return static_cast<PrintPreviewUI*>(
- print_preview_tab->tab_contents()->GetWebUI());
+ print_preview_tab->web_contents()->GetWebUI());
}
void PrintPreviewMessageHandler::OnRequestPrintPreview(
@@ -114,11 +115,11 @@ void PrintPreviewMessageHandler::OnDidGetPreviewPageCount(
}
TabContentsWrapper* print_preview_tab = GetPrintPreviewTab();
- if (!print_preview_tab || !print_preview_tab->tab_contents()->GetWebUI())
+ if (!print_preview_tab || !print_preview_tab->web_contents()->GetWebUI())
return;
PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>(
- print_preview_tab->tab_contents()->GetWebUI());
+ print_preview_tab->web_contents()->GetWebUI());
if (!params.is_modifiable || params.clear_preview_data)
print_preview_ui->ClearAllPreviewData();
@@ -129,11 +130,11 @@ void PrintPreviewMessageHandler::OnDidGetPreviewPageCount(
void PrintPreviewMessageHandler::OnDidPreviewPage(
const PrintHostMsg_DidPreviewPage_Params& params) {
TabContentsWrapper* print_preview_tab = GetPrintPreviewTab();
- if (!print_preview_tab || !print_preview_tab->tab_contents()->GetWebUI())
+ if (!print_preview_tab || !print_preview_tab->web_contents()->GetWebUI())
return;
PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>(
- print_preview_tab->tab_contents()->GetWebUI());
+ print_preview_tab->web_contents()->GetWebUI());
int page_number = params.page_number;
if (page_number >= FIRST_PAGE_INDEX && params.data_size) {
RefCountedBytes* data_bytes =
@@ -158,11 +159,11 @@ void PrintPreviewMessageHandler::OnMetafileReadyForPrinting(
// Get the print preview tab.
TabContentsWrapper* print_preview_tab = GetPrintPreviewTab();
// User might have closed it already.
- if (!print_preview_tab || !print_preview_tab->tab_contents()->GetWebUI())
+ if (!print_preview_tab || !print_preview_tab->web_contents()->GetWebUI())
return;
PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>(
- print_preview_tab->tab_contents()->GetWebUI());
+ print_preview_tab->web_contents()->GetWebUI());
if (params.reuse_existing_data) {
// Need to match normal rendering where we are expected to send this.
@@ -200,11 +201,11 @@ void PrintPreviewMessageHandler::OnPrintPreviewFailed(int document_cookie) {
void PrintPreviewMessageHandler::OnDidGetDefaultPageLayout(
const PageSizeMargins& page_layout_in_points) {
TabContentsWrapper* print_preview_tab = GetPrintPreviewTab();
- if (!print_preview_tab || !print_preview_tab->tab_contents()->GetWebUI())
+ if (!print_preview_tab || !print_preview_tab->web_contents()->GetWebUI())
return;
PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>(
- print_preview_tab->tab_contents()->GetWebUI());
+ print_preview_tab->web_contents()->GetWebUI());
print_preview_ui->OnDidGetDefaultPageLayout(page_layout_in_points);
}
diff --git a/chrome/browser/printing/print_preview_message_handler.h b/chrome/browser/printing/print_preview_message_handler.h
index 9cd8a8d..f9eab85 100644
--- a/chrome/browser/printing/print_preview_message_handler.h
+++ b/chrome/browser/printing/print_preview_message_handler.h
@@ -24,7 +24,7 @@ struct PageSizeMargins;
// TabContents that owns it.
class PrintPreviewMessageHandler : public content::WebContentsObserver {
public:
- explicit PrintPreviewMessageHandler(TabContents* tab_contents);
+ explicit PrintPreviewMessageHandler(content::WebContents* web_contents);
virtual ~PrintPreviewMessageHandler();
// content::WebContentsObserver implementation.
@@ -33,10 +33,10 @@ class PrintPreviewMessageHandler : public content::WebContentsObserver {
content::NavigationController::ReloadType reload_type) OVERRIDE;
private:
- // Gets the print preview tab associated with the TabContents being observed.
+ // Gets the print preview tab associated with the WebContents being observed.
TabContentsWrapper* GetPrintPreviewTab();
- // Helper function to return the TabContentsWrapper for tab_contents().
+ // Helper function to return the TabContentsWrapper for web_contents().
TabContentsWrapper* tab_contents_wrapper();
// Common code between failure handlers. Returns a PrintPreviewUI* if there
diff --git a/chrome/browser/printing/print_view_manager.cc b/chrome/browser/printing/print_view_manager.cc
index aaa5af3..547f756 100644
--- a/chrome/browser/printing/print_view_manager.cc
+++ b/chrome/browser/printing/print_view_manager.cc
@@ -21,10 +21,10 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/print_messages.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
+#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
#include "printing/metafile.h"
#include "printing/metafile_impl.h"
@@ -65,7 +65,7 @@ static base::LazyInstance<ScriptedPrintPreviewClosureMap>
namespace printing {
PrintViewManager::PrintViewManager(TabContentsWrapper* tab)
- : content::WebContentsObserver(tab->tab_contents()),
+ : content::WebContentsObserver(tab->web_contents()),
tab_(tab),
number_pages_(0),
printing_succeeded_(false),
@@ -102,10 +102,10 @@ bool PrintViewManager::AdvancedPrintNow() {
tab_controller->GetPrintPreviewForTab(tab_);
if (print_preview_tab) {
// Preview tab exist for current tab or current tab is preview tab.
- if (!print_preview_tab->tab_contents()->GetWebUI())
+ if (!print_preview_tab->web_contents()->GetWebUI())
return false;
PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>(
- print_preview_tab->tab_contents()->GetWebUI());
+ print_preview_tab->web_contents()->GetWebUI());
print_preview_ui->OnShowSystemDialog();
return true;
} else {
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc
index e5c4ff5..f514b3a 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.cc
+++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -52,9 +52,9 @@
#include "content/browser/host_zoom_map.h"
#include "content/browser/in_process_webkit/webkit_context.h"
#include "content/browser/ssl/ssl_host_state.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/web_contents.h"
#include "net/base/transport_security_state.h"
#include "net/http/http_server_properties.h"
#include "webkit/database/database_tracker.h"
diff --git a/chrome/browser/safe_browsing/malware_details_history.cc b/chrome/browser/safe_browsing/malware_details_history.cc
index 8dc8608..c83736e 100644
--- a/chrome/browser/safe_browsing/malware_details_history.cc
+++ b/chrome/browser/safe_browsing/malware_details_history.cc
@@ -12,10 +12,10 @@
#include "chrome/browser/safe_browsing/malware_details.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
+#include "content/public/browser/web_contents.h"
using content::BrowserThread;
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index 285847e..17c3571 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -33,11 +33,11 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/web_contents.h"
#include "net/base/registry_controlled_domain.h"
#include "net/url_request/url_request_context_getter.h"
@@ -47,6 +47,7 @@
using content::BrowserThread;
using content::NavigationEntry;
+using content::WebContents;
namespace {
@@ -1036,11 +1037,11 @@ void SafeBrowsingService::DoDisplayBlockingPage(
}
// The tab might have been closed.
- TabContents* tab_contents =
- tab_util::GetTabContentsByID(resource.render_process_host_id,
+ WebContents* web_contents =
+ tab_util::GetWebContentsByID(resource.render_process_host_id,
resource.render_view_id);
- if (!tab_contents) {
+ if (!web_contents) {
// The tab is gone and we did not have a chance at showing the interstitial.
// Just act as if "Don't Proceed" were chosen.
std::vector<UnsafeResource> resources;
@@ -1054,9 +1055,9 @@ void SafeBrowsingService::DoDisplayBlockingPage(
if (resource.threat_type != SafeBrowsingService::SAFE &&
CanReportStats()) {
- GURL page_url = tab_contents->GetURL();
+ GURL page_url = web_contents->GetURL();
GURL referrer_url;
- NavigationEntry* entry = tab_contents->GetController().GetActiveEntry();
+ NavigationEntry* entry = web_contents->GetController().GetActiveEntry();
if (entry)
referrer_url = entry->GetReferrer().url;
diff --git a/chrome/browser/safe_browsing/safe_browsing_tab_observer.cc b/chrome/browser/safe_browsing/safe_browsing_tab_observer.cc
index dacd1c9..024c2b6 100644
--- a/chrome/browser/safe_browsing/safe_browsing_tab_observer.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_tab_observer.cc
@@ -12,9 +12,9 @@
#include "chrome/common/pref_names.h"
#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/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
+#include "content/public/browser/web_contents.h"
#if defined(ENABLE_SAFE_BROWSING)
#include "chrome/browser/safe_browsing/client_side_detection_host.h"
@@ -40,7 +40,7 @@ SafeBrowsingTabObserver::SafeBrowsingTabObserver(
if (prefs->GetBoolean(prefs::kSafeBrowsingEnabled) &&
g_browser_process->safe_browsing_detection_service()) {
safebrowsing_detection_host_.reset(
- ClientSideDetectionHost::Create(wrapper_->tab_contents()));
+ ClientSideDetectionHost::Create(wrapper_->web_contents()));
}
}
#endif
@@ -84,13 +84,13 @@ void SafeBrowsingTabObserver::UpdateSafebrowsingDetectionHost() {
g_browser_process->safe_browsing_detection_service()) {
if (!safebrowsing_detection_host_.get()) {
safebrowsing_detection_host_.reset(
- ClientSideDetectionHost::Create(wrapper_->tab_contents()));
+ ClientSideDetectionHost::Create(wrapper_->web_contents()));
}
} else {
safebrowsing_detection_host_.reset();
}
- RenderViewHost* rvh = wrapper_->tab_contents()->GetRenderViewHost();
+ RenderViewHost* rvh = wrapper_->web_contents()->GetRenderViewHost();
rvh->Send(new ChromeViewMsg_SetClientSidePhishingDetection(rvh->routing_id(),
safe_browsing));
#endif
diff --git a/chrome/browser/sessions/restore_tab_helper.cc b/chrome/browser/sessions/restore_tab_helper.cc
index a2a3d67..42c65f7 100644
--- a/chrome/browser/sessions/restore_tab_helper.cc
+++ b/chrome/browser/sessions/restore_tab_helper.cc
@@ -7,13 +7,14 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/extensions/extension_messages.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/web_contents.h"
-RestoreTabHelper::RestoreTabHelper(TabContents* contents)
- : content::WebContentsObserver(contents),
- contents_(contents) {
+using content::WebContents;
+
+RestoreTabHelper::RestoreTabHelper(WebContents* contents)
+ : content::WebContentsObserver(contents) {
}
RestoreTabHelper::~RestoreTabHelper() {
@@ -24,7 +25,7 @@ void RestoreTabHelper::SetWindowID(const SessionID& id) {
// TODO(mpcomplete): Maybe this notification should send out a TabContents.
TabContentsWrapper* tab =
- TabContentsWrapper::GetCurrentWrapperForContents(contents_);
+ TabContentsWrapper::GetCurrentWrapperForContents(web_contents());
if (tab) {
content::NotificationService::current()->Notify(
content::NOTIFICATION_TAB_PARENTED,
@@ -34,9 +35,9 @@ void RestoreTabHelper::SetWindowID(const SessionID& id) {
// Extension code in the renderer holds the ID of the window that hosts it.
// Notify it that the window ID changed.
- contents_->GetRenderViewHost()->Send(
+ web_contents()->GetRenderViewHost()->Send(
new ExtensionMsg_UpdateBrowserWindowId(
- contents_->GetRenderViewHost()->routing_id(), id.id()));
+ web_contents()->GetRenderViewHost()->routing_id(), id.id()));
}
void RestoreTabHelper::RenderViewCreated(RenderViewHost* render_view_host) {
diff --git a/chrome/browser/sessions/restore_tab_helper.h b/chrome/browser/sessions/restore_tab_helper.h
index d656685..c5abbea 100644
--- a/chrome/browser/sessions/restore_tab_helper.h
+++ b/chrome/browser/sessions/restore_tab_helper.h
@@ -14,7 +14,7 @@
// window of the tab.
class RestoreTabHelper : public content::WebContentsObserver {
public:
- explicit RestoreTabHelper(TabContents* contents);
+ explicit RestoreTabHelper(content::WebContents* contents);
virtual ~RestoreTabHelper();
// Returns the identifier used by session restore for this tab.
@@ -28,8 +28,6 @@ class RestoreTabHelper : public content::WebContentsObserver {
virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE;
private:
- TabContents* contents_;
-
// Unique identifier of the tab for session restore. This id is only unique
// within the current session, and is not guaranteed to be unique across
// sessions.
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index 88d7b36..1885791 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -31,11 +31,11 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_widget_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/web_contents.h"
#include "net/base/network_change_notifier.h"
#if defined(OS_CHROMEOS)
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc
index 5d3c6c6..7ec80a4 100644
--- a/chrome/browser/sessions/session_service.cc
+++ b/chrome/browser/sessions/session_service.cc
@@ -32,11 +32,11 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
+#include "content/public/browser/web_contents.h"
#if defined(OS_MACOSX)
#include "chrome/browser/app_controller_cppsafe_mac.h"
@@ -539,7 +539,7 @@ void SessionService::Observe(int type,
return;
TabClosed(tab->restore_tab_helper()->window_id(),
tab->restore_tab_helper()->session_id(),
- tab->tab_contents()->GetClosedByUserGesture());
+ tab->web_contents()->GetClosedByUserGesture());
RecordSessionUpdateHistogramData(content::NOTIFICATION_TAB_CLOSED,
&last_updated_tab_closed_time_);
break;
@@ -562,7 +562,7 @@ void SessionService::Observe(int type,
TabNavigationPathPrunedFromBack(
tab->restore_tab_helper()->window_id(),
tab->restore_tab_helper()->session_id(),
- tab->tab_contents()->GetController().GetEntryCount());
+ tab->web_contents()->GetController().GetEntryCount());
}
RecordSessionUpdateHistogramData(content::NOTIFICATION_NAV_LIST_PRUNED,
&last_updated_nav_list_pruned_time_);
@@ -592,7 +592,7 @@ void SessionService::Observe(int type,
if (!tab || tab->profile() != profile())
return;
int current_entry_index =
- tab->tab_contents()->GetController().GetCurrentEntryIndex();
+ tab->web_contents()->GetController().GetCurrentEntryIndex();
SetSelectedNavigationIndex(tab->restore_tab_helper()->window_id(),
tab->restore_tab_helper()->session_id(),
current_entry_index);
@@ -600,7 +600,7 @@ void SessionService::Observe(int type,
tab->restore_tab_helper()->window_id(),
tab->restore_tab_helper()->session_id(),
current_entry_index,
- *tab->tab_contents()->GetController().GetEntryAtIndex(
+ *tab->web_contents()->GetController().GetEntryAtIndex(
current_entry_index));
content::Details<content::LoadCommittedDetails> changed(details);
if (changed->type == content::NAVIGATION_TYPE_NEW_PAGE ||
@@ -1116,14 +1116,14 @@ void SessionService::BuildCommandsForTab(
const SessionID& session_id(tab->restore_tab_helper()->session_id());
commands->push_back(CreateSetTabWindowCommand(window_id, session_id));
const int current_index =
- tab->tab_contents()->GetController().GetCurrentEntryIndex();
+ tab->web_contents()->GetController().GetCurrentEntryIndex();
const int min_index = std::max(0,
current_index - max_persist_navigation_count);
const int max_index =
std::min(current_index + max_persist_navigation_count,
- tab->tab_contents()->GetController().GetEntryCount());
+ tab->web_contents()->GetController().GetEntryCount());
const int pending_index =
- tab->tab_contents()->GetController().GetPendingEntryIndex();
+ tab->web_contents()->GetController().GetPendingEntryIndex();
if (tab_to_available_range) {
(*tab_to_available_range)[session_id.id()] =
std::pair<int, int>(min_index, max_index);
@@ -1132,7 +1132,7 @@ void SessionService::BuildCommandsForTab(
commands->push_back(CreatePinnedStateCommand(session_id, true));
}
TabContentsWrapper* wrapper =
- TabContentsWrapper::GetCurrentWrapperForContents(tab->tab_contents());
+ TabContentsWrapper::GetCurrentWrapperForContents(tab->web_contents());
if (wrapper->extension_tab_helper()->extension_app()) {
commands->push_back(
CreateSetTabExtensionAppIDCommand(
@@ -1141,8 +1141,8 @@ void SessionService::BuildCommandsForTab(
}
for (int i = min_index; i < max_index; ++i) {
const NavigationEntry* entry = (i == pending_index) ?
- tab->tab_contents()->GetController().GetPendingEntry() :
- tab->tab_contents()->GetController().GetEntryAtIndex(i);
+ tab->web_contents()->GetController().GetPendingEntry() :
+ tab->web_contents()->GetController().GetEntryAtIndex(i);
DCHECK(entry);
if (ShouldTrackEntry(entry->GetVirtualURL())) {
commands->push_back(
diff --git a/chrome/browser/speech/speech_input_bubble_views.cc b/chrome/browser/speech/speech_input_bubble_views.cc
index 69cfc3f..5cad3ff 100644
--- a/chrome/browser/speech/speech_input_bubble_views.cc
+++ b/chrome/browser/speech/speech_input_bubble_views.cc
@@ -14,8 +14,8 @@
#include "chrome/browser/ui/views/window.h"
#include "content/browser/resource_context.h"
#include "content/browser/speech/speech_input_manager.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
+#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ssl/ssl_add_cert_handler.cc b/chrome/browser/ssl/ssl_add_cert_handler.cc
index 6bdfbaf..41c6f72 100644
--- a/chrome/browser/ssl/ssl_add_cert_handler.cc
+++ b/chrome/browser/ssl/ssl_add_cert_handler.cc
@@ -10,14 +10,15 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/web_contents.h"
#include "net/base/cert_database.h"
#include "net/base/net_errors.h"
#include "net/base/x509_certificate.h"
#include "net/url_request/url_request.h"
using content::BrowserThread;
+using content::WebContents;
SSLAddCertHandler::SSLAddCertHandler(net::URLRequest* request,
net::X509Certificate* cert,
@@ -86,7 +87,7 @@ void SSLAddCertHandler::Finished(bool add_cert) {
}
void SSLAddCertHandler::CallVerifyClientCertificateError(int cert_error) {
- TabContents* tab = tab_util::GetTabContentsByID(
+ WebContents* tab = tab_util::GetWebContentsByID(
render_process_host_id_, render_view_id_);
if (!tab)
return;
@@ -98,7 +99,7 @@ void SSLAddCertHandler::CallVerifyClientCertificateError(int cert_error) {
void SSLAddCertHandler::CallAddClientCertificate(bool add_cert,
int cert_error) {
- TabContents* tab = tab_util::GetTabContentsByID(
+ WebContents* tab = tab_util::GetWebContentsByID(
render_process_host_id_, render_view_id_);
if (!tab)
return;
diff --git a/chrome/browser/tab_contents/confirm_infobar_delegate.cc b/chrome/browser/tab_contents/confirm_infobar_delegate.cc
index f1f24cf..d3a252d 100644
--- a/chrome/browser/tab_contents/confirm_infobar_delegate.cc
+++ b/chrome/browser/tab_contents/confirm_infobar_delegate.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/navigation_details.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/tab_contents/insecure_content_infobar_delegate.cc b/chrome/browser/tab_contents/insecure_content_infobar_delegate.cc
index efbeda9..8f82474 100644
--- a/chrome/browser/tab_contents/insecure_content_infobar_delegate.cc
+++ b/chrome/browser/tab_contents/insecure_content_infobar_delegate.cc
@@ -8,7 +8,7 @@
#include "chrome/browser/google/google_util.h"
#include "chrome/browser/infobars/infobar_tab_helper.h"
#include "chrome/common/render_messages.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/common/page_transition_types.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index 16b4754..7ce4e98 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -65,13 +65,14 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/browser/speech/speech_input_preferences.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/browser/ssl/ssl_manager.h"
#include "content/public/browser/download_manager.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/ssl_status.h"
#include "content/public/browser/user_metrics.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/common/content_restriction.h"
#include "grit/generated_resources.h"
#include "net/base/escape.h"
diff --git a/chrome/browser/tab_contents/render_view_context_menu_gtk.cc b/chrome/browser/tab_contents/render_view_context_menu_gtk.cc
index fb8f52a..ae3047e 100644
--- a/chrome/browser/tab_contents/render_view_context_menu_gtk.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu_gtk.cc
@@ -11,7 +11,7 @@
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "content/browser/renderer_host/render_widget_host_view_gtk.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/gtk_util.h"
diff --git a/chrome/browser/tab_contents/tab_contents_ssl_helper.cc b/chrome/browser/tab_contents/tab_contents_ssl_helper.cc
index 3a42b7a..996df73 100644
--- a/chrome/browser/tab_contents/tab_contents_ssl_helper.cc
+++ b/chrome/browser/tab_contents/tab_contents_ssl_helper.cc
@@ -25,13 +25,14 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "content/browser/ssl/ssl_client_auth_handler.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
+#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources_standard.h"
#include "net/base/net_errors.h"
+#include "net/base/x509_certificate.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
diff --git a/chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.cc b/chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.cc
index fa9a784..b245947 100644
--- a/chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.cc
+++ b/chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/browser/profiles/profile.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/web_contents.h"
#include "ui/base/dragdrop/gtk_dnd_util.h"
using content::WebContents;
@@ -84,7 +84,7 @@ void WebDragBookmarkHandlerGtk::OnDrop() {
// Focus the target browser.
Browser* browser = Browser::GetBrowserForController(
- &tab_->tab_contents()->GetController(), NULL);
+ &tab_->web_contents()->GetController(), NULL);
if (browser)
browser->window()->Show();
}
diff --git a/chrome/browser/tab_contents/web_drag_bookmark_handler_mac.mm b/chrome/browser/tab_contents/web_drag_bookmark_handler_mac.mm
index 3d6d717..91f461b 100644
--- a/chrome/browser/tab_contents/web_drag_bookmark_handler_mac.mm
+++ b/chrome/browser/tab_contents/web_drag_bookmark_handler_mac.mm
@@ -8,7 +8,7 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/web_contents.h"
using content::WebContents;
@@ -51,7 +51,7 @@ void WebDragBookmarkHandlerMac::OnDrop() {
// Focus the target browser.
Browser* browser = Browser::GetBrowserForController(
- &tab_->tab_contents()->GetController(), NULL);
+ &tab_->web_contents()->GetController(), NULL);
if (browser)
browser->window()->Show();
}
diff --git a/chrome/browser/tab_contents/web_drag_source_win.cc b/chrome/browser/tab_contents/web_drag_source_win.cc
index 71255f4..19b2be3 100644
--- a/chrome/browser/tab_contents/web_drag_source_win.cc
+++ b/chrome/browser/tab_contents/web_drag_source_win.cc
@@ -7,10 +7,10 @@
#include "base/bind.h"
#include "chrome/browser/tab_contents/web_drag_utils_win.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.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.h"
using WebKit::WebDragOperationNone;
using content::BrowserThread;
diff --git a/chrome/browser/tab_contents/web_drop_target_win.cc b/chrome/browser/tab_contents/web_drop_target_win.cc
index 1a52290..209f303 100644
--- a/chrome/browser/tab_contents/web_drop_target_win.cc
+++ b/chrome/browser/tab_contents/web_drop_target_win.cc
@@ -14,7 +14,7 @@
#include "chrome/browser/ui/browser_window.h"
#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/public/browser/web_contents.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
#include "ui/base/clipboard/clipboard_util_win.h"
diff --git a/chrome/browser/task_manager/task_manager.cc b/chrome/browser/task_manager/task_manager.cc
index fb071b0..9015f14 100644
--- a/chrome/browser/task_manager/task_manager.cc
+++ b/chrome/browser/task_manager/task_manager.cc
@@ -28,10 +28,12 @@
#include "chrome/common/chrome_view_type.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
+#include "content/browser/renderer_host/render_view_host.h"
+#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/common/result_codes.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -1036,7 +1038,7 @@ void TaskManager::ActivateProcess(int index) {
TabContentsWrapper* chosen_tab_contents =
model_->GetResourceTabContents(index);
if (chosen_tab_contents) {
- static_cast<RenderViewHostDelegate*>(chosen_tab_contents->tab_contents())->
+ chosen_tab_contents->web_contents()->GetRenderViewHost()->delegate()->
Activate();
}
}
diff --git a/chrome/browser/task_manager/task_manager_notification_resource_provider.cc b/chrome/browser/task_manager/task_manager_notification_resource_provider.cc
index 7d8afd1..7e2180f 100644
--- a/chrome/browser/task_manager/task_manager_notification_resource_provider.cc
+++ b/chrome/browser/task_manager/task_manager_notification_resource_provider.cc
@@ -13,9 +13,9 @@
#include "chrome/browser/notifications/notification_ui_manager.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_process_host.h"
+#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
diff --git a/chrome/browser/task_manager/task_manager_resource_providers.cc b/chrome/browser/task_manager/task_manager_resource_providers.cc
index 50ac984..72fae3f 100644
--- a/chrome/browser/task_manager/task_manager_resource_providers.cc
+++ b/chrome/browser/task_manager/task_manager_resource_providers.cc
@@ -44,10 +44,10 @@
#include "content/browser/browser_child_process_host.h"
#include "content/browser/renderer_host/render_message_filter.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_process_host.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/common/process_type.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -221,8 +221,8 @@ SkBitmap* TaskManagerTabContentsResource::prerender_icon_ = NULL;
TaskManagerTabContentsResource::TaskManagerTabContentsResource(
TabContentsWrapper* tab_contents)
: TaskManagerRendererResource(
- tab_contents->tab_contents()->GetRenderProcessHost()->GetHandle(),
- tab_contents->tab_contents()->GetRenderViewHost()),
+ tab_contents->web_contents()->GetRenderProcessHost()->GetHandle(),
+ tab_contents->web_contents()->GetRenderViewHost()),
tab_contents_(tab_contents),
is_instant_preview_(false) {
if (!prerender_icon_) {
@@ -253,11 +253,11 @@ bool TaskManagerTabContentsResource::IsPrerendering() const {
tab_contents_->profile());
return prerender_manager &&
prerender_manager->IsWebContentsPrerendering(
- tab_contents_->tab_contents());
+ tab_contents_->web_contents());
}
bool TaskManagerTabContentsResource::HostsExtension() const {
- return tab_contents_->tab_contents()->GetURL().SchemeIs(
+ return tab_contents_->web_contents()->GetURL().SchemeIs(
chrome::kExtensionScheme);
}
@@ -267,7 +267,7 @@ TaskManager::Resource::Type TaskManagerTabContentsResource::GetType() const {
string16 TaskManagerTabContentsResource::GetTitle() const {
// Fall back on the URL if there's no title.
- TabContents* contents = tab_contents_->tab_contents();
+ WebContents* contents = tab_contents_->web_contents();
string16 tab_title = contents->GetTitle();
GURL url = contents->GetURL();
if (tab_title.empty()) {
@@ -331,7 +331,7 @@ const Extension* TaskManagerTabContentsResource::GetExtension() const {
ExtensionService* extension_service =
tab_contents_->profile()->GetExtensionService();
return extension_service->extensions()->GetByID(
- tab_contents_->tab_contents()->GetURL().host());
+ tab_contents_->web_contents()->GetURL().host());
}
return NULL;
@@ -355,9 +355,9 @@ TaskManager::Resource* TaskManagerTabContentsResourceProvider::GetResource(
int origin_pid,
int render_process_host_id,
int routing_id) {
- TabContents* tab_contents =
- tab_util::GetTabContentsByID(render_process_host_id, routing_id);
- if (!tab_contents) // Not one of our resource.
+ WebContents* web_contents =
+ tab_util::GetWebContentsByID(render_process_host_id, routing_id);
+ if (!web_contents) // Not one of our resource.
return NULL;
// If an origin PID was specified then the request originated in a plugin
@@ -366,7 +366,7 @@ TaskManager::Resource* TaskManagerTabContentsResourceProvider::GetResource(
return NULL;
TabContentsWrapper* wrapper =
- TabContentsWrapper::GetCurrentWrapperForContents(tab_contents);
+ TabContentsWrapper::GetCurrentWrapperForContents(web_contents);
std::map<TabContentsWrapper*, TaskManagerTabContentsResource*>::iterator
res_iter = resources_.find(wrapper);
if (res_iter == resources_.end()) {
@@ -386,7 +386,7 @@ void TaskManagerTabContentsResourceProvider::StartUpdating() {
Add(*iterator);
// Then we register for notifications to get new tabs.
- registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_CONNECTED,
+ registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_CONNECTED,
content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_SWAPPED,
content::NotificationService::AllBrowserContextsAndSources());
@@ -408,7 +408,7 @@ void TaskManagerTabContentsResourceProvider::StopUpdating() {
// Then we unregister for notifications to get new tabs.
registrar_.Remove(
- this, content::NOTIFICATION_TAB_CONTENTS_CONNECTED,
+ this, content::NOTIFICATION_WEB_CONTENTS_CONNECTED,
content::NotificationService::AllBrowserContextsAndSources());
registrar_.Remove(
this, content::NOTIFICATION_WEB_CONTENTS_SWAPPED,
@@ -443,8 +443,8 @@ void TaskManagerTabContentsResourceProvider::Add(
return;
// Don't add dead tabs or tabs that haven't yet connected.
- if (!tab_contents->tab_contents()->GetRenderProcessHost()->GetHandle() ||
- !tab_contents->tab_contents()->WillNotifyDisconnection()) {
+ if (!tab_contents->web_contents()->GetRenderProcessHost()->GetHandle() ||
+ !tab_contents->web_contents()->WillNotifyDisconnection()) {
return;
}
@@ -500,20 +500,15 @@ void TaskManagerTabContentsResourceProvider::Observe(int type,
TabContentsWrapper* tab_contents;
if (type == chrome::NOTIFICATION_INSTANT_COMMITTED) {
tab_contents = content::Source<TabContentsWrapper>(source).ptr();
- } else if (type == content::NOTIFICATION_WEB_CONTENTS_DESTROYED ||
- type == content::NOTIFICATION_WEB_CONTENTS_SWAPPED) {
- WebContents* web_contents = content::Source<WebContents>(source).ptr();
- tab_contents = TabContentsWrapper::GetCurrentWrapperForContents(
- web_contents);
} else {
tab_contents = TabContentsWrapper::GetCurrentWrapperForContents(
- content::Source<TabContents>(source).ptr());
+ content::Source<WebContents>(source).ptr());
}
// A background page does not have a TabContentsWrapper.
if (!tab_contents)
return;
switch (type) {
- case content::NOTIFICATION_TAB_CONTENTS_CONNECTED:
+ case content::NOTIFICATION_WEB_CONTENTS_CONNECTED:
Add(tab_contents);
break;
case content::NOTIFICATION_WEB_CONTENTS_SWAPPED:
diff --git a/chrome/browser/translate/translate_infobar_delegate.cc b/chrome/browser/translate/translate_infobar_delegate.cc
index 5f19dbf..4305c0b 100644
--- a/chrome/browser/translate/translate_infobar_delegate.cc
+++ b/chrome/browser/translate/translate_infobar_delegate.cc
@@ -15,9 +15,9 @@
#include "chrome/browser/translate/translate_tab_helper.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_constants.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
+#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources_standard.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/translate/translate_tab_helper.cc b/chrome/browser/translate/translate_tab_helper.cc
index 15c772d..16ce399 100644
--- a/chrome/browser/translate/translate_tab_helper.cc
+++ b/chrome/browser/translate/translate_tab_helper.cc
@@ -7,14 +7,14 @@
#include "chrome/browser/translate/page_translated_details.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/render_messages.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/web_contents.h"
using content::WebContents;
-TranslateTabHelper::TranslateTabHelper(TabContents* tab_contents)
- : content::WebContentsObserver(tab_contents),
- language_state_(&tab_contents->GetController()) {
+TranslateTabHelper::TranslateTabHelper(WebContents* web_contents)
+ : content::WebContentsObserver(web_contents),
+ language_state_(&web_contents->GetController()) {
}
TranslateTabHelper::~TranslateTabHelper() {
diff --git a/chrome/browser/translate/translate_tab_helper.h b/chrome/browser/translate/translate_tab_helper.h
index c6abd4b..f56f65e 100644
--- a/chrome/browser/translate/translate_tab_helper.h
+++ b/chrome/browser/translate/translate_tab_helper.h
@@ -12,7 +12,7 @@
class TranslateTabHelper : public content::WebContentsObserver {
public:
- explicit TranslateTabHelper(TabContents* tab_contents);
+ explicit TranslateTabHelper(content::WebContents* web_contents);
virtual ~TranslateTabHelper();
LanguageState& language_state() { return language_state_; }
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 35bf83d..04c0634 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -3393,7 +3393,7 @@ void Browser::TabReplacedAt(TabStripModel* tab_strip_model,
}
content::DevToolsManager::GetInstance()->TabReplaced(
- old_contents->tab_contents(), new_contents->tab_contents());
+ old_contents->web_contents(), new_contents->tab_contents());
}
void Browser::TabPinnedStateChanged(TabContentsWrapper* contents, int index) {
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm
index 7ad1399..555ff190 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm
@@ -43,7 +43,7 @@ BookmarkBubbleNotificationBridge::BookmarkBubbleNotificationBridge(
: controller_(controller), selector_(selector) {
// registrar_ will automatically RemoveAll() when destroyed so we
// don't need to do so explicitly.
- registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_CONNECTED,
+ registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_CONNECTED,
content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_TAB_CLOSED,
content::NotificationService::AllSources());
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm
index 16c7fc0..7cdc8c2 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm
@@ -17,6 +17,8 @@
#import "testing/gtest_mac.h"
#include "testing/platform_test.h"
+using content::WebContents;
+
// Watch for bookmark pulse notifications so we can confirm they were sent.
@interface BookmarkPulseObserver : NSObject {
int notifications_;
@@ -474,8 +476,8 @@ TEST_F(BookmarkBubbleControllerTest, BubbleGoesAwayOnNewTab) {
// we fake the notification that would be triggered by a tab
// creation. See TabContents::NotifyConnected().
content::NotificationService::current()->Notify(
- content::NOTIFICATION_TAB_CONTENTS_CONNECTED,
- content::Source<TabContents>(NULL),
+ content::NOTIFICATION_WEB_CONTENTS_CONNECTED,
+ content::Source<WebContents>(NULL),
content::NotificationService::NoDetails());
// Confirm bubble going bye-bye.
diff --git a/chrome/browser/ui/sad_tab_observer.cc b/chrome/browser/ui/sad_tab_observer.cc
index 350ba67..eebe6a4 100644
--- a/chrome/browser/ui/sad_tab_observer.cc
+++ b/chrome/browser/ui/sad_tab_observer.cc
@@ -19,10 +19,12 @@
#include "chrome/browser/ui/gtk/sad_tab_gtk.h"
#endif
+using content::WebContents;
+
SadTabObserver::SadTabObserver(TabContents* tab_contents)
: content::WebContentsObserver(tab_contents) {
- registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_CONNECTED,
- content::Source<TabContents>(tab_contents));
+ registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_CONNECTED,
+ content::Source<WebContents>(tab_contents));
}
SadTabObserver::~SadTabObserver() {
@@ -46,7 +48,7 @@ void SadTabObserver::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
switch (type) {
- case content::NOTIFICATION_TAB_CONTENTS_CONNECTED:
+ case content::NOTIFICATION_WEB_CONTENTS_CONNECTED:
if (HasSadTab()) {
web_contents()->GetView()->RemoveOverlayView();
ReleaseSadTab();
diff --git a/content/browser/debugger/devtools_frontend_host.cc b/content/browser/debugger/devtools_frontend_host.cc
index 9934953..fb614c8 100644
--- a/content/browser/debugger/devtools_frontend_host.cc
+++ b/content/browser/debugger/devtools_frontend_host.cc
@@ -15,9 +15,10 @@ namespace content {
// static
DevToolsClientHost* DevToolsClientHost::CreateDevToolsFrontendHost(
- TabContents* client_tab_contents,
+ WebContents* client_web_contents,
DevToolsFrontendHostDelegate* delegate) {
- return new DevToolsFrontendHost(client_tab_contents, delegate);
+ return new DevToolsFrontendHost(
+ static_cast<TabContents*>(client_web_contents), delegate);
}
// static
@@ -54,7 +55,7 @@ void DevToolsFrontendHost::FrameNavigating(const std::string& url) {
delegate_->FrameNavigating(url);
}
-void DevToolsFrontendHost::TabReplaced(TabContents* new_tab) {
+void DevToolsFrontendHost::TabReplaced(WebContents* new_tab) {
delegate_->TabReplaced(new_tab);
}
diff --git a/content/browser/debugger/devtools_frontend_host.h b/content/browser/debugger/devtools_frontend_host.h
index fcb2a6d..e66048d 100644
--- a/content/browser/debugger/devtools_frontend_host.h
+++ b/content/browser/debugger/devtools_frontend_host.h
@@ -35,7 +35,7 @@ class DevToolsFrontendHost : public DevToolsClientHost,
virtual void DispatchOnInspectorFrontend(const std::string& message) OVERRIDE;
virtual void InspectedTabClosing() OVERRIDE;
virtual void FrameNavigating(const std::string& url) OVERRIDE;
- virtual void TabReplaced(TabContents* new_tab) OVERRIDE;
+ virtual void TabReplaced(WebContents* new_tab) OVERRIDE;
// content::RenderViewHostObserver overrides.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
diff --git a/content/browser/debugger/devtools_http_handler_impl.cc b/content/browser/debugger/devtools_http_handler_impl.cc
index db4a916..ab023da 100644
--- a/content/browser/debugger/devtools_http_handler_impl.cc
+++ b/content/browser/debugger/devtools_http_handler_impl.cc
@@ -69,7 +69,7 @@ class DevToolsClientHostImpl : public DevToolsClientHost {
data));
}
- virtual void TabReplaced(TabContents* new_tab) {
+ virtual void TabReplaced(WebContents* new_tab) {
}
private:
@@ -282,19 +282,20 @@ static PageList GeneratePageList(
for (Tabs::iterator it = inspectable_tabs.begin();
it != inspectable_tabs.end(); ++it) {
- TabContents* tab_contents = *it;
- NavigationController& controller = tab_contents->GetController();
+ WebContents* web_contents = *it;
+ NavigationController& controller = web_contents->GetController();
NavigationEntry* entry = controller.GetActiveEntry();
if (entry == NULL || !entry->GetURL().is_valid())
continue;
DevToolsAgentHost* agent = DevToolsAgentHostRegistry::GetDevToolsAgentHost(
- tab_contents->GetRenderViewHost());
+ web_contents->GetRenderViewHost());
DevToolsClientHost* client_host = DevToolsManager::GetInstance()->
GetDevToolsClientHostFor(agent);
PageInfo page_info;
- page_info.id = TabContentsIDHelper::GetID(tab_contents);
+ page_info.id = TabContentsIDHelper::GetID(
+ static_cast<TabContents*>(web_contents));
page_info.attached = client_host != NULL;
page_info.url = entry->GetURL().spec();
page_info.title = UTF16ToUTF8(net::EscapeForHTML(entry->GetTitle()));
diff --git a/content/browser/debugger/devtools_manager_impl.cc b/content/browser/debugger/devtools_manager_impl.cc
index 3b4b12b..e11a93ad 100644
--- a/content/browser/debugger/devtools_manager_impl.cc
+++ b/content/browser/debugger/devtools_manager_impl.cc
@@ -160,8 +160,8 @@ void DevToolsManagerImpl::OnCancelPendingNavigation(RenderViewHost* pending,
}
}
-void DevToolsManagerImpl::TabReplaced(TabContents* old_tab,
- TabContents* new_tab) {
+void DevToolsManagerImpl::TabReplaced(WebContents* old_tab,
+ WebContents* new_tab) {
RenderViewHost* old_rvh = old_tab->GetRenderViewHost();
if (!DevToolsAgentHostRegistry::HasDevToolsAgentHost(old_rvh))
return;
diff --git a/content/browser/debugger/devtools_manager_impl.h b/content/browser/debugger/devtools_manager_impl.h
index 62a5a9e..0039b7d 100644
--- a/content/browser/debugger/devtools_manager_impl.h
+++ b/content/browser/debugger/devtools_manager_impl.h
@@ -63,7 +63,7 @@ class CONTENT_EXPORT DevToolsManagerImpl
// Invoked when a tab is replaced by another tab. This is triggered by
// TabStripModel::ReplaceTabContentsAt.
- virtual void TabReplaced(TabContents* old_tab, TabContents* new_tab) OVERRIDE;
+ virtual void TabReplaced(WebContents* old_tab, WebContents* new_tab) OVERRIDE;
// Closes all open developer tools windows.
virtual void CloseAllClientHosts() OVERRIDE;
diff --git a/content/browser/debugger/devtools_manager_unittest.cc b/content/browser/debugger/devtools_manager_unittest.cc
index 15e2039..0fd4d3d 100644
--- a/content/browser/debugger/devtools_manager_unittest.cc
+++ b/content/browser/debugger/devtools_manager_unittest.cc
@@ -54,7 +54,7 @@ class TestDevToolsClientHost : public DevToolsClientHost {
last_sent_message = &message;
}
- virtual void TabReplaced(TabContents* new_tab) {
+ virtual void TabReplaced(WebContents* new_tab) {
}
static void ResetCounters() {
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index c7933c5..4587e45 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -312,7 +312,7 @@ void DownloadManagerImpl::RestartDownload(int32 download_id) {
if (download->PromptUserForSaveLocation()) {
// We must ask the user for the place to put the download.
- TabContents* contents = download->GetTabContents();
+ WebContents* contents = download->GetTabContents();
// |id_ptr| will be deleted in either FileSelected() or
// FileSelectionCancelled().
@@ -994,7 +994,7 @@ void DownloadManagerImpl::ShowDownloadInBrowser(DownloadItem* download) {
// If the contents no longer exists, we ask the embedder to suggest another
// tab.
if (!content)
- content = delegate_->GetAlternativeTabContentsToNotifyForDownload();
+ content = delegate_->GetAlternativeWebContentsToNotifyForDownload();
if (content && content->GetDelegate())
content->GetDelegate()->OnStartDownload(content, download);
diff --git a/content/browser/download/mock_download_manager_delegate.h b/content/browser/download/mock_download_manager_delegate.h
index e64f40b..607df77 100644
--- a/content/browser/download/mock_download_manager_delegate.h
+++ b/content/browser/download/mock_download_manager_delegate.h
@@ -26,12 +26,12 @@ class MockDownloadManagerDelegate : public content::DownloadManagerDelegate {
MOCK_METHOD1(SetDownloadManager, void(content::DownloadManager* dm));
MOCK_METHOD0(Shutdown, void());
MOCK_METHOD1(ShouldStartDownload, bool(int32 download_id));
- MOCK_METHOD3(ChooseDownloadPath, void(TabContents* tab_contents,
+ MOCK_METHOD3(ChooseDownloadPath, void(content::WebContents* web_contents,
const FilePath& suggested_path,
void* data));
MOCK_METHOD2(OverrideIntermediatePath, bool(content::DownloadItem* item,
FilePath* intermediate_path));
- MOCK_METHOD0(GetAlternativeTabContentsToNotifyForDownload,
+ MOCK_METHOD0(GetAlternativeWebContentsToNotifyForDownload,
content::WebContents*());
MOCK_METHOD1(ShouldOpenFileBasedOnExtension, bool(const FilePath& path));
MOCK_METHOD1(ShouldCompleteDownload, bool(content::DownloadItem* item));
@@ -48,7 +48,7 @@ class MockDownloadManagerDelegate : public content::DownloadManagerDelegate {
MOCK_METHOD2(RemoveItemsFromPersistentStoreBetween, void(
base::Time remove_begin,
base::Time remove_end));
- MOCK_METHOD3(GetSaveDir, void(TabContents* tab_contents,
+ MOCK_METHOD3(GetSaveDir, void(content::WebContents* web_contents,
FilePath* website_save_dir,
FilePath* download_save_dir));
MOCK_METHOD3(ChooseSavePath, void(
diff --git a/content/browser/download/save_package.cc b/content/browser/download/save_package.cc
index 62546ea..1ce1f21 100644
--- a/content/browser/download/save_package.cc
+++ b/content/browser/download/save_package.cc
@@ -1155,6 +1155,10 @@ TabContents* SavePackage::tab_contents() const {
static_cast<TabContents*>(content::WebContentsObserver::web_contents());
}
+WebContents* SavePackage::web_contents() const {
+ return tab_contents();
+}
+
void SavePackage::GetSaveInfo() {
// Can't use tab_contents_ in the file thread, so get the data that we need
// before calling to it.
diff --git a/content/browser/download/save_package.h b/content/browser/download/save_package.h
index 4355b7e..292fd3a 100644
--- a/content/browser/download/save_package.h
+++ b/content/browser/download/save_package.h
@@ -124,6 +124,7 @@ class CONTENT_EXPORT SavePackage
int tab_id() const { return tab_id_; }
int id() const { return unique_id_; }
TabContents* tab_contents() const;
+ content::WebContents* web_contents() const;
void GetSaveInfo();
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index 111ee07..3c10575 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -1573,8 +1573,8 @@ void TabContents::NotifySwapped() {
void TabContents::NotifyConnected() {
notify_disconnection_ = true;
content::NotificationService::current()->Notify(
- content::NOTIFICATION_TAB_CONTENTS_CONNECTED,
- content::Source<TabContents>(this),
+ content::NOTIFICATION_WEB_CONTENTS_CONNECTED,
+ content::Source<WebContents>(this),
content::NotificationService::NoDetails());
}
diff --git a/content/public/browser/devtools_client_host.h b/content/public/browser/devtools_client_host.h
index 8bd98e8..29d23ad 100644
--- a/content/public/browser/devtools_client_host.h
+++ b/content/public/browser/devtools_client_host.h
@@ -16,10 +16,11 @@ class Message;
}
class RenderViewHost;
-class TabContents;
namespace content {
+class WebContents;
+
class DevToolsFrontendHostDelegate;
// Describes interface for managing devtools clients from browser process. There
@@ -42,12 +43,12 @@ class CONTENT_EXPORT DevToolsClientHost {
// Invoked when a tab is replaced by another tab. This is triggered by
// TabStripModel::ReplaceTabContentsAt.
- virtual void TabReplaced(TabContents* new_tab) = 0;
+ virtual void TabReplaced(WebContents* new_tab) = 0;
// Creates DevToolsClientHost for TabContents containing default DevTools
// frontend implementation.
static DevToolsClientHost* CreateDevToolsFrontendHost(
- TabContents* client_tab_contents,
+ WebContents* client_web_contents,
DevToolsFrontendHostDelegate* delegate);
// Sets up DevToolsClient on the corresponding RenderView.
diff --git a/content/public/browser/devtools_frontend_host_delegate.h b/content/public/browser/devtools_frontend_host_delegate.h
index fa10180..3437505 100644
--- a/content/public/browser/devtools_frontend_host_delegate.h
+++ b/content/public/browser/devtools_frontend_host_delegate.h
@@ -51,7 +51,7 @@ class DevToolsFrontendHostDelegate {
// Invoked when tab inspected by this devtools frontend is replaced by
// another tab. This is triggered by TabStripModel::ReplaceTabContentsAt.
- virtual void TabReplaced(TabContents* new_tab) = 0;
+ virtual void TabReplaced(WebContents* new_tab) = 0;
};
} // namespace content
diff --git a/content/public/browser/devtools_http_handler_delegate.h b/content/public/browser/devtools_http_handler_delegate.h
index 970b06f..4e09465 100644
--- a/content/public/browser/devtools_http_handler_delegate.h
+++ b/content/public/browser/devtools_http_handler_delegate.h
@@ -9,17 +9,17 @@
#include <string>
#include <vector>
-class TabContents;
-
namespace net {
class URLRequestContext;
}
namespace content {
+class WebContents;
+
class DevToolsHttpHandlerDelegate {
public:
- typedef std::vector<TabContents*> InspectableTabs;
+ typedef std::vector<WebContents*> InspectableTabs;
virtual ~DevToolsHttpHandlerDelegate() {}
// Should return the list of inspectable tabs. Called on the UI thread.
diff --git a/content/public/browser/devtools_manager.h b/content/public/browser/devtools_manager.h
index d2f1667..55bf4aa2 100644
--- a/content/public/browser/devtools_manager.h
+++ b/content/public/browser/devtools_manager.h
@@ -37,7 +37,7 @@ class CONTENT_EXPORT DevToolsManager {
// Invoked when a tab is replaced by another tab. This is triggered by
// TabStripModel::ReplaceTabContentsAt.
- virtual void TabReplaced(TabContents* old_tab, TabContents* new_tab) = 0;
+ virtual void TabReplaced(WebContents* old_tab, WebContents* new_tab) = 0;
// Closes all open developer tools windows.
virtual void CloseAllClientHosts() = 0;
diff --git a/content/public/browser/download_manager_delegate.h b/content/public/browser/download_manager_delegate.h
index 0339851..a92301e 100644
--- a/content/public/browser/download_manager_delegate.h
+++ b/content/public/browser/download_manager_delegate.h
@@ -11,7 +11,6 @@
#include "base/time.h"
class FilePath;
-class TabContents;
class SavePackage;
namespace content {
@@ -35,7 +34,7 @@ class DownloadManagerDelegate {
// Asks the user for the path for a download. The delegate calls
// DownloadManager::FileSelected or DownloadManager::FileSelectionCanceled to
// give the answer.
- virtual void ChooseDownloadPath(TabContents* tab_contents,
+ virtual void ChooseDownloadPath(WebContents* web_contents,
const FilePath& suggested_path,
void* data) = 0;
@@ -45,10 +44,10 @@ class DownloadManagerDelegate {
virtual bool OverrideIntermediatePath(DownloadItem* item,
FilePath* intermediate_path) = 0;
- // Called when the download system wants to alert a TabContents that a
+ // Called when the download system wants to alert a WebContents that a
// download has started, but the TabConetnts has gone away. This lets an
- // delegate return an alternative TabContents. The delegate can return NULL.
- virtual WebContents* GetAlternativeTabContentsToNotifyForDownload() = 0;
+ // delegate return an alternative WebContents. The delegate can return NULL.
+ virtual WebContents* GetAlternativeWebContentsToNotifyForDownload() = 0;
// Tests if a file type should be opened automatically.
virtual bool ShouldOpenFileBasedOnExtension(const FilePath& path) = 0;
@@ -103,7 +102,7 @@ class DownloadManagerDelegate {
base::Time remove_end) = 0;
// Retrieve the directories to save html pages and downloads to.
- virtual void GetSaveDir(TabContents* tab_contents,
+ virtual void GetSaveDir(WebContents* web_contents,
FilePath* website_save_dir,
FilePath* download_save_dir) = 0;
diff --git a/content/public/browser/notification_types.h b/content/public/browser/notification_types.h
index 7b37aba..0d6411f 100644
--- a/content/public/browser/notification_types.h
+++ b/content/public/browser/notification_types.h
@@ -224,11 +224,11 @@ enum NotificationType {
NOTIFICATION_TAB_CLOSED,
// This notification is sent when a render view host has connected to a
- // renderer process. The source is a Source<TabContents> with a pointer to
- // the TabContents. A TAB_CONTENTS_DISCONNECTED notification is
+ // renderer process. The source is a Source<WebContents> with a pointer to
+ // the WebContents. A WEB_CONTENTS_DISCONNECTED notification is
// guaranteed before the source pointer becomes junk. No details are
// expected.
- NOTIFICATION_TAB_CONTENTS_CONNECTED,
+ NOTIFICATION_WEB_CONTENTS_CONNECTED,
// This notification is sent when a TabContents swaps its render view host
// with another one, possibly changing processes. The source is a
diff --git a/content/shell/shell_download_manager_delegate.cc b/content/shell/shell_download_manager_delegate.cc
index b6fdcb3..2ee3a7d 100644
--- a/content/shell/shell_download_manager_delegate.cc
+++ b/content/shell/shell_download_manager_delegate.cc
@@ -100,7 +100,7 @@ void ShellDownloadManagerDelegate::RestartDownload(
}
void ShellDownloadManagerDelegate::ChooseDownloadPath(
- TabContents* tab_contents,
+ WebContents* web_contents,
const FilePath& suggested_path,
void* data) {
FilePath result;
@@ -111,7 +111,7 @@ void ShellDownloadManagerDelegate::ChooseDownloadPath(
OPENFILENAME save_as;
ZeroMemory(&save_as, sizeof(save_as));
save_as.lStructSize = sizeof(OPENFILENAME);
- save_as.hwndOwner = tab_contents->GetNativeView();
+ save_as.hwndOwner = web_contents->GetNativeView();
save_as.lpstrFile = file_name;
save_as.nMaxFile = arraysize(file_name);
@@ -143,7 +143,7 @@ bool ShellDownloadManagerDelegate::OverrideIntermediatePath(
}
WebContents* ShellDownloadManagerDelegate::
- GetAlternativeTabContentsToNotifyForDownload() {
+ GetAlternativeWebContentsToNotifyForDownload() {
return NULL;
}
@@ -190,7 +190,7 @@ void ShellDownloadManagerDelegate::RemoveItemsFromPersistentStoreBetween(
}
void ShellDownloadManagerDelegate::GetSaveDir(
- TabContents* tab_contents,
+ WebContents* web_contents,
FilePath* website_save_dir,
FilePath* download_save_dir) {
}
diff --git a/content/shell/shell_download_manager_delegate.h b/content/shell/shell_download_manager_delegate.h
index dbd79dd..1eaea2f 100644
--- a/content/shell/shell_download_manager_delegate.h
+++ b/content/shell/shell_download_manager_delegate.h
@@ -26,12 +26,12 @@ class ShellDownloadManagerDelegate
virtual void Shutdown() OVERRIDE;
virtual bool ShouldStartDownload(int32 download_id) OVERRIDE;
- virtual void ChooseDownloadPath(TabContents* tab_contents,
+ virtual void ChooseDownloadPath(WebContents* web_contents,
const FilePath& suggested_path,
void* data) OVERRIDE;
virtual bool OverrideIntermediatePath(DownloadItem* item,
FilePath* intermediate_path) OVERRIDE;
- virtual WebContents* GetAlternativeTabContentsToNotifyForDownload() OVERRIDE;
+ virtual WebContents* GetAlternativeWebContentsToNotifyForDownload() OVERRIDE;
virtual bool ShouldOpenFileBasedOnExtension(const FilePath& path) OVERRIDE;
virtual bool ShouldCompleteDownload(DownloadItem* item) OVERRIDE;
virtual bool ShouldOpenDownload(DownloadItem* item) OVERRIDE;
@@ -46,7 +46,7 @@ class ShellDownloadManagerDelegate
virtual void RemoveItemsFromPersistentStoreBetween(
base::Time remove_begin,
base::Time remove_end) OVERRIDE;
- virtual void GetSaveDir(TabContents* tab_contents,
+ virtual void GetSaveDir(WebContents* web_contents,
FilePath* website_save_dir,
FilePath* download_save_dir) OVERRIDE;
virtual void ChooseSavePath(const base::WeakPtr<SavePackage>& save_package,