summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/accessibility/dump_accessibility_tree_browsertest.cc2
-rw-r--r--chrome/browser/aeropeek_manager.cc18
-rw-r--r--chrome/browser/aeropeek_manager.h16
-rw-r--r--chrome/browser/autocomplete/autocomplete_browsertest.cc1
-rw-r--r--chrome/browser/autocomplete_history_manager.cc13
-rw-r--r--chrome/browser/autocomplete_history_manager.h4
-rw-r--r--chrome/browser/automation/automation_tab_helper_unittest.cc3
-rw-r--r--chrome/browser/bug_report_util.cc8
-rw-r--r--chrome/browser/bug_report_util.h7
-rw-r--r--chrome/browser/chrome_content_browser_client.cc9
-rw-r--r--chrome/browser/chrome_plugin_message_filter.cc5
-rw-r--r--chrome/browser/chrome_quota_permission_context.cc10
-rw-r--r--chrome/browser/chromeos/media/media_player_browsertest.cc1
-rw-r--r--chrome/browser/content_settings/content_settings_browsertest.cc6
-rw-r--r--chrome/browser/crash_recovery_browsertest.cc2
-rw-r--r--chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc2
-rw-r--r--chrome/browser/download/download_browsertest.cc2
-rw-r--r--chrome/browser/download/save_page_browsertest.cc2
-rw-r--r--chrome/browser/errorpage_browsertest.cc4
-rw-r--r--chrome/browser/extensions/browser_action_apitest.cc2
-rw-r--r--chrome/browser/extensions/extension_context_menu_apitest.cc1
-rw-r--r--chrome/browser/extensions/extension_context_menu_browsertest.cc1
-rw-r--r--chrome/browser/extensions/extension_override_apitest.cc1
-rw-r--r--chrome/browser/extensions/extension_webnavigation_apitest.cc2
-rw-r--r--chrome/browser/external_tab_container_win.cc10
-rw-r--r--chrome/browser/external_tab_container_win.h1
-rw-r--r--chrome/browser/memory_details.cc8
-rw-r--r--chrome/browser/omnibox_search_hint.cc2
-rw-r--r--chrome/browser/password_manager_delegate_impl.cc9
-rw-r--r--chrome/browser/plugin_installer_infobar_delegate.cc2
-rw-r--r--chrome/browser/plugin_observer.cc4
-rw-r--r--chrome/browser/prerender/prerender_browsertest.cc16
-rw-r--r--chrome/browser/printing/print_preview_tab_controller_browsertest.cc7
-rw-r--r--chrome/browser/printing/print_preview_tab_controller_unittest.cc1
-rw-r--r--chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc1
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc2
-rw-r--r--chrome/browser/spellchecker/spellcheck_host_browsertest.cc1
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu_browsertest.cc2
-rw-r--r--chrome/browser/tabs/tab_strip_model_unittest.cc59
-rw-r--r--chrome/browser/ui/auto_login_prompter.cc10
-rw-r--r--chrome/browser/ui/browser_close_browsertest.cc1
-rw-r--r--chrome/browser/ui/browser_list_unittest.cc4
-rw-r--r--chrome/browser/ui/browser_navigator_browsertest.cc12
-rw-r--r--chrome/browser/ui/cocoa/tabpose_window_unittest.mm1
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_strip_controller_unittest.mm2
-rw-r--r--chrome/browser/ui/collected_cookies_infobar_delegate.cc2
-rw-r--r--chrome/browser/ui/constrained_window_tab_helper.cc4
-rw-r--r--chrome/browser/ui/find_bar/find_bar_host_browsertest.cc21
-rw-r--r--chrome/browser/ui/fullscreen_controller.cc17
-rw-r--r--chrome/browser/ui/fullscreen_controller.h2
-rw-r--r--chrome/browser/ui/intents/web_intent_picker_controller_browsertest.cc2
-rw-r--r--chrome/browser/ui/intents/web_intent_picker_controller_unittest.cc1
-rw-r--r--chrome/browser/ui/login/login_prompt_browsertest.cc14
-rw-r--r--chrome/browser/ui/sad_tab_observer.cc8
-rw-r--r--chrome/browser/ui/sad_tab_observer.h2
-rw-r--r--chrome/browser/ui/select_file_dialog.cc1
-rw-r--r--chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc3
-rw-r--r--chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc1
-rw-r--r--chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.h1
-rw-r--r--chrome/browser/ui/webui/chromeos/imageburner/imageburner_utils.cc3
-rw-r--r--chrome/browser/ui/webui/chromeos/imageburner/imageburner_utils.h2
-rw-r--r--chrome/browser/ui/webui/chromeos/imageburner/webui_handler.h5
-rw-r--r--chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc2
-rw-r--r--chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc1
-rw-r--r--chrome/browser/ui/webui/collected_cookies_ui_delegate.cc1
-rw-r--r--chrome/browser/ui/webui/hung_renderer_dialog.cc9
-rw-r--r--chrome/browser/ui/webui/input_window_dialog_ui.cc6
-rw-r--r--chrome/browser/ui/webui/input_window_dialog_ui.h4
-rw-r--r--chrome/browser/ui/webui/input_window_dialog_webui.cc1
-rw-r--r--chrome/browser/ui/webui/ntp/app_launcher_handler.cc1
-rw-r--r--chrome/browser/ui/webui/ntp/new_tab_ui.cc2
-rw-r--r--chrome/browser/ui/webui/options/chromeos/system_options_handler.cc1
-rw-r--r--chrome/browser/ui/webui/options/content_settings_handler.cc1
-rw-r--r--chrome/browser/ui/webui/options/manage_profile_handler.cc1
-rw-r--r--chrome/browser/ui/webui/options/options_ui.cc2
-rw-r--r--chrome/browser/ui/webui/options2/chromeos/system_options_handler2.cc1
-rw-r--r--chrome/browser/ui/webui/options2/content_settings_handler2.cc1
-rw-r--r--chrome/browser/ui/webui/options2/manage_profile_handler2.cc1
-rw-r--r--chrome/browser/ui/webui/options2/options_ui2.cc2
-rw-r--r--chrome/browser/ui/webui/print_preview_handler_unittest.cc4
-rw-r--r--chrome/browser/ui/webui/print_preview_ui_unittest.cc8
-rw-r--r--chrome/browser/ui/webui/quota_internals_ui.cc2
-rw-r--r--chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.cc1
-rw-r--r--chrome/test/data/webui/certificate_viewer_ui_test-inl.h2
-rw-r--r--chrome/test/data/webui/hung_renderer_dialog_ui_test-inl.h2
85 files changed, 206 insertions, 216 deletions
diff --git a/chrome/browser/accessibility/dump_accessibility_tree_browsertest.cc b/chrome/browser/accessibility/dump_accessibility_tree_browsertest.cc
index b8f8559..7e97b13 100644
--- a/chrome/browser/accessibility/dump_accessibility_tree_browsertest.cc
+++ b/chrome/browser/accessibility/dump_accessibility_tree_browsertest.cc
@@ -16,9 +16,9 @@
#include "content/browser/renderer_host/render_view_host.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/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/web_contents.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/resource/resource_bundle.h"
diff --git a/chrome/browser/aeropeek_manager.cc b/chrome/browser/aeropeek_manager.cc
index 367ca55..78bdccb 100644
--- a/chrome/browser/aeropeek_manager.cc
+++ b/chrome/browser/aeropeek_manager.cc
@@ -838,15 +838,15 @@ void AeroPeekManager::CreateAeroPeekWindowIfNecessary(TabContentsWrapper* tab,
this,
GetTabID(tab),
foreground,
- tab->tab_contents()->GetTitle(),
+ tab->web_contents()->GetTitle(),
tab->favicon_tab_helper()->GetFavicon());
tab_list_.push_back(window);
}
-TabContents* AeroPeekManager::GetTabContents(int tab_id) const {
+WebContents* AeroPeekManager::GetWebContents(int tab_id) const {
for (TabContentsIterator iterator; !iterator.done(); ++iterator) {
if (GetTabID(*iterator) == tab_id)
- return (*iterator)->tab_contents();
+ return (*iterator)->web_contents();
}
return NULL;
}
@@ -936,9 +936,9 @@ void AeroPeekManager::TabChangedAt(TabContentsWrapper* contents,
// Windows needs them (e.g. when a user hovers a taskbar icon) to avoid
// hurting the rendering performance. (These functions just save the
// information needed for handling update requests from Windows.)
- window->SetTitle(contents->tab_contents()->GetTitle());
+ window->SetTitle(contents->web_contents()->GetTitle());
window->SetFavicon(contents->favicon_tab_helper()->GetFavicon());
- window->Update(contents->tab_contents()->IsLoading());
+ window->Update(contents->web_contents()->IsLoading());
}
///////////////////////////////////////////////////////////////////////////////
@@ -948,7 +948,7 @@ void AeroPeekManager::ActivateTab(int tab_id) {
// Ask TabStrip to activate this tab.
// We don't have to update thumbnails now since TabStrip will call
// ActiveTabChanged() when it actually activates this tab.
- WebContents* contents = GetTabContents(tab_id);
+ WebContents* contents = GetWebContents(tab_id);
if (contents && contents->GetDelegate())
contents->GetDelegate()->ActivateContents(contents);
}
@@ -957,7 +957,7 @@ void AeroPeekManager::CloseTab(int tab_id) {
// Ask TabStrip to close this tab.
// TabStrip will call TabClosingAt() when it actually closes this tab. We
// will delete the AeroPeekWindow object attached to this tab there.
- TabContents* contents = GetTabContents(tab_id);
+ WebContents* contents = GetWebContents(tab_id);
if (contents && contents->GetDelegate())
contents->GetDelegate()->CloseContents(contents);
}
@@ -971,7 +971,7 @@ bool AeroPeekManager::GetTabThumbnail(int tab_id, SkBitmap* thumbnail) {
// Copy the thumbnail image and the favicon of this tab. We will resize the
// images and send them to Windows.
- TabContents* contents = GetTabContents(tab_id);
+ WebContents* contents = GetWebContents(tab_id);
if (!contents)
return false;
@@ -988,7 +988,7 @@ bool AeroPeekManager::GetTabPreview(int tab_id, SkBitmap* preview) {
// Retrieve the BackingStore associated with the given tab and return its
// SkPlatformCanvas.
- TabContents* contents = GetTabContents(tab_id);
+ WebContents* contents = GetWebContents(tab_id);
if (!contents)
return false;
diff --git a/chrome/browser/aeropeek_manager.h b/chrome/browser/aeropeek_manager.h
index 06818b2..26ae054 100644
--- a/chrome/browser/aeropeek_manager.h
+++ b/chrome/browser/aeropeek_manager.h
@@ -13,14 +13,18 @@
#include "chrome/browser/tabs/tab_strip_model_observer.h"
#include "ui/gfx/insets.h"
-namespace gfx {
-class Size;
-}
class AeroPeekWindow;
class SkBitmap;
-class TabContents;
class TabContentsWrapper;
+namespace content {
+class WebContents;
+}
+
+namespace gfx {
+class Size;
+}
+
// A class which defines interfaces called from AeroPeekWindow.
// This class is used for dispatching an event received by a thumbnail window
// and for retrieving information from Chrome.
@@ -160,14 +164,14 @@ class AeroPeekManager : public TabStripModelObserver,
const gfx::Size& source,
gfx::Size* output) const;
- // Returns the TabContents object associated with the specified Tab ID only
+ // Returns the WebContents object associated with the specified Tab ID only
// if it is alive.
// Since Windows cannot send AeroPeek events directly to Chrome windows, we
// use a place-holder window to receive AeroPeek events. So, when Windows
// sends an AeroPeek event, the corresponding tab (and TabContents) may have
// been deleted by Chrome. To prevent us from accessing deleted TabContents,
// we need to check if the tab is still alive.
- TabContents* GetTabContents(int tab_id) const;
+ content::WebContents* GetWebContents(int tab_id) const;
// Returns the tab ID from the specified TabContentsWrapper.
int GetTabID(TabContentsWrapper* contents) const;
diff --git a/chrome/browser/autocomplete/autocomplete_browsertest.cc b/chrome/browser/autocomplete/autocomplete_browsertest.cc
index a52aadc..f939d12 100644
--- a/chrome/browser/autocomplete/autocomplete_browsertest.cc
+++ b/chrome/browser/autocomplete/autocomplete_browsertest.cc
@@ -24,7 +24,6 @@
#include "chrome/common/url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/autocomplete_history_manager.cc b/chrome/browser/autocomplete_history_manager.cc
index 9aaaaba..cbada33 100644
--- a/chrome/browser/autocomplete_history_manager.cc
+++ b/chrome/browser/autocomplete_history_manager.cc
@@ -16,10 +16,11 @@
#include "chrome/common/autofill_messages.h"
#include "chrome/common/pref_names.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 "webkit/forms/form_data.h"
using base::StringPiece16;
+using content::WebContents;
using webkit::forms::FormData;
using webkit::forms::FormField;
@@ -107,12 +108,12 @@ bool IsTextField(const FormField& field) {
} // namespace
AutocompleteHistoryManager::AutocompleteHistoryManager(
- TabContents* tab_contents)
- : content::WebContentsObserver(tab_contents),
+ WebContents* web_contents)
+ : content::WebContentsObserver(web_contents),
pending_query_handle_(0),
query_id_(0),
external_delegate_(NULL) {
- profile_ = Profile::FromBrowserContext(tab_contents->GetBrowserContext());
+ profile_ = Profile::FromBrowserContext(web_contents->GetBrowserContext());
// May be NULL in unit tests.
web_data_service_ = profile_->GetWebDataService(Profile::EXPLICIT_ACCESS);
autofill_enabled_.Init(prefs::kAutofillEnabled, profile_->GetPrefs(), NULL);
@@ -232,10 +233,10 @@ void AutocompleteHistoryManager::SetExternalDelegate(
}
AutocompleteHistoryManager::AutocompleteHistoryManager(
- TabContents* tab_contents,
+ WebContents* web_contents,
Profile* profile,
WebDataService* wds)
- : content::WebContentsObserver(tab_contents),
+ : content::WebContentsObserver(web_contents),
profile_(profile),
web_data_service_(wds),
pending_query_handle_(0),
diff --git a/chrome/browser/autocomplete_history_manager.h b/chrome/browser/autocomplete_history_manager.h
index c4c02d6..1dfd34b 100644
--- a/chrome/browser/autocomplete_history_manager.h
+++ b/chrome/browser/autocomplete_history_manager.h
@@ -27,7 +27,7 @@ class Profile;
class AutocompleteHistoryManager : public content::WebContentsObserver,
public WebDataServiceConsumer {
public:
- explicit AutocompleteHistoryManager(TabContents* tab_contents);
+ explicit AutocompleteHistoryManager(content::WebContents* web_contents);
virtual ~AutocompleteHistoryManager();
// content::WebContentsObserver implementation.
@@ -61,7 +61,7 @@ class AutocompleteHistoryManager : public content::WebContentsObserver,
TestTabContentsWithExternalDelegate);
// For tests.
- AutocompleteHistoryManager(TabContents* tab_contents,
+ AutocompleteHistoryManager(content::WebContents* web_contents,
Profile* profile,
WebDataService* wds);
diff --git a/chrome/browser/automation/automation_tab_helper_unittest.cc b/chrome/browser/automation/automation_tab_helper_unittest.cc
index d25abc1..b766f02 100644
--- a/chrome/browser/automation/automation_tab_helper_unittest.cc
+++ b/chrome/browser/automation/automation_tab_helper_unittest.cc
@@ -9,7 +9,6 @@
#include "chrome/browser/automation/mock_tab_event_observer.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/test_tab_contents.h"
#include "content/test/test_browser_thread.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -41,7 +40,7 @@ class AutomationTabHelperTest : public TabContentsWrapperTestHarness {
}
void TabContentsDestroyed() {
- tab_helper()->WebContentsDestroyed(contents_wrapper()->tab_contents());
+ tab_helper()->WebContentsDestroyed(contents_wrapper()->web_contents());
}
void WillPerformClientRedirect(int64 frame_id) {
diff --git a/chrome/browser/bug_report_util.cc b/chrome/browser/bug_report_util.cc
index 72284a0..4e2d382 100644
--- a/chrome/browser/bug_report_util.cc
+++ b/chrome/browser/bug_report_util.cc
@@ -22,7 +22,7 @@
#include "chrome/browser/ui/browser_list.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/common/url_fetcher.h"
#include "content/public/common/url_fetcher_delegate.h"
#include "googleurl/src/gurl.h"
@@ -37,6 +37,8 @@
#include "chrome/browser/chromeos/notifications/system_notification.h"
#endif
+using content::WebContents;
+
namespace {
const int kBugReportVersion = 1;
@@ -361,9 +363,9 @@ void BugReportUtil::SendReport(
#if defined(ENABLE_SAFE_BROWSING)
// static
-void BugReportUtil::ReportPhishing(TabContents* currentTab,
+void BugReportUtil::ReportPhishing(WebContents* current_tab,
const std::string& phishing_url) {
- currentTab->GetController().LoadURL(
+ current_tab->GetController().LoadURL(
safe_browsing_util::GeneratePhishingReportUrl(
kReportPhishingUrl, phishing_url,
false /* not client-side detection */),
diff --git a/chrome/browser/bug_report_util.h b/chrome/browser/bug_report_util.h
index 52376d2..e2285b7 100644
--- a/chrome/browser/bug_report_util.h
+++ b/chrome/browser/bug_report_util.h
@@ -25,7 +25,10 @@
#endif
class Profile;
-class TabContents;
+
+namespace content {
+class WebContents;
+}
class BugReportUtil {
public:
@@ -77,7 +80,7 @@ class BugReportUtil {
#endif
);
// Redirects the user to Google's phishing reporting page.
- static void ReportPhishing(TabContents* currentTab,
+ static void ReportPhishing(content::WebContents* current_tab,
const std::string& phishing_url);
// Maintains a single vector of bytes to store the last screenshot taken.
static std::vector<unsigned char>* GetScreenshotPng();
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 8ece4e7..301377c 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -135,6 +135,7 @@
using content::AccessTokenStore;
using content::BrowserThread;
+using content::WebContents;
namespace {
@@ -883,7 +884,7 @@ void ChromeContentBrowserClient::AllowCertificateError(
bool overridable,
const base::Callback<void(SSLCertErrorHandler*, bool)>& callback) {
// If the tab is being prerendered, cancel the prerender and the request.
- TabContents* tab = tab_util::GetTabContentsByID(
+ WebContents* tab = tab_util::GetWebContentsByID(
handler->render_process_host_id(),
handler->tab_contents_id());
if (!tab) {
@@ -913,7 +914,7 @@ void ChromeContentBrowserClient::SelectClientCertificate(
int render_process_id,
int render_view_id,
SSLClientAuthHandler* handler) {
- TabContents* tab = tab_util::GetTabContentsByID(
+ WebContents* tab = tab_util::GetWebContentsByID(
render_process_id, render_view_id);
if (!tab) {
NOTREACHED();
@@ -957,7 +958,7 @@ void ChromeContentBrowserClient::SelectClientCertificate(
TabContentsWrapper* wrapper =
TabContentsWrapper::GetCurrentWrapperForContents(tab);
if (!wrapper) {
- // If there is no TabContentsWrapper for the given TabContents then we can't
+ // If there is no TabContentsWrapper for the given WebContents then we can't
// show the user a dialog to select a client certificate. So we simply
// proceed with no client certificate.
handler->CertificateSelected(NULL);
@@ -993,7 +994,7 @@ void ChromeContentBrowserClient::RequestDesktopNotificationPermission(
DesktopNotificationServiceFactory::GetForProfile(profile);
service->RequestPermission(
source_origin, render_process_id, render_view_id, callback_context,
- tab_util::GetTabContentsByID(render_process_id, render_view_id));
+ tab_util::GetWebContentsByID(render_process_id, render_view_id));
}
WebKit::WebNotificationPresenter::Permission
diff --git a/chrome/browser/chrome_plugin_message_filter.cc b/chrome/browser/chrome_plugin_message_filter.cc
index 7d18173..dadb400 100644
--- a/chrome/browser/chrome_plugin_message_filter.cc
+++ b/chrome/browser/chrome_plugin_message_filter.cc
@@ -14,7 +14,6 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_plugin_messages.h"
#include "content/browser/plugin_process_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/public/browser/browser_thread.h"
@@ -140,11 +139,11 @@ void ChromePluginMessageFilter::HandleMissingPluginStatus(
#if defined(OS_WIN)
RenderViewHost* host = RenderViewHost::FromID(render_process_id,
render_view_id);
- if (!host || !host->delegate() || !host->delegate()->GetAsTabContents())
+ if (!host || !host->delegate() || !host->delegate()->GetAsWebContents())
return;
TabContentsWrapper* tcw = TabContentsWrapper::GetCurrentWrapperForContents(
- host->delegate()->GetAsTabContents());
+ host->delegate()->GetAsWebContents());
DCHECK(tcw);
InfoBarTabHelper* infobar_helper = tcw->infobar_tab_helper();
diff --git a/chrome/browser/chrome_quota_permission_context.cc b/chrome/browser/chrome_quota_permission_context.cc
index 0d7e818..5da3f8d 100644
--- a/chrome/browser/chrome_quota_permission_context.cc
+++ b/chrome/browser/chrome_quota_permission_context.cc
@@ -15,7 +15,6 @@
#include "chrome/browser/tab_contents/tab_util.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/pref_names.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/navigation_details.h"
#include "googleurl/src/gurl.h"
@@ -26,6 +25,7 @@
#include "webkit/quota/quota_types.h"
using content::BrowserThread;
+using content::WebContents;
namespace {
@@ -133,9 +133,9 @@ void ChromeQuotaPermissionContext::RequestQuotaPermission(
return;
}
- TabContents* tab_contents =
- tab_util::GetTabContentsByID(render_process_id, render_view_id);
- if (!tab_contents) {
+ WebContents* web_contents =
+ tab_util::GetWebContentsByID(render_process_id, render_view_id);
+ if (!web_contents) {
// The tab may have gone away or the request may not be from a tab.
LOG(WARNING) << "Attempt to request quota tabless renderer: "
<< render_process_id << "," << render_view_id;
@@ -144,7 +144,7 @@ void ChromeQuotaPermissionContext::RequestQuotaPermission(
}
TabContentsWrapper* wrapper =
- TabContentsWrapper::GetCurrentWrapperForContents(tab_contents);
+ TabContentsWrapper::GetCurrentWrapperForContents(web_contents);
InfoBarTabHelper* infobar_helper = wrapper->infobar_tab_helper();
infobar_helper->AddInfoBar(new RequestQuotaInfoBarDelegate(
infobar_helper, this, origin_url, requested_quota,
diff --git a/chrome/browser/chromeos/media/media_player_browsertest.cc b/chrome/browser/chromeos/media/media_player_browsertest.cc
index 664b999..32691c7c 100644
--- a/chrome/browser/chromeos/media/media_player_browsertest.cc
+++ b/chrome/browser/chromeos/media/media_player_browsertest.cc
@@ -13,7 +13,6 @@
#include "chrome/test/automation/dom_element_proxy.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/tab_contents/tab_contents.h"
class MediaPlayerBrowserTest : public InProcessBrowserTest {
public:
diff --git a/chrome/browser/content_settings/content_settings_browsertest.cc b/chrome/browser/content_settings/content_settings_browsertest.cc
index a548bec..ff1e3a3a 100644
--- a/chrome/browser/content_settings/content_settings_browsertest.cc
+++ b/chrome/browser/content_settings/content_settings_browsertest.cc
@@ -12,7 +12,7 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/web_contents.h"
#include "net/test/test_server.h"
// Regression test for http://crbug.com/63649.
@@ -28,7 +28,7 @@ IN_PROC_BROWSER_TEST_F(InProcessBrowserTest, RedirectLoopCookies) {
TabContentsWrapper* tab_contents = browser()->GetSelectedTabContentsWrapper();
ASSERT_EQ(UTF8ToUTF16(test_url.spec() + " failed to load"),
- tab_contents->tab_contents()->GetTitle());
+ tab_contents->web_contents()->GetTitle());
EXPECT_TRUE(tab_contents->content_settings()->IsContentBlocked(
CONTENT_SETTINGS_TYPE_COOKIES));
@@ -43,7 +43,7 @@ IN_PROC_BROWSER_TEST_F(InProcessBrowserTest, ContentSettingsBlockDataURLs) {
ui_test_utils::NavigateToURL(browser(), url);
TabContentsWrapper* tab_contents = browser()->GetSelectedTabContentsWrapper();
- ASSERT_EQ(UTF8ToUTF16("Data URL"), tab_contents->tab_contents()->GetTitle());
+ ASSERT_EQ(UTF8ToUTF16("Data URL"), tab_contents->web_contents()->GetTitle());
EXPECT_TRUE(tab_contents->content_settings()->IsContentBlocked(
CONTENT_SETTINGS_TYPE_JAVASCRIPT));
diff --git a/chrome/browser/crash_recovery_browsertest.cc b/chrome/browser/crash_recovery_browsertest.cc
index bcd4a342..025ae9c 100644
--- a/chrome/browser/crash_recovery_browsertest.cc
+++ b/chrome/browser/crash_recovery_browsertest.cc
@@ -8,9 +8,9 @@
#include "chrome/common/url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/common/page_transition_types.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc b/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc
index 6208cdf..74dfe8d 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc
+++ b/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc
@@ -12,8 +12,8 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/navigation_entry.h"
+#include "content/public/browser/web_contents.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
using content::WebContents;
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc
index 267ae05..b0828e1 100644
--- a/chrome/browser/download/download_browsertest.cc
+++ b/chrome/browser/download/download_browsertest.cc
@@ -45,9 +45,9 @@
#include "content/browser/net/url_request_mock_http_job.h"
#include "content/browser/net/url_request_slow_download_job.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/download_item.h"
#include "content/public/browser/download_manager.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/common/page_transition_types.h"
#include "net/base/net_util.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/download/save_page_browsertest.cc b/chrome/browser/download/save_page_browsertest.cc
index 0006b16..3149d0a 100644
--- a/chrome/browser/download/save_page_browsertest.cc
+++ b/chrome/browser/download/save_page_browsertest.cc
@@ -24,11 +24,11 @@
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/download/download_persistent_store_info.h"
#include "content/browser/net/url_request_mock_http_job.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/download_item.h"
#include "content/public/browser/download_manager.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/web_contents.h"
#include "testing/gtest/include/gtest/gtest.h"
using content::BrowserThread;
diff --git a/chrome/browser/errorpage_browsertest.cc b/chrome/browser/errorpage_browsertest.cc
index 431762f..4ecc62f 100644
--- a/chrome/browser/errorpage_browsertest.cc
+++ b/chrome/browser/errorpage_browsertest.cc
@@ -11,7 +11,7 @@
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/net/url_request_failed_dns_job.h"
#include "content/browser/net/url_request_mock_http_job.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/web_contents.h"
#include "content/test/test_navigation_observer.h"
using content::BrowserThread;
@@ -83,7 +83,7 @@ class ErrorPageTest : public InProcessBrowserTest {
TestNavigationObserver test_navigation_observer(
content::Source<NavigationController>(
- &browser()->GetSelectedTabContentsWrapper()->tab_contents()->
+ &browser()->GetSelectedTabContentsWrapper()->web_contents()->
GetController()),
NULL,
num_navigations);
diff --git a/chrome/browser/extensions/browser_action_apitest.cc b/chrome/browser/extensions/browser_action_apitest.cc
index 7a97005..b7d2430 100644
--- a/chrome/browser/extensions/browser_action_apitest.cc
+++ b/chrome/browser/extensions/browser_action_apitest.cc
@@ -20,8 +20,8 @@
#include "chrome/common/extensions/extension_action.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/web_contents.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
diff --git a/chrome/browser/extensions/extension_context_menu_apitest.cc b/chrome/browser/extensions/extension_context_menu_apitest.cc
index 90cdc3bb..d06123d 100644
--- a/chrome/browser/extensions/extension_context_menu_apitest.cc
+++ b/chrome/browser/extensions/extension_context_menu_apitest.cc
@@ -9,7 +9,6 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/common/extensions/extension_action.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/tab_contents/tab_contents.h"
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContextMenus) {
ASSERT_TRUE(RunExtensionTest("context_menus/basics")) << message_;
diff --git a/chrome/browser/extensions/extension_context_menu_browsertest.cc b/chrome/browser/extensions/extension_context_menu_browsertest.cc
index ee23f02..251aaa9 100644
--- a/chrome/browser/extensions/extension_context_menu_browsertest.cc
+++ b/chrome/browser/extensions/extension_context_menu_browsertest.cc
@@ -12,7 +12,6 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "net/base/mock_host_resolver.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
#include "ui/base/models/menu_model.h"
diff --git a/chrome/browser/extensions/extension_override_apitest.cc b/chrome/browser/extensions/extension_override_apitest.cc
index 00b6b0c..93bb3a2 100644
--- a/chrome/browser/extensions/extension_override_apitest.cc
+++ b/chrome/browser/extensions/extension_override_apitest.cc
@@ -12,7 +12,6 @@
#include "chrome/browser/ui/browser_list.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
diff --git a/chrome/browser/extensions/extension_webnavigation_apitest.cc b/chrome/browser/extensions/extension_webnavigation_apitest.cc
index 03ee03a..6c39af6 100644
--- a/chrome/browser/extensions/extension_webnavigation_apitest.cc
+++ b/chrome/browser/extensions/extension_webnavigation_apitest.cc
@@ -13,7 +13,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/ui_test_utils.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 "net/base/mock_host_resolver.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc
index 9bae4f2..b7d0311 100644
--- a/chrome/browser/external_tab_container_win.cc
+++ b/chrome/browser/external_tab_container_win.cc
@@ -136,12 +136,8 @@ ExternalTabContainer::~ExternalTabContainer() {
Uninitialize();
}
-TabContents* ExternalTabContainer::tab_contents() const {
- return tab_contents_.get() ? tab_contents_->tab_contents() : NULL;
-}
-
WebContents * ExternalTabContainer::web_contents() const {
- return tab_contents();
+ return tab_contents_.get() ? tab_contents_->web_contents() : NULL;
}
bool ExternalTabContainer::Init(Profile* profile,
@@ -623,7 +619,7 @@ bool ExternalTabContainer::HandleContextMenu(const ContextMenuParams& params) {
return false;
}
external_context_menu_.reset(
- new RenderViewContextMenuViews(tab_contents(), params));
+ new RenderViewContextMenuViews(web_contents(), params));
external_context_menu_->SetExternal();
external_context_menu_->Init();
external_context_menu_->UpdateMenuItemStates();
@@ -1143,7 +1139,7 @@ void ExternalTabContainer::ServicePendingOpenURLRequests() {
for (size_t index = 0; index < pending_open_url_requests_.size();
++index) {
const OpenURLParams& url_request = pending_open_url_requests_[index];
- OpenURLFromTab(tab_contents(), url_request);
+ OpenURLFromTab(web_contents(), url_request);
}
pending_open_url_requests_.clear();
}
diff --git a/chrome/browser/external_tab_container_win.h b/chrome/browser/external_tab_container_win.h
index 07729dc..5b6eb8b 100644
--- a/chrome/browser/external_tab_container_win.h
+++ b/chrome/browser/external_tab_container_win.h
@@ -61,7 +61,6 @@ class ExternalTabContainer : public content::WebContentsDelegate,
ExternalTabContainer(AutomationProvider* automation,
AutomationResourceMessageFilter* filter);
- TabContents* tab_contents() const;
content::WebContents* web_contents() const;
TabContentsWrapper* tab_contents_wrapper() { return tab_contents_.get(); }
diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc
index aaa2357..629a419 100644
--- a/chrome/browser/memory_details.cc
+++ b/chrome/browser/memory_details.cc
@@ -19,10 +19,11 @@
#include "content/browser/browser_child_process_host.h"
#include "content/browser/renderer_host/backing_store_manager.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/navigation_entry.h"
#include "content/public/browser/render_process_host.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/common/bindings_policy.h"
#include "content/public/common/process_type.h"
#include "grit/chromium_strings.h"
@@ -36,6 +37,7 @@
using content::BrowserThread;
using content::NavigationEntry;
+using content::WebContents;
// static
std::string ProcessMemoryInformation::GetRendererTypeNameInEnglish(
@@ -230,7 +232,7 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
}
}
}
- TabContents* contents = host_delegate->GetAsTabContents();
+ WebContents* contents = host_delegate->GetAsWebContents();
if (!contents) {
if (extension_process_map->Contains(host->process()->GetID())) {
const Extension* extension =
@@ -264,7 +266,7 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
continue;
}
- // Since We have a TabContents and and the renderer type hasn't been
+ // Since We have a WebContents and and the renderer type hasn't been
// set yet, it must be a normal tabbed renderer.
if (process.renderer_type == ProcessMemoryInformation::RENDERER_UNKNOWN)
process.renderer_type = ProcessMemoryInformation::RENDERER_NORMAL;
diff --git a/chrome/browser/omnibox_search_hint.cc b/chrome/browser/omnibox_search_hint.cc
index 5cf0591..cfaf6ef 100644
--- a/chrome/browser/omnibox_search_hint.cc
+++ b/chrome/browser/omnibox_search_hint.cc
@@ -27,12 +27,12 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.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_details.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/theme_resources_standard.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/password_manager_delegate_impl.cc b/chrome/browser/password_manager_delegate_impl.cc
index 76dfacb..6d3e270 100644
--- a/chrome/browser/password_manager_delegate_impl.cc
+++ b/chrome/browser/password_manager_delegate_impl.cc
@@ -13,7 +13,8 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/autofill_messages.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/browser/ssl/ssl_manager.h"
+#include "content/public/browser/web_contents.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources_standard.h"
@@ -111,9 +112,9 @@ bool SavePasswordInfoBarDelegate::Cancel() {
void PasswordManagerDelegateImpl::FillPasswordForm(
const webkit::forms::PasswordFormFillData& form_data) {
- tab_contents_->tab_contents()->GetRenderViewHost()->Send(
+ tab_contents_->web_contents()->GetRenderViewHost()->Send(
new AutofillMsg_FillPasswordForm(
- tab_contents_->tab_contents()->GetRenderViewHost()->routing_id(),
+ tab_contents_->web_contents()->GetRenderViewHost()->routing_id(),
form_data));
}
@@ -129,6 +130,6 @@ Profile* PasswordManagerDelegateImpl::GetProfileForPasswordManager() {
}
bool PasswordManagerDelegateImpl::DidLastPageLoadEncounterSSLErrors() {
- return tab_contents_->tab_contents()->GetController().GetSSLManager()->
+ return tab_contents_->web_contents()->GetController().GetSSLManager()->
ProcessedSSLErrorFromRequest();
}
diff --git a/chrome/browser/plugin_installer_infobar_delegate.cc b/chrome/browser/plugin_installer_infobar_delegate.cc
index e0de3a1..6917b2e 100644
--- a/chrome/browser/plugin_installer_infobar_delegate.cc
+++ b/chrome/browser/plugin_installer_infobar_delegate.cc
@@ -7,7 +7,7 @@
#include "chrome/browser/google/google_util.h"
#include "chrome/browser/infobars/infobar_tab_helper.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 "grit/locale_settings.h"
#include "grit/theme_resources_standard.h"
diff --git a/chrome/browser/plugin_observer.cc b/chrome/browser/plugin_observer.cc
index 0f3517f..365e054 100644
--- a/chrome/browser/plugin_observer.cc
+++ b/chrome/browser/plugin_observer.cc
@@ -23,8 +23,8 @@
#include "chrome/common/render_messages.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/user_metrics.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources_standard.h"
@@ -391,7 +391,7 @@ class PluginObserver::MissingPluginHost : public PluginInstallerObserver {
};
PluginObserver::PluginObserver(TabContentsWrapper* tab_contents)
- : content::WebContentsObserver(tab_contents->tab_contents()),
+ : content::WebContentsObserver(tab_contents->web_contents()),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)),
tab_contents_(tab_contents) {
}
diff --git a/chrome/browser/prerender/prerender_browsertest.cc b/chrome/browser/prerender/prerender_browsertest.cc
index 16913f8..6b330dd 100644
--- a/chrome/browser/prerender/prerender_browsertest.cc
+++ b/chrome/browser/prerender/prerender_browsertest.cc
@@ -33,11 +33,11 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
#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/public/browser/notification_service.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/common/url_constants.h"
#include "grit/generated_resources.h"
#include "net/base/mock_host_resolver.h"
@@ -557,7 +557,7 @@ class PrerenderBrowserTest : public InProcessBrowserTest {
void NavigateToDestUrlAndWaitForPassTitle() {
string16 expected_title = ASCIIToUTF16("PASS");
ui_test_utils::TitleWatcher title_watcher(
- GetPrerenderContents()->prerender_contents()->tab_contents(),
+ GetPrerenderContents()->prerender_contents()->web_contents(),
expected_title);
NavigateToDestURL();
EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle());
@@ -761,14 +761,14 @@ class PrerenderBrowserTest : public InProcessBrowserTest {
// In the case of zero loads, need to wait for the page load to complete
// before running any Javascript.
scoped_ptr<ui_test_utils::WindowedNotificationObserver> page_load_observer;
- TabContents* tab_contents =
- GetPrerenderContents()->prerender_contents()->tab_contents();
+ WebContents* web_contents =
+ GetPrerenderContents()->prerender_contents()->web_contents();
if (GetPrerenderContents()->number_of_loads() == 0) {
page_load_observer.reset(
new ui_test_utils::WindowedNotificationObserver(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &tab_contents->GetController())));
+ &web_contents->GetController())));
}
// ui_test_utils::NavigateToURL waits until DidStopLoading is called on
@@ -792,7 +792,7 @@ class PrerenderBrowserTest : public InProcessBrowserTest {
bool display_test_result = false;
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
- tab_contents->GetRenderViewHost(), L"",
+ web_contents->GetRenderViewHost(), L"",
L"window.domAutomationController.send(DidDisplayPass())",
&display_test_result));
EXPECT_TRUE(display_test_result);
@@ -1356,7 +1356,7 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderRendererCrash) {
// Navigate to about:crash and then wait for the renderer to crash.
ASSERT_TRUE(GetPrerenderContents());
ASSERT_TRUE(GetPrerenderContents()->prerender_contents());
- GetPrerenderContents()->prerender_contents()->tab_contents()->GetController().
+ GetPrerenderContents()->prerender_contents()->web_contents()->GetController().
LoadURL(
GURL(chrome::kAboutCrashURL),
content::Referrer(),
@@ -1750,7 +1750,7 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderFavicon) {
ui_test_utils::WindowedNotificationObserver favicon_update_watcher(
chrome::NOTIFICATION_FAVICON_UPDATED,
content::Source<WebContents>(prerender_contents->prerender_contents()->
- tab_contents()));
+ web_contents()));
NavigateToDestURL();
favicon_update_watcher.Wait();
}
diff --git a/chrome/browser/printing/print_preview_tab_controller_browsertest.cc b/chrome/browser/printing/print_preview_tab_controller_browsertest.cc
index 7ded4fa..fd5d63e 100644
--- a/chrome/browser/printing/print_preview_tab_controller_browsertest.cc
+++ b/chrome/browser/printing/print_preview_tab_controller_browsertest.cc
@@ -12,7 +12,6 @@
#include "chrome/common/url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/web_contents_observer.h"
@@ -34,7 +33,7 @@ class PrintPreviewTabControllerBrowserTest : public InProcessBrowserTest {
class TabDestroyedObserver : public content::WebContentsObserver {
public:
- explicit TabDestroyedObserver(TabContents* contents)
+ explicit TabDestroyedObserver(WebContents* contents)
: content::WebContentsObserver(contents),
tab_destroyed_(false) {
}
@@ -80,7 +79,7 @@ IN_PROC_BROWSER_TEST_F(PrintPreviewTabControllerBrowserTest,
EXPECT_EQ(1, browser()->tab_count());
ASSERT_TRUE(preview_tab);
ASSERT_NE(initiator_tab, preview_tab);
- TabDestroyedObserver observer(preview_tab->tab_contents());
+ TabDestroyedObserver observer(preview_tab->web_contents());
// Navigate in the initiator tab.
GURL url(chrome::kChromeUINewTabURL);
@@ -128,7 +127,7 @@ IN_PROC_BROWSER_TEST_F(PrintPreviewTabControllerBrowserTest,
EXPECT_EQ(1, browser()->tab_count());
ASSERT_TRUE(preview_tab);
ASSERT_NE(initiator_tab, preview_tab);
- TabDestroyedObserver tab_destroyed_observer(preview_tab->tab_contents());
+ TabDestroyedObserver tab_destroyed_observer(preview_tab->web_contents());
// Reload the initiator tab.
ui_test_utils::WindowedNotificationObserver notification_observer(
diff --git a/chrome/browser/printing/print_preview_tab_controller_unittest.cc b/chrome/browser/printing/print_preview_tab_controller_unittest.cc
index 037ed35..816d279 100644
--- a/chrome/browser/printing/print_preview_tab_controller_unittest.cc
+++ b/chrome/browser/printing/print_preview_tab_controller_unittest.cc
@@ -10,7 +10,6 @@
#include "chrome/browser/ui/webui/print_preview_ui.h"
#include "chrome/test/base/browser_with_test_window_test.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
diff --git a/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc b/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc
index d5b4dc7..1346236 100644
--- a/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc
+++ b/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc
@@ -20,7 +20,6 @@
#include "chrome/common/safe_browsing/csd.pb.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/test_tab_contents.h"
#include "content/public/common/page_transition_types.h"
#include "content/public/common/referrer.h"
diff --git a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
index 6d4ca56..61a204b 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
@@ -26,8 +26,8 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/renderer_host/resource_dispatcher_host.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 "content/test/test_browser_thread.h"
#include "crypto/sha2.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/chrome/browser/spellchecker/spellcheck_host_browsertest.cc b/chrome/browser/spellchecker/spellcheck_host_browsertest.cc
index ccfa10a..1d61f30 100644
--- a/chrome/browser/spellchecker/spellcheck_host_browsertest.cc
+++ b/chrome/browser/spellchecker/spellcheck_host_browsertest.cc
@@ -11,7 +11,6 @@
#include "chrome/common/spellcheck_common.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "googleurl/src/gurl.h"
namespace {
diff --git a/chrome/browser/tab_contents/render_view_context_menu_browsertest.cc b/chrome/browser/tab_contents/render_view_context_menu_browsertest.cc
index da4c92f..6dae82f 100644
--- a/chrome/browser/tab_contents/render_view_context_menu_browsertest.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu_browsertest.cc
@@ -12,8 +12,8 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/navigation_entry.h"
+#include "content/public/browser/web_contents.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
using content::WebContents;
diff --git a/chrome/browser/tabs/tab_strip_model_unittest.cc b/chrome/browser/tabs/tab_strip_model_unittest.cc
index 413f88b..232da14 100644
--- a/chrome/browser/tabs/tab_strip_model_unittest.cc
+++ b/chrome/browser/tabs/tab_strip_model_unittest.cc
@@ -36,6 +36,7 @@
#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 "content/test/notification_observer_mock.h"
#include "content/test/test_browser_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -57,7 +58,7 @@ class DeleteTabContentsOnDestroyedObserver
tab_to_delete_(tab_to_delete) {
registrar_.Add(this,
content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
- content::Source<WebContents>(source->tab_contents()));
+ content::Source<WebContents>(source->web_contents()));
}
virtual void Observe(int type,
@@ -159,12 +160,12 @@ class TabStripModelTest : public ChromeRenderViewHostTestHarness {
}
TabContentsWrapper* CreateTabContentsWithSharedRPH(
- TabContents* tab_contents) {
+ WebContents* web_contents) {
TabContentsWrapper* retval = Browser::TabContentsFactory(profile(),
- tab_contents->GetRenderViewHost()->site_instance(), MSG_ROUTING_NONE,
+ web_contents->GetRenderViewHost()->site_instance(), MSG_ROUTING_NONE,
NULL, NULL);
- EXPECT_EQ(retval->tab_contents()->GetRenderProcessHost(),
- tab_contents->GetRenderProcessHost());
+ EXPECT_EQ(retval->web_contents()->GetRenderProcessHost(),
+ web_contents->GetRenderProcessHost());
return retval;
}
@@ -188,12 +189,12 @@ class TabStripModelTest : public ChromeRenderViewHostTestHarness {
}
// Sets the id of the specified contents.
- void SetID(TabContents* contents, int id) {
+ void SetID(WebContents* contents, int id) {
GetIDAccessor()->SetProperty(contents->GetPropertyBag(), id);
}
// Returns the id of the specified contents.
- int GetID(TabContents* contents) {
+ int GetID(WebContents* contents) {
return *GetIDAccessor()->GetProperty(contents->GetPropertyBag());
}
@@ -208,7 +209,7 @@ class TabStripModelTest : public ChromeRenderViewHostTestHarness {
actual += " ";
actual +=
- base::IntToString(GetID(model.GetTabContentsAt(i)->tab_contents()));
+ base::IntToString(GetID(model.GetTabContentsAt(i)->web_contents()));
if (model.IsAppTab(i))
actual += "a";
@@ -239,7 +240,7 @@ class TabStripModelTest : public ChromeRenderViewHostTestHarness {
const std::string& selected_tabs) {
for (int i = 0; i < tab_count; ++i) {
TabContentsWrapper* contents = CreateTabContents();
- SetID(contents->tab_contents(), i);
+ SetID(contents->web_contents(), i);
model->AppendTabContents(contents, true);
}
for (int i = 0; i < pinned_count; ++i)
@@ -586,9 +587,9 @@ TEST_F(TabStripModelTest, TestBasicAPI) {
EXPECT_EQ(0, tabstrip.GetIndexOfTabContents(contents2));
EXPECT_EQ(1, tabstrip.GetIndexOfTabContents(contents1));
EXPECT_EQ(0, tabstrip.GetIndexOfController(
- &contents2->tab_contents()->GetController()));
+ &contents2->web_contents()->GetController()));
EXPECT_EQ(1, tabstrip.GetIndexOfController(
- &contents1->tab_contents()->GetController()));
+ &contents1->web_contents()->GetController()));
}
// Test UpdateTabContentsStateAt
@@ -642,7 +643,7 @@ TEST_F(TabStripModelTest, TestBasicOpenerAPI) {
TabContentsWrapper* opener_contents = CreateTabContents();
NavigationController* opener =
- &opener_contents->tab_contents()->GetController();
+ &opener_contents->web_contents()->GetController();
tabstrip.AppendTabContents(opener_contents, true);
TabContentsWrapper* contents1 = CreateTabContents();
TabContentsWrapper* contents2 = CreateTabContents();
@@ -680,7 +681,7 @@ TEST_F(TabStripModelTest, TestBasicOpenerAPI) {
// For a tab that has opened no other tabs, the return value should always be
// -1...
- NavigationController* o1 = &contents1->tab_contents()->GetController();
+ NavigationController* o1 = &contents1->web_contents()->GetController();
EXPECT_EQ(-1, tabstrip.GetIndexOfNextTabContentsOpenedBy(o1, 3, false));
EXPECT_EQ(-1, tabstrip.GetIndexOfLastTabContentsOpenedBy(o1, 3));
@@ -794,7 +795,7 @@ TEST_F(TabStripModelTest, TestInsertionIndexDetermination) {
TabContentsWrapper* opener_contents = CreateTabContents();
NavigationController* opener =
- &opener_contents->tab_contents()->GetController();
+ &opener_contents->web_contents()->GetController();
tabstrip.AppendTabContents(opener_contents, true);
// Open some other random unrelated tab in the background to monkey with our
@@ -1737,10 +1738,10 @@ TEST_F(TabStripModelTest, FastShutdown) {
{
TabContentsWrapper* contents1 = CreateTabContents();
TabContentsWrapper* contents2 =
- CreateTabContentsWithSharedRPH(contents1->tab_contents());
+ CreateTabContentsWithSharedRPH(contents1->web_contents());
- SetID(contents1->tab_contents(), 1);
- SetID(contents2->tab_contents(), 2);
+ SetID(contents1->web_contents(), 1);
+ SetID(contents2->web_contents(), 2);
tabstrip.AppendTabContents(contents1, true);
tabstrip.AppendTabContents(contents2, true);
@@ -1752,7 +1753,7 @@ TEST_F(TabStripModelTest, FastShutdown) {
tabstrip.CloseAllTabs();
// On a mock RPH this checks whether we *attempted* fast shutdown.
// A real RPH would reject our attempt since there is an unload handler.
- EXPECT_TRUE(contents1->tab_contents()->
+ EXPECT_TRUE(contents1->web_contents()->
GetRenderProcessHost()->FastShutdownStarted());
EXPECT_EQ(2, tabstrip.count());
@@ -1766,16 +1767,16 @@ TEST_F(TabStripModelTest, FastShutdown) {
{
TabContentsWrapper* contents1 = CreateTabContents();
TabContentsWrapper* contents2 =
- CreateTabContentsWithSharedRPH(contents1->tab_contents());
+ CreateTabContentsWithSharedRPH(contents1->web_contents());
- SetID(contents1->tab_contents(), 1);
- SetID(contents2->tab_contents(), 2);
+ SetID(contents1->web_contents(), 1);
+ SetID(contents2->web_contents(), 2);
tabstrip.AppendTabContents(contents1, true);
tabstrip.AppendTabContents(contents2, true);
tabstrip.CloseTabContentsAt(1, TabStripModel::CLOSE_NONE);
- EXPECT_FALSE(contents1->tab_contents()->
+ EXPECT_FALSE(contents1->web_contents()->
GetRenderProcessHost()->FastShutdownStarted());
EXPECT_EQ(1, tabstrip.count());
@@ -1809,9 +1810,9 @@ TEST_F(TabStripModelTest, Apps) {
contents2->extension_tab_helper()->SetExtensionApp(extension_app);
TabContentsWrapper* contents3 = CreateTabContents();
- SetID(contents1->tab_contents(), 1);
- SetID(contents2->tab_contents(), 2);
- SetID(contents3->tab_contents(), 3);
+ SetID(contents1->web_contents(), 1);
+ SetID(contents2->web_contents(), 2);
+ SetID(contents3->web_contents(), 3);
// Note! The ordering of these tests is important, each subsequent test
// builds on the state established in the previous. This is important if you
@@ -1925,9 +1926,9 @@ TEST_F(TabStripModelTest, Pinning) {
TabContentsWrapper* contents2 = CreateTabContents();
TabContentsWrapper* contents3 = CreateTabContents();
- SetID(contents1->tab_contents(), 1);
- SetID(contents2->tab_contents(), 2);
- SetID(contents3->tab_contents(), 3);
+ SetID(contents1->web_contents(), 1);
+ SetID(contents2->web_contents(), 2);
+ SetID(contents3->web_contents(), 3);
// Note! The ordering of these tests is important, each subsequent test
// builds on the state established in the previous. This is important if you
@@ -2057,7 +2058,7 @@ TEST_F(TabStripModelTest, Pinning) {
}
TabContentsWrapper* contents4 = CreateTabContents();
- SetID(contents4->tab_contents(), 4);
+ SetID(contents4->web_contents(), 4);
// Insert "4" between "1" and "3". As "1" and "4" are pinned, "4" should end
// up after them.
diff --git a/chrome/browser/ui/auto_login_prompter.cc b/chrome/browser/ui/auto_login_prompter.cc
index ecd8acc..ebfed4c 100644
--- a/chrome/browser/ui/auto_login_prompter.cc
+++ b/chrome/browser/ui/auto_login_prompter.cc
@@ -20,13 +20,13 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.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_observer.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 "net/url_request/url_request.h"
using content::BrowserThread;
@@ -101,13 +101,13 @@ void AutoLoginPrompter::ShowInfoBarUIThread(const std::string& account,
int route_id) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- TabContents* tab_contents = tab_util::GetTabContentsByID(child_id, route_id);
- if (!tab_contents)
+ WebContents* web_contents = tab_util::GetWebContentsByID(child_id, route_id);
+ if (!web_contents)
return;
// If auto-login is turned off, then simply return.
Profile* profile =
- Profile::FromBrowserContext(tab_contents->GetBrowserContext());
+ Profile::FromBrowserContext(web_contents->GetBrowserContext());
if (!profile->GetPrefs()->GetBoolean(prefs::kAutologinEnabled))
return;
@@ -134,7 +134,7 @@ void AutoLoginPrompter::ShowInfoBarUIThread(const std::string& account,
// finish loading. If we don't, the info bar appears and then disappears
// immediately. Create an AutoLoginPrompter instance to listen for the
// relevant notifications; it will delete itself.
- new AutoLoginPrompter(tab_contents, username, args);
+ new AutoLoginPrompter(web_contents, username, args);
}
void AutoLoginPrompter::Observe(int type,
diff --git a/chrome/browser/ui/browser_close_browsertest.cc b/chrome/browser/ui/browser_close_browsertest.cc
index ad9f4a6..3e569dd 100644
--- a/chrome/browser/ui/browser_close_browsertest.cc
+++ b/chrome/browser/ui/browser_close_browsertest.cc
@@ -23,7 +23,6 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/net/url_request_slow_download_job.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/download_item.h"
#include "content/public/common/page_transition_types.h"
diff --git a/chrome/browser/ui/browser_list_unittest.cc b/chrome/browser/ui/browser_list_unittest.cc
index 6ae4b08..b3ea909 100644
--- a/chrome/browser/ui/browser_list_unittest.cc
+++ b/chrome/browser/ui/browser_list_unittest.cc
@@ -15,7 +15,7 @@
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_pref_service.h"
#include "chrome/test/base/testing_profile_manager.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/web_contents.h"
typedef BrowserWithTestWindowTest BrowserListTest;
@@ -32,7 +32,7 @@ size_t CountAllTabs() {
// Helper function to navigate to the print preview page.
void NavigateToPrintUrl(TabContentsWrapper* tab, int page_id) {
static_cast<TestRenderViewHost*>(
- tab->tab_contents()->GetRenderViewHost())->SendNavigate(
+ tab->web_contents()->GetRenderViewHost())->SendNavigate(
page_id, GURL(chrome::kChromeUIPrintURL));
}
diff --git a/chrome/browser/ui/browser_navigator_browsertest.cc b/chrome/browser/ui/browser_navigator_browsertest.cc
index b3c6988..238d1a6 100644
--- a/chrome/browser/ui/browser_navigator_browsertest.cc
+++ b/chrome/browser/ui/browser_navigator_browsertest.cc
@@ -21,10 +21,10 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/web_contents.h"
using content::WebContents;
@@ -664,7 +664,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, DISABLED_TargetContents_Popup) {
// All platforms should respect size however provided width > 400 (Mac has a
// minimum window width of 400).
EXPECT_EQ(p.window_bounds.size(),
- p.target_contents->tab_contents()->GetView()->GetContainerSize());
+ p.target_contents->web_contents()->GetView()->GetContainerSize());
// We should have two windows, the new popup and the browser() provided by the
// framework.
@@ -1015,7 +1015,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
GURL singleton_url(GetSettingsAdvancedURL());
TabContentsWrapper* wrapper = browser()->AddSelectedTabWithURL(
singleton_url, content::PAGE_TRANSITION_LINK);
- TabContents* tab_contents = wrapper->tab_contents();
+ WebContents* web_contents = wrapper->web_contents();
// We should have one browser with 2 tabs, the 2nd selected.
EXPECT_EQ(1u, BrowserList::size());
@@ -1023,8 +1023,8 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
EXPECT_EQ(1, browser()->active_index());
// Kill the singleton tab.
- tab_contents->SetIsCrashed(base::TERMINATION_STATUS_PROCESS_CRASHED, -1);
- EXPECT_TRUE(tab_contents->IsCrashed());
+ web_contents->SetIsCrashed(base::TERMINATION_STATUS_PROCESS_CRASHED, -1);
+ EXPECT_TRUE(web_contents->IsCrashed());
browser::NavigateParams p(MakeNavigateParams());
p.disposition = SINGLETON_TAB;
@@ -1034,7 +1034,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
ui_test_utils::NavigateToURL(&p);
// The tab should not be sad anymore.
- EXPECT_FALSE(tab_contents->IsCrashed());
+ EXPECT_FALSE(web_contents->IsCrashed());
}
IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
diff --git a/chrome/browser/ui/cocoa/tabpose_window_unittest.mm b/chrome/browser/ui/cocoa/tabpose_window_unittest.mm
index 23712f9..e0263fa 100644
--- a/chrome/browser/ui/cocoa/tabpose_window_unittest.mm
+++ b/chrome/browser/ui/cocoa/tabpose_window_unittest.mm
@@ -9,7 +9,6 @@
#include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "content/browser/site_instance.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "testing/gtest/include/gtest/gtest.h"
class TabposeWindowTest : public CocoaProfileTest {
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller_unittest.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller_unittest.mm
index 1ac6841..173b4e6 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller_unittest.mm
@@ -15,7 +15,7 @@
#import "chrome/browser/ui/cocoa/tabs/tab_controller.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "content/browser/site_instance.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/web_contents.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
diff --git a/chrome/browser/ui/collected_cookies_infobar_delegate.cc b/chrome/browser/ui/collected_cookies_infobar_delegate.cc
index 79782bc..e46ae4e 100644
--- a/chrome/browser/ui/collected_cookies_infobar_delegate.cc
+++ b/chrome/browser/ui/collected_cookies_infobar_delegate.cc
@@ -6,7 +6,7 @@
#include "base/logging.h"
#include "chrome/browser/infobars/infobar_tab_helper.h"
-#include "content/browser/tab_contents/tab_contents.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/ui/constrained_window_tab_helper.cc b/chrome/browser/ui/constrained_window_tab_helper.cc
index c0b71e7..43a20d5 100644
--- a/chrome/browser/ui/constrained_window_tab_helper.cc
+++ b/chrome/browser/ui/constrained_window_tab_helper.cc
@@ -10,16 +10,16 @@
#include "chrome/common/render_messages.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/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
+#include "content/public/browser/web_contents.h"
#include "net/base/registry_controlled_domain.h"
using content::WebContents;
ConstrainedWindowTabHelper::ConstrainedWindowTabHelper(
TabContentsWrapper* wrapper)
- : content::WebContentsObserver(wrapper->tab_contents()),
+ : content::WebContentsObserver(wrapper->web_contents()),
wrapper_(wrapper),
delegate_(NULL) {
}
diff --git a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
index ac5eddb..ee699e5 100644
--- a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
+++ b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
@@ -39,6 +39,7 @@
#endif
using content::NavigationController;
+using content::WebContents;
const std::string kSimplePage = "404_is_enough_for_us.html";
const std::string kFramePage = "files/find_in_page/frames.html";
@@ -223,12 +224,12 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindInPageFrames) {
}
// Specifying a prototype so that we can add the WARN_UNUSED_RESULT attribute.
-bool FocusedOnPage(TabContents* tab_contents, std::string* result)
+bool FocusedOnPage(WebContents* web_contents, std::string* result)
WARN_UNUSED_RESULT;
-bool FocusedOnPage(TabContents* tab_contents, std::string* result) {
+bool FocusedOnPage(WebContents* web_contents, std::string* result) {
return ui_test_utils::ExecuteJavaScriptAndExtractString(
- tab_contents->GetRenderViewHost(),
+ web_contents->GetRenderViewHost(),
L"",
L"window.domAutomationController.send(getFocusedElement());",
result);
@@ -249,7 +250,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindInPageEndState) {
// Verify that nothing has focus.
std::string result;
- ASSERT_TRUE(FocusedOnPage(tab_contents->tab_contents(), &result));
+ ASSERT_TRUE(FocusedOnPage(tab_contents->web_contents(), &result));
ASSERT_STREQ("{nothing focused}", result.c_str());
// Search for a text that exists within a link on the page.
@@ -263,7 +264,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindInPageEndState) {
find_tab_helper()->StopFinding(FindBarController::kKeepSelection);
// Verify that the link is focused.
- ASSERT_TRUE(FocusedOnPage(tab_contents->tab_contents(), &result));
+ ASSERT_TRUE(FocusedOnPage(tab_contents->web_contents(), &result));
EXPECT_STREQ("link1", result.c_str());
// Search for a text that exists within a link on the page.
@@ -273,7 +274,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindInPageEndState) {
// Move the selection to link 1, after searching.
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
- tab_contents->tab_contents()->GetRenderViewHost(),
+ tab_contents->web_contents()->GetRenderViewHost(),
L"",
L"window.domAutomationController.send(selectLink1());",
&result));
@@ -283,7 +284,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindInPageEndState) {
find_tab_helper()->StopFinding(FindBarController::kKeepSelection);
// Verify that link2 is not focused.
- ASSERT_TRUE(FocusedOnPage(tab_contents->tab_contents(), &result));
+ ASSERT_TRUE(FocusedOnPage(tab_contents->web_contents(), &result));
EXPECT_STREQ("", result.c_str());
}
@@ -347,7 +348,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest,
// Move the selection to link 1, after searching.
std::string result;
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
- tab->tab_contents()->GetRenderViewHost(),
+ tab->web_contents()->GetRenderViewHost(),
L"",
L"window.domAutomationController.send(selectLink1());",
&result));
@@ -590,7 +591,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindDisappearOnNavigate) {
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &browser()->GetSelectedTabContentsWrapper()->tab_contents()->
+ &browser()->GetSelectedTabContentsWrapper()->web_contents()->
GetController()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
@@ -1117,7 +1118,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, ActivateLinkNavigatesPage) {
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &tab->tab_contents()->GetController()));
+ &tab->web_contents()->GetController()));
tab->find_tab_helper()->StopFinding(FindBarController::kActivateSelection);
observer.Wait();
}
diff --git a/chrome/browser/ui/fullscreen_controller.cc b/chrome/browser/ui/fullscreen_controller.cc
index cc001fc..0a16913 100644
--- a/chrome/browser/ui/fullscreen_controller.cc
+++ b/chrome/browser/ui/fullscreen_controller.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/message_loop.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
@@ -14,9 +15,9 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.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"
using content::UserMetricsAction;
using content::WebContents;
@@ -193,8 +194,8 @@ void FullscreenController::LostMouseLock() {
UpdateFullscreenExitBubbleContent();
}
-void FullscreenController::OnTabClosing(TabContents* tab_contents) {
- if (IsFullscreenForTab(tab_contents)) {
+void FullscreenController::OnTabClosing(WebContents* web_contents) {
+ if (IsFullscreenForTab(web_contents)) {
ExitTabbedFullscreenModeIfNecessary();
// The call to exit fullscreen may result in asynchronous notification of
// fullscreen state change (e.g., on Linux). We don't want to rely on it
@@ -227,7 +228,7 @@ void FullscreenController::OnAcceptFullscreenPermission(
ContentSettingsPattern::Wildcard(), CONTENT_SETTINGS_TYPE_MOUSELOCK,
std::string(), CONTENT_SETTING_ALLOW);
mouse_lock_state_ =
- fullscreened_tab_->tab_contents()->GotResponseToLockMouseRequest(true) ?
+ fullscreened_tab_->web_contents()->GotResponseToLockMouseRequest(true) ?
MOUSELOCK_ACCEPTED : MOUSELOCK_NOT_REQUESTED;
}
if (!tab_fullscreen_accepted_) {
@@ -251,7 +252,7 @@ void FullscreenController::OnDenyFullscreenPermission(
if (mouse_lock) {
DCHECK_EQ(mouse_lock_state_, MOUSELOCK_REQUESTED);
mouse_lock_state_ = MOUSELOCK_NOT_REQUESTED;
- fullscreened_tab_->tab_contents()->GotResponseToLockMouseRequest(false);
+ fullscreened_tab_->web_contents()->GotResponseToLockMouseRequest(false);
if (!fullscreen)
UpdateFullscreenExitBubbleContent();
}
@@ -282,8 +283,8 @@ bool FullscreenController::HandleUserPressedEscape() {
void FullscreenController::NotifyTabOfFullscreenExitIfNecessary() {
if (fullscreened_tab_ &&
- fullscreened_tab_->tab_contents()->GetRenderViewHost()) {
- fullscreened_tab_->tab_contents()->GetRenderViewHost()->ExitFullscreen();
+ fullscreened_tab_->web_contents()->GetRenderViewHost()) {
+ fullscreened_tab_->web_contents()->GetRenderViewHost()->ExitFullscreen();
} else {
DCHECK_EQ(mouse_lock_state_, MOUSELOCK_NOT_REQUESTED);
}
@@ -306,7 +307,7 @@ void FullscreenController::ExitTabbedFullscreenModeIfNecessary() {
void FullscreenController::UpdateFullscreenExitBubbleContent() {
GURL url;
if (fullscreened_tab_)
- url = fullscreened_tab_->tab_contents()->GetURL();
+ url = fullscreened_tab_->web_contents()->GetURL();
window_->UpdateFullscreenExitBubbleContent(url,
GetFullscreenExitBubbleType());
diff --git a/chrome/browser/ui/fullscreen_controller.h b/chrome/browser/ui/fullscreen_controller.h
index 8e95efc..de86677 100644
--- a/chrome/browser/ui/fullscreen_controller.h
+++ b/chrome/browser/ui/fullscreen_controller.h
@@ -57,7 +57,7 @@ class FullscreenController : public base::RefCounted<FullscreenController> {
// Notifications.
void LostMouseLock();
- void OnTabClosing(TabContents* tab_contents);
+ void OnTabClosing(content::WebContents* web_contents);
void OnTabDeactivated(TabContentsWrapper* contents);
void OnAcceptFullscreenPermission(const GURL& url,
FullscreenExitBubbleType bubble_type);
diff --git a/chrome/browser/ui/intents/web_intent_picker_controller_browsertest.cc b/chrome/browser/ui/intents/web_intent_picker_controller_browsertest.cc
index 06faca5..c8c2e44 100644
--- a/chrome/browser/ui/intents/web_intent_picker_controller_browsertest.cc
+++ b/chrome/browser/ui/intents/web_intent_picker_controller_browsertest.cc
@@ -18,7 +18,7 @@
#include "chrome/browser/webdata/web_data_service.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_intents_dispatcher.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/ui/intents/web_intent_picker_controller_unittest.cc b/chrome/browser/ui/intents/web_intent_picker_controller_unittest.cc
index ae2527d..4eec5c2 100644
--- a/chrome/browser/ui/intents/web_intent_picker_controller_unittest.cc
+++ b/chrome/browser/ui/intents/web_intent_picker_controller_unittest.cc
@@ -20,7 +20,6 @@
#include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h"
#include "chrome/browser/webdata/web_data_service.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/test_tab_contents.h"
#include "content/test/test_browser_thread.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/chrome/browser/ui/login/login_prompt_browsertest.cc b/chrome/browser/ui/login/login_prompt_browsertest.cc
index 114260d..068794d 100644
--- a/chrome/browser/ui/login/login_prompt_browsertest.cc
+++ b/chrome/browser/ui/login/login_prompt_browsertest.cc
@@ -15,9 +15,9 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/renderer_host/resource_dispatcher_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"
#include "content/test/test_browser_thread.h"
#include "net/base/auth.h"
#include "net/base/mock_host_resolver.h"
@@ -699,13 +699,13 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, SupplyRedundantAuths) {
// Open different auth urls in each tab.
WindowedAuthNeededObserver auth_needed_waiter_1(controller_1);
WindowedAuthNeededObserver auth_needed_waiter_2(controller_2);
- contents_1->tab_contents()->OpenURL(OpenURLParams(
+ contents_1->web_contents()->OpenURL(OpenURLParams(
test_server()->GetURL("auth-basic/1"),
content::Referrer(),
CURRENT_TAB,
content::PAGE_TRANSITION_TYPED,
false));
- contents_2->tab_contents()->OpenURL(OpenURLParams(
+ contents_2->web_contents()->OpenURL(OpenURLParams(
test_server()->GetURL("auth-basic/2"),
content::Referrer(),
CURRENT_TAB,
@@ -767,13 +767,13 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, CancelRedundantAuths) {
// Open different auth urls in each tab.
WindowedAuthNeededObserver auth_needed_waiter_1(controller_1);
WindowedAuthNeededObserver auth_needed_waiter_2(controller_2);
- contents_1->tab_contents()->OpenURL(OpenURLParams(
+ contents_1->web_contents()->OpenURL(OpenURLParams(
test_server()->GetURL("auth-basic/1"),
content::Referrer(),
CURRENT_TAB,
content::PAGE_TRANSITION_TYPED,
false));
- contents_2->tab_contents()->OpenURL(OpenURLParams(
+ contents_2->web_contents()->OpenURL(OpenURLParams(
test_server()->GetURL("auth-basic/2"),
content::Referrer(),
CURRENT_TAB,
@@ -834,13 +834,13 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest,
WindowedAuthNeededObserver auth_needed_waiter(controller);
WindowedAuthNeededObserver auth_needed_waiter_incognito(
controller_incognito);
- contents->tab_contents()->OpenURL(OpenURLParams(
+ contents->web_contents()->OpenURL(OpenURLParams(
test_server()->GetURL("auth-basic/1"),
content::Referrer(),
CURRENT_TAB,
content::PAGE_TRANSITION_TYPED,
false));
- contents_incognito->tab_contents()->OpenURL(OpenURLParams(
+ contents_incognito->web_contents()->OpenURL(OpenURLParams(
test_server()->GetURL("auth-basic/2"),
content::Referrer(),
CURRENT_TAB,
diff --git a/chrome/browser/ui/sad_tab_observer.cc b/chrome/browser/ui/sad_tab_observer.cc
index eebe6a4..7df7700 100644
--- a/chrome/browser/ui/sad_tab_observer.cc
+++ b/chrome/browser/ui/sad_tab_observer.cc
@@ -5,10 +5,10 @@
#include "chrome/browser/ui/sad_tab_observer.h"
#include "chrome/browser/browser_shutdown.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/web_contents.h"
#if defined(OS_MACOSX)
#include "chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h"
@@ -21,10 +21,10 @@
using content::WebContents;
-SadTabObserver::SadTabObserver(TabContents* tab_contents)
- : content::WebContentsObserver(tab_contents) {
+SadTabObserver::SadTabObserver(WebContents* web_contents)
+ : content::WebContentsObserver(web_contents) {
registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_CONNECTED,
- content::Source<WebContents>(tab_contents));
+ content::Source<WebContents>(web_contents));
}
SadTabObserver::~SadTabObserver() {
diff --git a/chrome/browser/ui/sad_tab_observer.h b/chrome/browser/ui/sad_tab_observer.h
index 64fec0b..b56893a 100644
--- a/chrome/browser/ui/sad_tab_observer.h
+++ b/chrome/browser/ui/sad_tab_observer.h
@@ -30,7 +30,7 @@ class SadTabGtk;
class SadTabObserver : public content::WebContentsObserver,
public content::NotificationObserver {
public:
- explicit SadTabObserver(TabContents* tab_contents);
+ explicit SadTabObserver(content::WebContents* web_contents);
virtual ~SadTabObserver();
private:
diff --git a/chrome/browser/ui/select_file_dialog.cc b/chrome/browser/ui/select_file_dialog.cc
index 25774c6..49c2cd0 100644
--- a/chrome/browser/ui/select_file_dialog.cc
+++ b/chrome/browser/ui/select_file_dialog.cc
@@ -13,7 +13,6 @@
#include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/pref_names.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc b/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc
index d4d6185..e1538ed 100644
--- a/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc
+++ b/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc
@@ -5,9 +5,10 @@
#include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h"
#include "chrome/browser/ui/constrained_window.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/navigation_controller.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 "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc b/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc
index 57af80e..083a687 100644
--- a/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc
@@ -22,6 +22,7 @@
#include "chrome/common/url_constants.h"
#include "content/browser/webui/web_ui.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/web_contents.h"
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
diff --git a/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.h b/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.h
index 05300f5..1a465c8 100644
--- a/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.h
+++ b/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.h
@@ -6,7 +6,6 @@
#define CHROME_BROWSER_UI_WEBUI_CHROMEOS_IMAGEBURNER_IMAGEBURNER_UI_H_
#include "chrome/browser/ui/webui/chrome_web_ui.h"
-#include "content/browser/tab_contents/tab_contents.h"
class ImageBurnUI : public ChromeWebUI {
public:
diff --git a/chrome/browser/ui/webui/chromeos/imageburner/imageburner_utils.cc b/chrome/browser/ui/webui/chromeos/imageburner/imageburner_utils.cc
index f9ff93e..4691162 100644
--- a/chrome/browser/ui/webui/chromeos/imageburner/imageburner_utils.cc
+++ b/chrome/browser/ui/webui/chromeos/imageburner/imageburner_utils.cc
@@ -12,6 +12,7 @@
#include "chrome/common/chrome_paths.h"
#include "content/browser/download/download_types.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/web_contents.h"
using content::BrowserThread;
using content::DownloadItem;
@@ -446,7 +447,7 @@ void Downloader::OnFileStreamCreatedOnUIThread(const GURL& url,
web_contents->GetURL(),
web_contents->GetEncoding(),
save_info,
- static_cast<TabContents*>(web_contents));
+ web_contents);
} else {
DownloadStarted(false, url);
}
diff --git a/chrome/browser/ui/webui/chromeos/imageburner/imageburner_utils.h b/chrome/browser/ui/webui/chromeos/imageburner/imageburner_utils.h
index a9b8931..f5050ec 100644
--- a/chrome/browser/ui/webui/chromeos/imageburner/imageburner_utils.h
+++ b/chrome/browser/ui/webui/chromeos/imageburner/imageburner_utils.h
@@ -6,6 +6,7 @@
#ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_IMAGEBURNER_IMAGEBURNER_UTILS_H_
#define CHROME_BROWSER_UI_WEBUI_CHROMEOS_IMAGEBURNER_IMAGEBURNER_UTILS_H_
+#include <list>
#include <map>
#include <set>
#include <string>
@@ -17,7 +18,6 @@
#include "base/observer_list.h"
#include "chrome/browser/download/download_util.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/download_item.h"
#include "content/public/browser/download_manager.h"
#include "googleurl/src/gurl.h"
diff --git a/chrome/browser/ui/webui/chromeos/imageburner/webui_handler.h b/chrome/browser/ui/webui/chromeos/imageburner/webui_handler.h
index e197b67..972ed9d5 100644
--- a/chrome/browser/ui/webui/chromeos/imageburner/webui_handler.h
+++ b/chrome/browser/ui/webui/chromeos/imageburner/webui_handler.h
@@ -17,13 +17,14 @@
#include "chrome/browser/chromeos/disks/disk_mount_manager.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
#include "chrome/browser/ui/webui/chromeos/imageburner/imageburner_utils.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/download_item.h"
#include "content/public/browser/download_manager.h"
#include "content/public/browser/web_ui_message_handler.h"
#include "googleurl/src/gurl.h"
-using content::BrowserThread;
+namespace content {
+class WebContents;
+}
namespace imageburner {
diff --git a/chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc
index 023c193..ed08fa4 100644
--- a/chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc
@@ -16,7 +16,7 @@
#include "chrome/common/net/gaia/gaia_constants.h"
#include "chrome/common/net/gaia/gaia_urls.h"
#include "chrome/common/net/gaia/google_service_auth_error.h"
-#include "content/browser/tab_contents/tab_contents.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/ui/webui/chromeos/login/network_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc
index 8d968a3..d1e1c59 100644
--- a/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc
@@ -17,7 +17,6 @@
#include "chrome/browser/chromeos/status/input_method_menu.h"
#include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
#include "chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/webui/web_ui.h"
#include "content/browser/webui/web_ui.h"
#include "grit/chromium_strings.h"
diff --git a/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc b/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc
index 0b1f853..7880837 100644
--- a/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc
+++ b/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc
@@ -22,7 +22,6 @@
#include "chrome/common/jstemplate_builder.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/notification_source.h"
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
diff --git a/chrome/browser/ui/webui/hung_renderer_dialog.cc b/chrome/browser/ui/webui/hung_renderer_dialog.cc
index 8498e6f..7fb073b 100644
--- a/chrome/browser/ui/webui/hung_renderer_dialog.cc
+++ b/chrome/browser/ui/webui/hung_renderer_dialog.cc
@@ -22,8 +22,9 @@
#include "chrome/common/logging_chrome.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/browser/webui/web_ui.h"
+#include "content/public/browser/render_process_host.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/common/result_codes.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -228,14 +229,14 @@ void HungRendererDialogHandler::RequestTabContentsList(
const base::ListValue* args) {
ListValue tab_contents_list;
for (TabContentsIterator it; !it.done(); ++it) {
- if (it->tab_contents()->GetRenderProcessHost() ==
+ if (it->web_contents()->GetRenderProcessHost() ==
contents_->GetRenderProcessHost()) {
- string16 title = it->tab_contents()->GetTitle();
+ string16 title = it->web_contents()->GetTitle();
if (title.empty())
title = CoreTabHelper::GetDefaultTitle();
// Add details for |url| and |title|.
DictionaryValue* dict = new DictionaryValue();
- dict->SetString("url", it->tab_contents()->GetURL().spec());
+ dict->SetString("url", it->web_contents()->GetURL().spec());
dict->SetString("title", title);
tab_contents_list.Append(dict);
}
diff --git a/chrome/browser/ui/webui/input_window_dialog_ui.cc b/chrome/browser/ui/webui/input_window_dialog_ui.cc
index 913d765..4e6c4e1 100644
--- a/chrome/browser/ui/webui/input_window_dialog_ui.cc
+++ b/chrome/browser/ui/webui/input_window_dialog_ui.cc
@@ -6,12 +6,14 @@
#include "chrome/browser/ui/webui/chrome_web_ui_data_source.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "chrome/browser/profiles/profile.h"
+#include "content/public/browser/web_contents.h"
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
-InputWindowDialogUI::InputWindowDialogUI(TabContents* contents)
+using content::WebContents;
+
+InputWindowDialogUI::InputWindowDialogUI(WebContents* contents)
: HtmlDialogUI(contents) {
ChromeWebUIDataSource* source =
new ChromeWebUIDataSource(chrome::kChromeUIInputWindowDialogHost);
diff --git a/chrome/browser/ui/webui/input_window_dialog_ui.h b/chrome/browser/ui/webui/input_window_dialog_ui.h
index 1fa725a..0b04ed9 100644
--- a/chrome/browser/ui/webui/input_window_dialog_ui.h
+++ b/chrome/browser/ui/webui/input_window_dialog_ui.h
@@ -8,12 +8,10 @@
#include "chrome/browser/ui/webui/html_dialog_ui.h"
-class TabContents;
-
// The WebUI for chrome://input-window-dialog
class InputWindowDialogUI : public HtmlDialogUI {
public:
- explicit InputWindowDialogUI(TabContents* contents);
+ explicit InputWindowDialogUI(content::WebContents* contents);
virtual ~InputWindowDialogUI();
protected:
diff --git a/chrome/browser/ui/webui/input_window_dialog_webui.cc b/chrome/browser/ui/webui/input_window_dialog_webui.cc
index 40b8671..fbb9082 100644
--- a/chrome/browser/ui/webui/input_window_dialog_webui.cc
+++ b/chrome/browser/ui/webui/input_window_dialog_webui.cc
@@ -16,7 +16,6 @@
#include "chrome/browser/ui/dialog_style.h"
#include "chrome/browser/ui/webui/html_dialog_ui.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/webui/web_ui.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
index d1d58ca..ae106c1 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -40,7 +40,6 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "chrome/common/web_apps.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/webui/web_ui.h"
#include "content/public/browser/notification_service.h"
#include "googleurl/src/gurl.h"
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.cc b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
index 7b6cc59..971b74a 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -41,10 +41,10 @@
#include "chrome/common/pref_names.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/browser_thread.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/user_metrics.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/ui/webui/options/chromeos/system_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/system_options_handler.cc
index 20186c0..2dd5e92 100644
--- a/chrome/browser/ui/webui/options/chromeos/system_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/system_options_handler.cc
@@ -29,7 +29,6 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/pref_names.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "grit/browser_resources.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
index ea1afe8..31eeeaa 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -28,7 +28,6 @@
#include "chrome/common/content_settings_pattern.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/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
diff --git a/chrome/browser/ui/webui/options/manage_profile_handler.cc b/chrome/browser/ui/webui/options/manage_profile_handler.cc
index 097cbbb..6ea6d7a 100644
--- a/chrome/browser/ui/webui/options/manage_profile_handler.cc
+++ b/chrome/browser/ui/webui/options/manage_profile_handler.cc
@@ -21,7 +21,6 @@
#include "chrome/browser/ui/webui/web_ui_util.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
diff --git a/chrome/browser/ui/webui/options/options_ui.cc b/chrome/browser/ui/webui/options/options_ui.cc
index 60d0680..7d40b0f 100644
--- a/chrome/browser/ui/webui/options/options_ui.cc
+++ b/chrome/browser/ui/webui/options/options_ui.cc
@@ -44,10 +44,10 @@
#include "chrome/common/time_format.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/browser_thread.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/user_metrics.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
diff --git a/chrome/browser/ui/webui/options2/chromeos/system_options_handler2.cc b/chrome/browser/ui/webui/options2/chromeos/system_options_handler2.cc
index 1f9b4b7..fbbf43e 100644
--- a/chrome/browser/ui/webui/options2/chromeos/system_options_handler2.cc
+++ b/chrome/browser/ui/webui/options2/chromeos/system_options_handler2.cc
@@ -29,7 +29,6 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/pref_names.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "grit/browser_resources.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
diff --git a/chrome/browser/ui/webui/options2/content_settings_handler2.cc b/chrome/browser/ui/webui/options2/content_settings_handler2.cc
index 4f8b5fb..f159938 100644
--- a/chrome/browser/ui/webui/options2/content_settings_handler2.cc
+++ b/chrome/browser/ui/webui/options2/content_settings_handler2.cc
@@ -28,7 +28,6 @@
#include "chrome/common/content_settings_pattern.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/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
diff --git a/chrome/browser/ui/webui/options2/manage_profile_handler2.cc b/chrome/browser/ui/webui/options2/manage_profile_handler2.cc
index 1ba7740..4f19cc5 100644
--- a/chrome/browser/ui/webui/options2/manage_profile_handler2.cc
+++ b/chrome/browser/ui/webui/options2/manage_profile_handler2.cc
@@ -18,7 +18,6 @@
#include "chrome/browser/profiles/profile_metrics.h"
#include "chrome/browser/ui/webui/web_ui_util.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
diff --git a/chrome/browser/ui/webui/options2/options_ui2.cc b/chrome/browser/ui/webui/options2/options_ui2.cc
index 5467d96..8c5a44c 100644
--- a/chrome/browser/ui/webui/options2/options_ui2.cc
+++ b/chrome/browser/ui/webui/options2/options_ui2.cc
@@ -42,9 +42,9 @@
#include "chrome/common/time_format.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/browser_thread.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
diff --git a/chrome/browser/ui/webui/print_preview_handler_unittest.cc b/chrome/browser/ui/webui/print_preview_handler_unittest.cc
index eab7637..7bf7fcb 100644
--- a/chrome/browser/ui/webui/print_preview_handler_unittest.cc
+++ b/chrome/browser/ui/webui/print_preview_handler_unittest.cc
@@ -15,7 +15,7 @@
#include "chrome/browser/ui/webui/print_preview_ui.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/browser_with_test_window_test.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/web_contents.h"
#include "printing/page_size_margins.h"
#include "printing/print_job_constants.h"
@@ -70,7 +70,7 @@ class PrintPreviewHandlerTest : public BrowserWithTestWindowTest {
ASSERT_TRUE(preview_tab_);
preview_ui_ =
- static_cast<PrintPreviewUI*>(preview_tab_->tab_contents()->GetWebUI());
+ static_cast<PrintPreviewUI*>(preview_tab_->web_contents()->GetWebUI());
ASSERT_TRUE(preview_ui_);
}
diff --git a/chrome/browser/ui/webui/print_preview_ui_unittest.cc b/chrome/browser/ui/webui/print_preview_ui_unittest.cc
index 400b4a6..a31fa83 100644
--- a/chrome/browser/ui/webui/print_preview_ui_unittest.cc
+++ b/chrome/browser/ui/webui/print_preview_ui_unittest.cc
@@ -15,7 +15,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/browser_with_test_window_test.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/web_contents.h"
#include "printing/print_job_constants.h"
namespace {
@@ -57,7 +57,7 @@ TEST_F(PrintPreviewUIUnitTest, PrintPreviewData) {
EXPECT_EQ(1U, GetConstrainedWindowCount(initiator_tab));
PrintPreviewUI* preview_ui = reinterpret_cast<PrintPreviewUI*>(
- preview_tab->tab_contents()->GetWebUI());
+ preview_tab->web_contents()->GetWebUI());
ASSERT_TRUE(preview_ui != NULL);
scoped_refptr<RefCountedBytes> data;
@@ -119,7 +119,7 @@ TEST_F(PrintPreviewUIUnitTest, PrintPreviewDraftPages) {
EXPECT_EQ(1U, GetConstrainedWindowCount(initiator_tab));
PrintPreviewUI* preview_ui = reinterpret_cast<PrintPreviewUI*>(
- preview_tab->tab_contents()->GetWebUI());
+ preview_tab->web_contents()->GetWebUI());
ASSERT_TRUE(preview_ui != NULL);
scoped_refptr<RefCountedBytes> data;
@@ -188,7 +188,7 @@ TEST_F(PrintPreviewUIUnitTest, GetCurrentPrintPreviewStatus) {
EXPECT_EQ(1U, GetConstrainedWindowCount(initiator_tab));
PrintPreviewUI* preview_ui = reinterpret_cast<PrintPreviewUI*>(
- preview_tab->tab_contents()->GetWebUI());
+ preview_tab->web_contents()->GetWebUI());
ASSERT_TRUE(preview_ui != NULL);
// Test with invalid |preview_ui_addr|.
diff --git a/chrome/browser/ui/webui/quota_internals_ui.cc b/chrome/browser/ui/webui/quota_internals_ui.cc
index 8406707..a248c58 100644
--- a/chrome/browser/ui/webui/quota_internals_ui.cc
+++ b/chrome/browser/ui/webui/quota_internals_ui.cc
@@ -12,7 +12,7 @@
#include "chrome/browser/ui/webui/chrome_web_ui_data_source.h"
#include "chrome/browser/ui/webui/quota_internals_handler.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/web_contents.h"
#include "grit/quota_internals_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
diff --git a/chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.cc b/chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.cc
index f30467a..c70bec2 100644
--- a/chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.cc
+++ b/chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.cc
@@ -21,7 +21,6 @@
#include "chrome/browser/ui/webui/constrained_html_ui.h"
#include "chrome/common/jstemplate_builder.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/test/data/webui/certificate_viewer_ui_test-inl.h b/chrome/test/data/webui/certificate_viewer_ui_test-inl.h
index f161706..2bbd155 100644
--- a/chrome/test/data/webui/certificate_viewer_ui_test-inl.h
+++ b/chrome/test/data/webui/certificate_viewer_ui_test-inl.h
@@ -11,8 +11,8 @@
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/base/test_html_dialog_observer.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 "net/base/test_certificate_data.h"
#include "net/base/x509_certificate.h"
diff --git a/chrome/test/data/webui/hung_renderer_dialog_ui_test-inl.h b/chrome/test/data/webui/hung_renderer_dialog_ui_test-inl.h
index 9fd0e8e..cc39a5e 100644
--- a/chrome/test/data/webui/hung_renderer_dialog_ui_test-inl.h
+++ b/chrome/test/data/webui/hung_renderer_dialog_ui_test-inl.h
@@ -9,8 +9,8 @@
#include "chrome/common/url_constants.h"
#include "chrome/test/base/test_html_dialog_observer.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"
using content::WebContents;