diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-22 06:55:31 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-22 06:55:31 +0000 |
commit | be1f56ab53f9f07d981859fb1dc55ac1d7980226 (patch) | |
tree | 73ab07f324bb0a2a4aa0e4b3caa5f0325bce18f5 /chrome | |
parent | 89a6e72128eac7c64a7351de54a3aa2598e9e337 (diff) | |
download | chromium_src-be1f56ab53f9f07d981859fb1dc55ac1d7980226.zip chromium_src-be1f56ab53f9f07d981859fb1dc55ac1d7980226.tar.gz chromium_src-be1f56ab53f9f07d981859fb1dc55ac1d7980226.tar.bz2 |
Move a bunch of methods from TabContents into the WebContents interface. This change either moves CamelCase functions into the interface, or renames existing unix_hacker functions to CamelCase.
BUG=98716
Review URL: http://codereview.chromium.org/8949061
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115495 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
50 files changed, 102 insertions, 101 deletions
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc index 7dfd511..b855789 100644 --- a/chrome/browser/automation/testing_automation_provider.cc +++ b/chrome/browser/automation/testing_automation_provider.cc @@ -6574,7 +6574,7 @@ void TestingAutomationProvider::GetPageCurrentEncoding( DCHECK(browser); if (browser->command_updater()->IsCommandEnabled(IDC_ENCODING_MENU)) - *current_encoding = nav->tab_contents()->encoding(); + *current_encoding = nav->tab_contents()->GetEncoding(); } } diff --git a/chrome/browser/bookmarks/bookmark_manager_extension_api.cc b/chrome/browser/bookmarks/bookmark_manager_extension_api.cc index 6383b81..95593b5 100644 --- a/chrome/browser/bookmarks/bookmark_manager_extension_api.cc +++ b/chrome/browser/bookmarks/bookmark_manager_extension_api.cc @@ -424,7 +424,7 @@ bool DropBookmarkManagerFunction::RunImpl() { dispatcher()->delegate()->GetAssociatedTabContents(); CHECK(tab_contents); ExtensionWebUI* web_ui = - static_cast<ExtensionWebUI*>(tab_contents->web_ui()); + static_cast<ExtensionWebUI*>(tab_contents->GetWebUI()); CHECK(web_ui); BookmarkManagerExtensionEventRouter* router = web_ui->bookmark_manager_extension_event_router(); diff --git a/chrome/browser/chromeos/login/webui_login_view.cc b/chrome/browser/chromeos/login/webui_login_view.cc index 518b5e1..9155e0f 100644 --- a/chrome/browser/chromeos/login/webui_login_view.cc +++ b/chrome/browser/chromeos/login/webui_login_view.cc @@ -207,7 +207,7 @@ void WebUILoginView::LoadURL(const GURL & url) { } WebUI* WebUILoginView::GetWebUI() { - return webui_login_->dom_contents()->tab_contents()->web_ui(); + return webui_login_->dom_contents()->tab_contents()->GetWebUI(); } void WebUILoginView::SetStatusAreaEnabled(bool enable) { diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc index 8bbdfb1..a9d9a50 100644 --- a/chrome/browser/download/download_browsertest.cc +++ b/chrome/browser/download/download_browsertest.cc @@ -595,7 +595,7 @@ class DownloadTest : public InProcessBrowserTest { return; ActiveDownloadsUI* downloads_ui = static_cast<ActiveDownloadsUI*>( - popup->GetSelectedTabContents()->web_ui()); + popup->GetSelectedTabContents()->GetWebUI()); ASSERT_TRUE(downloads_ui); const ActiveDownloadsUI::DownloadList& downloads = diff --git a/chrome/browser/download/save_page_browsertest.cc b/chrome/browser/download/save_page_browsertest.cc index 942375c..1b63386 100644 --- a/chrome/browser/download/save_page_browsertest.cc +++ b/chrome/browser/download/save_page_browsertest.cc @@ -96,7 +96,7 @@ class SavePageBrowserTest : public InProcessBrowserTest { Browser* popup = ActiveDownloadsUI::GetPopup(); EXPECT_TRUE(popup); ActiveDownloadsUI* downloads_ui = static_cast<ActiveDownloadsUI*>( - popup->GetSelectedTabContents()->web_ui()); + popup->GetSelectedTabContents()->GetWebUI()); EXPECT_TRUE(downloads_ui); return downloads_ui->GetDownloads(); } diff --git a/chrome/browser/extensions/app_process_apitest.cc b/chrome/browser/extensions/app_process_apitest.cc index 2d3139a..47c42ec 100644 --- a/chrome/browser/extensions/app_process_apitest.cc +++ b/chrome/browser/extensions/app_process_apitest.cc @@ -109,7 +109,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, AppProcess) { ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); EXPECT_TRUE(process_map->Contains( browser()->GetTabContentsAt(1)->GetRenderProcessHost()->GetID())); - EXPECT_FALSE(browser()->GetTabContentsAt(1)->web_ui()); + EXPECT_FALSE(browser()->GetTabContentsAt(1)->GetWebUI()); LOG(INFO) << "Nav 1."; ui_test_utils::NavigateToURLWithDisposition( @@ -117,7 +117,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, AppProcess) { ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); EXPECT_TRUE(process_map->Contains( browser()->GetTabContentsAt(2)->GetRenderProcessHost()->GetID())); - EXPECT_FALSE(browser()->GetTabContentsAt(2)->web_ui()); + EXPECT_FALSE(browser()->GetTabContentsAt(2)->GetWebUI()); LOG(INFO) << "Nav 2."; ui_test_utils::WindowedNotificationObserver tab_added_observer( @@ -130,7 +130,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, AppProcess) { LOG(INFO) << "Nav 3."; EXPECT_FALSE(process_map->Contains( browser()->GetTabContentsAt(3)->GetRenderProcessHost()->GetID())); - EXPECT_FALSE(browser()->GetTabContentsAt(3)->web_ui()); + EXPECT_FALSE(browser()->GetTabContentsAt(3)->GetWebUI()); // We should have opened 3 new extension tabs. Including the original blank // tab, we now have 4 tabs. Because the app_process app has the background @@ -221,7 +221,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, AppProcessInstances) { LOG(INFO) << "Nav 1."; EXPECT_TRUE(process_map->Contains( browser()->GetTabContentsAt(1)->GetRenderProcessHost()->GetID())); - EXPECT_FALSE(browser()->GetTabContentsAt(1)->web_ui()); + EXPECT_FALSE(browser()->GetTabContentsAt(1)->GetWebUI()); ui_test_utils::WindowedNotificationObserver tab_added_observer( content::NOTIFICATION_TAB_ADDED, @@ -233,7 +233,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, AppProcessInstances) { LOG(INFO) << "Nav 2."; EXPECT_TRUE(process_map->Contains( browser()->GetTabContentsAt(2)->GetRenderProcessHost()->GetID())); - EXPECT_FALSE(browser()->GetTabContentsAt(2)->web_ui()); + EXPECT_FALSE(browser()->GetTabContentsAt(2)->GetWebUI()); // We should have opened 2 new extension tabs. Including the original blank // tab, we now have 3 tabs. The two app tabs should not be in the same @@ -287,7 +287,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, BookmarkAppGetsNormalProcess) { ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); EXPECT_FALSE(process_map->Contains( browser()->GetTabContentsAt(1)->GetRenderProcessHost()->GetID())); - EXPECT_FALSE(browser()->GetTabContentsAt(1)->web_ui()); + EXPECT_FALSE(browser()->GetTabContentsAt(1)->GetWebUI()); ui_test_utils::WindowedNotificationObserver tab_added_observer( content::NOTIFICATION_TAB_ADDED, @@ -297,7 +297,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, BookmarkAppGetsNormalProcess) { ui_test_utils::NavigateToURL(browser(), base_url.Resolve("path2/empty.html")); EXPECT_FALSE(process_map->Contains( browser()->GetTabContentsAt(2)->GetRenderProcessHost()->GetID())); - EXPECT_FALSE(browser()->GetTabContentsAt(2)->web_ui()); + EXPECT_FALSE(browser()->GetTabContentsAt(2)->GetWebUI()); // We should have opened 2 new bookmark app tabs. Including the original blank // tab, we now have 3 tabs. Because normal pages use the diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc index 4c1eb2e..5f95702 100644 --- a/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc +++ b/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc @@ -211,7 +211,7 @@ void GeolocationPermissionContextTests::AddNewTab(const GURL& url) { new TabContents(profile(), NULL, MSG_ROUTING_NONE, NULL, NULL); new_tab->GetController().LoadURL( url, content::Referrer(), content::PAGE_TRANSITION_TYPED, std::string()); - static_cast<TestRenderViewHost*>(new_tab->render_manager_for_testing()-> + static_cast<TestRenderViewHost*>(new_tab->GetRenderManagerForTesting()-> current_host())->SendNavigate(extra_tabs_.size() + 1, url); extra_tabs_.push_back(new TabContentsWrapper(new_tab)); } diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc index a04969e..16c2bbe 100644 --- a/chrome/browser/instant/instant_loader.cc +++ b/chrome/browser/instant/instant_loader.cc @@ -434,7 +434,7 @@ void InstantLoader::TabContentsDelegateImpl::NavigationStateChanged( RenderWidgetHostView *rwhv = source->GetRenderWidgetHostView(); if (rwhv) RegisterForPaintNotifications(rwhv->GetRenderWidgetHost()); - } else if (source->is_crashed()) { + } else if (source->IsCrashed()) { PreviewPainted(); } } diff --git a/chrome/browser/oom_priority_manager.cc b/chrome/browser/oom_priority_manager.cc index df8da3a..d736877 100644 --- a/chrome/browser/oom_priority_manager.cc +++ b/chrome/browser/oom_priority_manager.cc @@ -266,9 +266,9 @@ OomPriorityManager::TabStatsList OomPriorityManager::GetTabStatsOnUIThread() { const TabStripModel* model = browser->tabstrip_model(); for (int i = 0; i < model->count(); i++) { TabContents* contents = model->GetTabContentsAt(i)->tab_contents(); - if (!contents->is_crashed()) { + if (!contents->IsCrashed()) { TabStats stats; - stats.last_selected = contents->last_selected_time(); + stats.last_selected = contents->GetLastSelectedTime(); stats.renderer_handle = contents->GetRenderProcessHost()->GetHandle(); stats.is_pinned = model->IsTabPinned(i); stats.is_selected = model->IsTabSelected(i); diff --git a/chrome/browser/printing/print_preview_message_handler.cc b/chrome/browser/printing/print_preview_message_handler.cc index 7a0470a..b59c78b 100644 --- a/chrome/browser/printing/print_preview_message_handler.cc +++ b/chrome/browser/printing/print_preview_message_handler.cc @@ -91,11 +91,11 @@ PrintPreviewUI* PrintPreviewMessageHandler::OnFailure(int document_cookie) { // Inform the print preview tab of the failure. TabContentsWrapper* print_preview_tab = GetPrintPreviewTab(); // User might have closed it already. - if (!print_preview_tab || !print_preview_tab->tab_contents()->web_ui()) + if (!print_preview_tab || !print_preview_tab->tab_contents()->GetWebUI()) return NULL; return static_cast<PrintPreviewUI*>( - print_preview_tab->tab_contents()->web_ui()); + print_preview_tab->tab_contents()->GetWebUI()); } void PrintPreviewMessageHandler::OnRequestPrintPreview( @@ -113,11 +113,11 @@ void PrintPreviewMessageHandler::OnDidGetPreviewPageCount( } TabContentsWrapper* print_preview_tab = GetPrintPreviewTab(); - if (!print_preview_tab || !print_preview_tab->tab_contents()->web_ui()) + if (!print_preview_tab || !print_preview_tab->tab_contents()->GetWebUI()) return; - PrintPreviewUI* print_preview_ui = - static_cast<PrintPreviewUI*>(print_preview_tab->tab_contents()->web_ui()); + PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>( + print_preview_tab->tab_contents()->GetWebUI()); if (!params.is_modifiable || params.clear_preview_data) print_preview_ui->ClearAllPreviewData(); @@ -128,11 +128,11 @@ void PrintPreviewMessageHandler::OnDidGetPreviewPageCount( void PrintPreviewMessageHandler::OnDidPreviewPage( const PrintHostMsg_DidPreviewPage_Params& params) { TabContentsWrapper* print_preview_tab = GetPrintPreviewTab(); - if (!print_preview_tab || !print_preview_tab->tab_contents()->web_ui()) + if (!print_preview_tab || !print_preview_tab->tab_contents()->GetWebUI()) return; - PrintPreviewUI* print_preview_ui = - static_cast<PrintPreviewUI*>(print_preview_tab->tab_contents()->web_ui()); + PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>( + print_preview_tab->tab_contents()->GetWebUI()); int page_number = params.page_number; if (page_number >= FIRST_PAGE_INDEX && params.data_size) { RefCountedBytes* data_bytes = @@ -157,11 +157,11 @@ void PrintPreviewMessageHandler::OnMetafileReadyForPrinting( // Get the print preview tab. TabContentsWrapper* print_preview_tab = GetPrintPreviewTab(); // User might have closed it already. - if (!print_preview_tab || !print_preview_tab->tab_contents()->web_ui()) + if (!print_preview_tab || !print_preview_tab->tab_contents()->GetWebUI()) return; - PrintPreviewUI* print_preview_ui = - static_cast<PrintPreviewUI*>(print_preview_tab->tab_contents()->web_ui()); + PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>( + print_preview_tab->tab_contents()->GetWebUI()); if (params.reuse_existing_data) { // Need to match normal rendering where we are expected to send this. @@ -199,11 +199,11 @@ void PrintPreviewMessageHandler::OnPrintPreviewFailed(int document_cookie) { void PrintPreviewMessageHandler::OnDidGetDefaultPageLayout( const PageSizeMargins& page_layout_in_points) { TabContentsWrapper* print_preview_tab = GetPrintPreviewTab(); - if (!print_preview_tab || !print_preview_tab->tab_contents()->web_ui()) + if (!print_preview_tab || !print_preview_tab->tab_contents()->GetWebUI()) return; - PrintPreviewUI* print_preview_ui = - static_cast<PrintPreviewUI*>(print_preview_tab->tab_contents()->web_ui()); + PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>( + print_preview_tab->tab_contents()->GetWebUI()); print_preview_ui->OnDidGetDefaultPageLayout(page_layout_in_points); } diff --git a/chrome/browser/printing/print_preview_tab_controller.cc b/chrome/browser/printing/print_preview_tab_controller.cc index 6acf2bd..bfcb63e 100644 --- a/chrome/browser/printing/print_preview_tab_controller.cc +++ b/chrome/browser/printing/print_preview_tab_controller.cc @@ -255,7 +255,7 @@ void PrintPreviewTabController::OnRendererProcessClosed( RemovePreviewTab(closed_preview_tabs[i]); PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>( - closed_preview_tabs[i]->tab_contents()->web_ui()); + closed_preview_tabs[i]->tab_contents()->GetWebUI()); if (print_preview_ui) print_preview_ui->OnPrintPreviewTabClosed(); } @@ -395,9 +395,9 @@ TabContentsWrapper* PrintPreviewTabController::CreatePrintPreviewTab( void PrintPreviewTabController::SetInitiatorTabURLAndTitle( TabContentsWrapper* preview_tab) { TabContentsWrapper* initiator_tab = GetInitiatorTab(preview_tab); - if (initiator_tab && preview_tab->tab_contents()->web_ui()) { + if (initiator_tab && preview_tab->tab_contents()->GetWebUI()) { PrintPreviewUI* print_preview_ui = - static_cast<PrintPreviewUI*>(preview_tab->tab_contents()->web_ui()); + static_cast<PrintPreviewUI*>(preview_tab->tab_contents()->GetWebUI()); print_preview_ui->SetInitiatorTabURLAndTitle( initiator_tab->tab_contents()->GetURL().spec(), initiator_tab->print_view_manager()->RenderSourceName()); @@ -461,7 +461,7 @@ void PrintPreviewTabController::RemoveInitiatorTab( // Initiator tab is closed. Close the print preview tab too. PrintPreviewUI* print_preview_ui = - static_cast<PrintPreviewUI*>(preview_tab->tab_contents()->web_ui()); + static_cast<PrintPreviewUI*>(preview_tab->tab_contents()->GetWebUI()); if (print_preview_ui) print_preview_ui->OnInitiatorTabClosed(); } @@ -478,7 +478,7 @@ void PrintPreviewTabController::RemovePreviewTab( // Print preview TabContents is destroyed. Notify |PrintPreviewUI| to abort // the initiator tab preview request. PrintPreviewUI* print_preview_ui = - static_cast<PrintPreviewUI*>(preview_tab->tab_contents()->web_ui()); + static_cast<PrintPreviewUI*>(preview_tab->tab_contents()->GetWebUI()); if (print_preview_ui) print_preview_ui->OnTabDestroyed(); diff --git a/chrome/browser/printing/print_view_manager.cc b/chrome/browser/printing/print_view_manager.cc index eedaf9e..68ddc3b 100644 --- a/chrome/browser/printing/print_view_manager.cc +++ b/chrome/browser/printing/print_view_manager.cc @@ -102,10 +102,10 @@ bool PrintViewManager::AdvancedPrintNow() { tab_controller->GetPrintPreviewForTab(tab_); if (print_preview_tab) { // Preview tab exist for current tab or current tab is preview tab. - if (!print_preview_tab->tab_contents()->web_ui()) + if (!print_preview_tab->tab_contents()->GetWebUI()) return false; PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>( - print_preview_tab->tab_contents()->web_ui()); + print_preview_tab->tab_contents()->GetWebUI()); print_preview_ui->OnShowSystemDialog(); return true; } else { diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc index 531c40b..0faa97d 100644 --- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc +++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc @@ -603,7 +603,7 @@ void SafeBrowsingBlockingPage::DontProceed() { tab()->GetController().last_committed_entry_index(); if (navigation_entry_index_to_remove_ != -1 && navigation_entry_index_to_remove_ != last_committed_index && - !tab()->is_being_destroyed()) { + !tab()->IsBeingDestroyed()) { tab()->GetController().RemoveEntryAtIndex( navigation_entry_index_to_remove_); navigation_entry_index_to_remove_ = -1; diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc index fab7815..3405d03 100644 --- a/chrome/browser/ssl/ssl_browser_tests.cc +++ b/chrome/browser/ssl/ssl_browser_tests.cc @@ -46,7 +46,7 @@ class SSLUITest : public InProcessBrowserTest { void CheckAuthenticatedState(TabContents* tab, bool displayed_insecure_content) { - ASSERT_FALSE(tab->is_crashed()); + ASSERT_FALSE(tab->IsCrashed()); NavigationEntry* entry = tab->GetController().GetActiveEntry(); ASSERT_TRUE(entry); EXPECT_EQ(content::PAGE_TYPE_NORMAL, entry->page_type()); @@ -59,7 +59,7 @@ class SSLUITest : public InProcessBrowserTest { } void CheckUnauthenticatedState(TabContents* tab) { - ASSERT_FALSE(tab->is_crashed()); + ASSERT_FALSE(tab->IsCrashed()); NavigationEntry* entry = tab->GetController().GetActiveEntry(); ASSERT_TRUE(entry); EXPECT_EQ(content::PAGE_TYPE_NORMAL, entry->page_type()); @@ -74,7 +74,7 @@ class SSLUITest : public InProcessBrowserTest { net::CertStatus error, bool ran_insecure_content, bool interstitial) { - ASSERT_FALSE(tab->is_crashed()); + ASSERT_FALSE(tab->IsCrashed()); NavigationEntry* entry = tab->GetController().GetActiveEntry(); ASSERT_TRUE(entry); EXPECT_EQ(interstitial ? diff --git a/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc b/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc index bf91a8c..8de375b 100644 --- a/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc +++ b/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc @@ -42,7 +42,7 @@ void BlockedContentTabHelper::DidNavigateMainFrame( void BlockedContentTabHelper::PopupNotificationVisibilityChanged( bool visible) { - if (tab_contents()->is_being_destroyed()) + if (tab_contents()->IsBeingDestroyed()) return; tab_contents_wrapper_->content_settings()->SetPopupsBlocked(visible); } diff --git a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc index 84fdc4c..5361050 100644 --- a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc +++ b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc @@ -51,13 +51,13 @@ bool BookmarkTabHelper::ShouldShowBookmarkBar() { // does. if (tab_contents()->GetController().GetLastCommittedEntry()) { // Not the first load, always use the committed Web UI. - return CanShowBookmarkBar(tab_contents()->committed_web_ui()); + return CanShowBookmarkBar(tab_contents()->GetCommittedWebUI()); } // When it's the first load, we know either the pending one or the committed // one will have the Web UI in it (see GetWebUIForCurrentState), and only one // of them will be valid, so we can just check both. - return CanShowBookmarkBar(tab_contents()->web_ui()); + return CanShowBookmarkBar(tab_contents()->GetWebUI()); } void BookmarkTabHelper::DidNavigateMainFrame( diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index 95bbefc..5651563 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -1076,7 +1076,7 @@ void Browser::OnWindowActivated() { // On some platforms we want to automatically reload tabs that are // killed when the user selects them. TabContents* contents = GetSelectedTabContents(); - if (contents && contents->crashed_status() == + if (contents && contents->GetCrashedStatus() == base::TERMINATION_STATUS_PROCESS_WAS_KILLED) { if (CommandLine::ForCurrentProcess()->HasSwitch( switches::kReloadKilledTabs)) { @@ -3301,7 +3301,7 @@ void Browser::ActiveTabChanged(TabContentsWrapper* old_contents, bool user_gesture) { // On some platforms we want to automatically reload tabs that are // killed when the user selects them. - if (user_gesture && new_contents->tab_contents()->crashed_status() == + if (user_gesture && new_contents->tab_contents()->GetCrashedStatus() == base::TERMINATION_STATUS_PROCESS_WAS_KILLED) { const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); if (parsed_command_line.HasSwitch(switches::kReloadKilledTabs)) { diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc index c4a6aec..bbe00e4 100644 --- a/chrome/browser/ui/browser_navigator.cc +++ b/chrome/browser/ui/browser_navigator.cc @@ -568,7 +568,7 @@ void Navigate(NavigateParams* params) { if (singleton_index >= 0) { TabContents* target = params->browser->GetTabContentsAt(singleton_index); - if (target->is_crashed()) { + if (target->IsCrashed()) { target->GetController().Reload(true); } else if (params->path_behavior == NavigateParams::IGNORE_AND_NAVIGATE && target->GetURL() != params->url) { diff --git a/chrome/browser/ui/browser_navigator_browsertest.cc b/chrome/browser/ui/browser_navigator_browsertest.cc index f652053..ba003835 100644 --- a/chrome/browser/ui/browser_navigator_browsertest.cc +++ b/chrome/browser/ui/browser_navigator_browsertest.cc @@ -1022,7 +1022,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, // Kill the singleton tab. tab_contents->SetIsCrashed(base::TERMINATION_STATUS_PROCESS_CRASHED, -1); - EXPECT_TRUE(tab_contents->is_crashed()); + EXPECT_TRUE(tab_contents->IsCrashed()); browser::NavigateParams p(MakeNavigateParams()); p.disposition = SINGLETON_TAB; @@ -1032,7 +1032,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, ui_test_utils::NavigateToURL(&p); // The tab should not be sad anymore. - EXPECT_FALSE(tab_contents->is_crashed()); + EXPECT_FALSE(tab_contents->IsCrashed()); } IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, diff --git a/chrome/browser/ui/cocoa/applescript/window_applescript.mm b/chrome/browser/ui/cocoa/applescript/window_applescript.mm index fcc1148..8124d2a 100644 --- a/chrome/browser/ui/cocoa/applescript/window_applescript.mm +++ b/chrome/browser/ui/cocoa/applescript/window_applescript.mm @@ -151,7 +151,7 @@ for (int i = 0; i < browser_->tab_count(); ++i) { // Check to see if tab is closing. - if (browser_->GetTabContentsAt(i)->is_being_destroyed()) { + if (browser_->GetTabContentsAt(i)->IsBeingDestroyed()) { continue; } diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm index 9be9200..1fa3264 100644 --- a/chrome/browser/ui/cocoa/browser_window_controller.mm +++ b/chrome/browser/ui/cocoa/browser_window_controller.mm @@ -961,7 +961,7 @@ enum { if (!current_tab) { return; } - const std::string encoding = current_tab->encoding(); + const std::string encoding = current_tab->GetEncoding(); bool toggled = encoding_controller.IsItemChecked(profile, encoding, tag); NSInteger oldState = [item state]; diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm index a5988c6..c0a7fda 100644 --- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm +++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm @@ -1422,10 +1422,10 @@ private: TabLoadingState oldState = [tabController loadingState]; TabLoadingState newState = kTabDone; NSImage* throbberImage = nil; - if (contents->tab_contents()->is_crashed()) { + if (contents->tab_contents()->IsCrashed()) { newState = kTabCrashed; newHasIcon = true; - } else if (contents->tab_contents()->waiting_for_response()) { + } else if (contents->tab_contents()->IsWaitingForResponse()) { newState = kTabWaiting; throbberImage = throbberWaitingImage; } else if (contents->tab_contents()->IsLoading()) { diff --git a/chrome/browser/ui/gtk/browser_titlebar.cc b/chrome/browser/ui/gtk/browser_titlebar.cc index 37308aa..86f2f9a 100644 --- a/chrome/browser/ui/gtk/browser_titlebar.cc +++ b/chrome/browser/ui/gtk/browser_titlebar.cc @@ -640,7 +640,7 @@ void BrowserTitlebar::UpdateThrobber(TabContents* tab_contents) { if (tab_contents && tab_contents->IsLoading()) { GdkPixbuf* icon_pixbuf = - throbber_.GetNextFrame(tab_contents->waiting_for_response()); + throbber_.GetNextFrame(tab_contents->IsWaitingForResponse()); gtk_image_set_from_pixbuf(GTK_IMAGE(app_mode_favicon_), icon_pixbuf); } else { ResourceBundle& rb = ResourceBundle::GetSharedInstance(); @@ -991,7 +991,7 @@ bool BrowserTitlebar::IsCommandIdChecked(int command_id) const { browser_window_->browser()->GetSelectedTabContents(); if (tab_contents) { return controller.IsItemChecked(browser_window_->browser()->profile(), - tab_contents->encoding(), + tab_contents->GetEncoding(), command_id); } return false; diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc index e840aac..5ad2b6b 100644 --- a/chrome/browser/ui/gtk/browser_window_gtk.cc +++ b/chrome/browser/ui/gtk/browser_window_gtk.cc @@ -1256,7 +1256,7 @@ void BrowserWindowGtk::ActiveTabChanged(TabContentsWrapper* old_contents, int index, bool user_gesture) { TRACE_EVENT0("ui::gtk", "BrowserWindowGtk::ActiveTabChanged"); - if (old_contents && !old_contents->tab_contents()->is_being_destroyed()) + if (old_contents && !old_contents->tab_contents()->IsBeingDestroyed()) old_contents->tab_contents()->GetView()->StoreFocus(); // Update various elements that are interested in knowing the current diff --git a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc index c29c73e..bdea30f 100644 --- a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc +++ b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc @@ -428,7 +428,7 @@ void DraggedTabControllerGtk::Attach(TabStripGtk* attached_tabstrip, } // Return the TabContents' to normalcy. - drag_data_->GetSourceTabContents()->set_capturing_contents(false); + drag_data_->GetSourceTabContents()->SetCapturingContents(false); // We need to ask the tabstrip we're attached to ensure that the ideal // bounds for all its tabs are correctly generated, because the calculation diff --git a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc index cee692e..403ab70 100644 --- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc +++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc @@ -332,7 +332,7 @@ void TabRendererGtk::UpdateData(TabContents* contents, if (!loading_only) { data_.title = contents->GetTitle(); data_.incognito = contents->GetBrowserContext()->IsOffTheRecord(); - data_.crashed = contents->is_crashed(); + data_.crashed = contents->IsCrashed(); SkBitmap* app_icon = TabContentsWrapper::GetCurrentWrapperForContents(contents)-> diff --git a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc index 4412a0e..1d00366 100644 --- a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc +++ b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc @@ -851,7 +851,7 @@ void TabStripGtk::UpdateLoadingAnimations() { TabContentsWrapper* contents = model_->GetTabContentsAt(index); if (!contents || !contents->tab_contents()->IsLoading()) { state = TabGtk::ANIMATION_NONE; - } else if (contents->tab_contents()->waiting_for_response()) { + } else if (contents->tab_contents()->IsWaitingForResponse()) { state = TabGtk::ANIMATION_WAITING; } else { state = TabGtk::ANIMATION_LOADING; diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.cc b/chrome/browser/ui/prefs/prefs_tab_helper.cc index 4d46814..010ead9 100644 --- a/chrome/browser/ui/prefs/prefs_tab_helper.cc +++ b/chrome/browser/ui/prefs/prefs_tab_helper.cc @@ -438,5 +438,5 @@ void PrefsTabHelper::UpdateRendererPreferences() { } Profile* PrefsTabHelper::GetProfile() { - return Profile::FromBrowserContext(contents_->browser_context()); + return Profile::FromBrowserContext(contents_->GetBrowserContext()); } diff --git a/chrome/browser/ui/sync/tab_contents_wrapper_synced_tab_delegate.cc b/chrome/browser/ui/sync/tab_contents_wrapper_synced_tab_delegate.cc index 4e9cee3..b8f9347 100644 --- a/chrome/browser/ui/sync/tab_contents_wrapper_synced_tab_delegate.cc +++ b/chrome/browser/ui/sync/tab_contents_wrapper_synced_tab_delegate.cc @@ -27,7 +27,7 @@ SessionID::id_type TabContentsWrapperSyncedTabDelegate::GetSessionId() const { } bool TabContentsWrapperSyncedTabDelegate::IsBeingDestroyed() const { - return tab_contents_wrapper_->tab_contents()->is_being_destroyed(); + return tab_contents_wrapper_->tab_contents()->IsBeingDestroyed(); } Profile* TabContentsWrapperSyncedTabDelegate::profile() const { diff --git a/chrome/browser/ui/tab_contents/core_tab_helper.cc b/chrome/browser/ui/tab_contents/core_tab_helper.cc index c08a420..10ecac5 100644 --- a/chrome/browser/ui/tab_contents/core_tab_helper.cc +++ b/chrome/browser/ui/tab_contents/core_tab_helper.cc @@ -26,14 +26,14 @@ string16 CoreTabHelper::GetDefaultTitle() { string16 CoreTabHelper::GetStatusText() const { if (!tab_contents()->IsLoading() || - tab_contents()->load_state().state == net::LOAD_STATE_IDLE) { + tab_contents()->GetLoadState().state == net::LOAD_STATE_IDLE) { return string16(); } - switch (tab_contents()->load_state().state) { + switch (tab_contents()->GetLoadState().state) { case net::LOAD_STATE_WAITING_FOR_DELEGATE: return l10n_util::GetStringFUTF16(IDS_LOAD_STATE_WAITING_FOR_DELEGATE, - tab_contents()->load_state().param); + tab_contents()->GetLoadState().param); case net::LOAD_STATE_WAITING_FOR_CACHE: return l10n_util::GetStringUTF16(IDS_LOAD_STATE_WAITING_FOR_CACHE); case net::LOAD_STATE_WAITING_FOR_APPCACHE: @@ -53,16 +53,17 @@ string16 CoreTabHelper::GetStatusText() const { case net::LOAD_STATE_SSL_HANDSHAKE: return l10n_util::GetStringUTF16(IDS_LOAD_STATE_SSL_HANDSHAKE); case net::LOAD_STATE_SENDING_REQUEST: - if (tab_contents()->upload_size()) + if (tab_contents()->GetUploadSize()) { return l10n_util::GetStringFUTF16Int( - IDS_LOAD_STATE_SENDING_REQUEST_WITH_PROGRESS, - static_cast<int>((100 * tab_contents()->upload_position()) / - tab_contents()->upload_size())); - else + IDS_LOAD_STATE_SENDING_REQUEST_WITH_PROGRESS, + static_cast<int>((100 * tab_contents()->GetUploadPosition()) / + tab_contents()->GetUploadSize())); + } else { return l10n_util::GetStringUTF16(IDS_LOAD_STATE_SENDING_REQUEST); + } case net::LOAD_STATE_WAITING_FOR_RESPONSE: return l10n_util::GetStringFUTF16(IDS_LOAD_STATE_WAITING_FOR_RESPONSE, - tab_contents()->load_state_host()); + tab_contents()->GetLoadStateHost()); // Ignore net::LOAD_STATE_READING_RESPONSE and net::LOAD_STATE_IDLE case net::LOAD_STATE_IDLE: case net::LOAD_STATE_READING_RESPONSE: diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc index 4b70d0e..743dbcf 100644 --- a/chrome/browser/ui/toolbar/wrench_menu_model.cc +++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc @@ -102,7 +102,7 @@ bool EncodingMenuModel::IsCommandIdChecked(int command_id) const { return false; EncodingMenuController controller; return controller.IsItemChecked(browser_->profile(), - current_tab->encoding(), command_id); + current_tab->GetEncoding(), command_id); } bool EncodingMenuModel::IsCommandIdEnabled(int command_id) const { diff --git a/chrome/browser/ui/views/aura/app_list_window.cc b/chrome/browser/ui/views/aura/app_list_window.cc index 1b3f9a0..b0ca34e 100644 --- a/chrome/browser/ui/views/aura/app_list_window.cc +++ b/chrome/browser/ui/views/aura/app_list_window.cc @@ -99,7 +99,7 @@ void AppListWindow::Init(const gfx::Rect& bounds) { tab->SetDelegate(this); contents_->LoadURL(GURL(chrome::kChromeUIAppListURL)); - static_cast<AppListUI*>(tab->web_ui())->set_delegate(this); + static_cast<AppListUI*>(tab->GetWebUI())->set_delegate(this); // Use a background with transparency to trigger transparent webkit. SkBitmap background; diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc index 91f1463..2135353 100644 --- a/chrome/browser/ui/views/frame/browser_view.cc +++ b/chrome/browser/ui/views/frame/browser_view.cc @@ -1433,7 +1433,7 @@ void BrowserView::TabDeactivated(TabContentsWrapper* contents) { // We do not store the focus when closing the tab to work-around bug 4633. // Some reports seem to show that the focus manager and/or focused view can // be garbage at that point, it is not clear why. - if (!contents->tab_contents()->is_being_destroyed()) + if (!contents->tab_contents()->IsBeingDestroyed()) contents->tab_contents()->GetView()->StoreFocus(); } diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_aura.cc b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_aura.cc index 088b1dd..9d0e980 100644 --- a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_aura.cc +++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_aura.cc @@ -91,7 +91,7 @@ bool NativeTabContentsContainerAura::SkipDefaultKeyEventProcessing( // not process them, they'll be returned to us and we'll treat them as // accelerators then. return container_->tab_contents() && - !container_->tab_contents()->is_crashed(); + !container_->tab_contents()->IsCrashed(); } bool NativeTabContentsContainerAura::IsFocusable() const { diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk.cc b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk.cc index 3a5c73d..5c77118 100644 --- a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk.cc +++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk.cc @@ -90,7 +90,7 @@ bool NativeTabContentsContainerGtk::SkipDefaultKeyEventProcessing( // not process them, they'll be returned to us and we'll treat them as // accelerators then. return container_->tab_contents() && - !container_->tab_contents()->is_crashed(); + !container_->tab_contents()->IsCrashed(); } views::FocusTraversable* NativeTabContentsContainerGtk::GetFocusTraversable() { diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.cc b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.cc index b2f7f00..b369320 100644 --- a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.cc +++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.cc @@ -102,7 +102,7 @@ bool NativeTabContentsContainerWin::SkipDefaultKeyEventProcessing( // not process them, they'll be returned to us and we'll treat them as // accelerators then. return container_->tab_contents() && - !container_->tab_contents()->is_crashed(); + !container_->tab_contents()->IsCrashed(); } bool NativeTabContentsContainerWin::IsFocusable() const { diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc b/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc index 2711aef..864d661 100644 --- a/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc +++ b/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc @@ -121,7 +121,7 @@ void TabContentsDragWin::StartDragging(const WebDropData& drop_data, view_->GetTabContents()); const GURL& page_url = view_->GetTabContents()->GetURL(); - const std::string& page_encoding = view_->GetTabContents()->encoding(); + const std::string& page_encoding = view_->GetTabContents()->GetEncoding(); // If it is not drag-out, do the drag-and-drop in the current UI thread. if (drop_data.download_metadata.empty()) { diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc b/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc index 0eda633..659df88 100644 --- a/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc +++ b/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc @@ -375,7 +375,7 @@ TabContents* TabContentsViewViews::GetTabContents() { } bool TabContentsViewViews::IsShowingSadTab() const { - return tab_contents_->is_crashed() && overlaid_view_; + return tab_contents_->IsCrashed() && overlaid_view_; } void TabContentsViewViews::OnNativeTabContentsViewShown() { diff --git a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc index 5758df3..203623c 100644 --- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc +++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc @@ -33,7 +33,7 @@ static TabRendererData::NetworkState TabContentsNetworkState( TabContents* contents) { if (!contents || !contents->IsLoading()) return TabRendererData::NETWORK_STATE_NONE; - if (contents->waiting_for_response()) + if (contents->IsWaitingForResponse()) return TabRendererData::NETWORK_STATE_WAITING; return TabRendererData::NETWORK_STATE_LOADING; } @@ -437,7 +437,7 @@ void BrowserTabStripController::SetTabRendererDataFromModel( data->title = contents->GetTitle(); data->url = contents->GetURL(); data->loading = contents->IsLoading(); - data->crashed_status = contents->crashed_status(); + data->crashed_status = contents->GetCrashedStatus(); data->incognito = contents->GetBrowserContext()->IsOffTheRecord(); data->show_icon = wrapper->favicon_tab_helper()->ShouldDisplayFavicon(); data->mini = model_->IsMiniTab(model_index); diff --git a/chrome/browser/ui/views/tabs/default_tab_drag_controller.cc b/chrome/browser/ui/views/tabs/default_tab_drag_controller.cc index 7262925..132e17d 100644 --- a/chrome/browser/ui/views/tabs/default_tab_drag_controller.cc +++ b/chrome/browser/ui/views/tabs/default_tab_drag_controller.cc @@ -841,7 +841,7 @@ void DefaultTabDragController::Attach(TabStrip* attached_tabstrip, } // Return the TabContents' to normalcy. - source_dragged_contents()->tab_contents()->set_capturing_contents(false); + source_dragged_contents()->tab_contents()->SetCapturingContents(false); // Inserting counts as a move. We don't want the tabs to jitter when the // user moves the tab immediately after attaching it. @@ -896,7 +896,7 @@ void DefaultTabDragController::Attach(TabStrip* attached_tabstrip, void DefaultTabDragController::Detach() { // Prevent the TabContents' HWND from being hidden by any of the model // operations performed during the drag. - source_dragged_contents()->tab_contents()->set_capturing_contents(true); + source_dragged_contents()->tab_contents()->SetCapturingContents(true); // Calculate the drag bounds. std::vector<gfx::Rect> drag_bounds; diff --git a/chrome/browser/ui/webui/chromeos/imageburner/imageburner_utils.cc b/chrome/browser/ui/webui/chromeos/imageburner/imageburner_utils.cc index 15ce2bb..421006a 100644 --- a/chrome/browser/ui/webui/chromeos/imageburner/imageburner_utils.cc +++ b/chrome/browser/ui/webui/chromeos/imageburner/imageburner_utils.cc @@ -445,7 +445,7 @@ void Downloader::OnFileStreamCreatedOnUIThread(const GURL& url, DownloadStarted(true, url); download_manager->DownloadUrlToFile(url, tab_contents->GetURL(), - tab_contents->encoding(), + tab_contents->GetEncoding(), save_info, tab_contents); } else { diff --git a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc index c6963bc..5e7ffe48 100644 --- a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc +++ b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc @@ -1378,5 +1378,5 @@ MobileSetupUI::MobileSetupUI(TabContents* contents) : ChromeWebUI(contents) { void MobileSetupUI::RenderViewCreated(RenderViewHost* host) { ChromeWebUI::RenderViewCreated(host); // Destroyed by the corresponding RenderViewHost. - new PortalFrameLoadObserver(host, tab_contents()->web_ui()); + new PortalFrameLoadObserver(host, tab_contents()->GetWebUI()); } diff --git a/chrome/browser/ui/webui/cloud_print_signin_dialog.cc b/chrome/browser/ui/webui/cloud_print_signin_dialog.cc index 5742e18..7b24455 100644 --- a/chrome/browser/ui/webui/cloud_print_signin_dialog.cc +++ b/chrome/browser/ui/webui/cloud_print_signin_dialog.cc @@ -85,7 +85,7 @@ void CloudPrintSigninFlowHandler::Observe( StoreDialogSize(); web_ui_->tab_contents()->GetRenderViewHost()->ClosePage(); static_cast<PrintPreviewUI*>( - parent_tab_->web_ui())->OnReloadPrintersList(); + parent_tab_->GetWebUI())->OnReloadPrintersList(); } } } diff --git a/chrome/browser/ui/webui/html_dialog_tab_contents_delegate.cc b/chrome/browser/ui/webui/html_dialog_tab_contents_delegate.cc index c608471..dccdf0d 100644 --- a/chrome/browser/ui/webui/html_dialog_tab_contents_delegate.cc +++ b/chrome/browser/ui/webui/html_dialog_tab_contents_delegate.cc @@ -37,7 +37,7 @@ TabContents* HtmlDialogTabContentsDelegate::OpenURLFromTab( browser::NavigateParams nav_params(browser, params.url, params.transition); nav_params.profile = profile_; nav_params.referrer = params.referrer; - if (source && source->is_crashed() && + if (source && source->IsCrashed() && params.disposition == CURRENT_TAB && params.transition == content::PAGE_TRANSITION_LINK) nav_params.disposition = NEW_FOREGROUND_TAB; diff --git a/chrome/browser/ui/webui/print_preview_handler_unittest.cc b/chrome/browser/ui/webui/print_preview_handler_unittest.cc index e21cff6b..eab7637 100644 --- a/chrome/browser/ui/webui/print_preview_handler_unittest.cc +++ b/chrome/browser/ui/webui/print_preview_handler_unittest.cc @@ -70,7 +70,7 @@ class PrintPreviewHandlerTest : public BrowserWithTestWindowTest { ASSERT_TRUE(preview_tab_); preview_ui_ = - static_cast<PrintPreviewUI*>(preview_tab_->tab_contents()->web_ui()); + static_cast<PrintPreviewUI*>(preview_tab_->tab_contents()->GetWebUI()); ASSERT_TRUE(preview_ui_); } diff --git a/chrome/browser/ui/webui/print_preview_ui.cc b/chrome/browser/ui/webui/print_preview_ui.cc index 543af45..49d8010 100644 --- a/chrome/browser/ui/webui/print_preview_ui.cc +++ b/chrome/browser/ui/webui/print_preview_ui.cc @@ -135,10 +135,10 @@ void PrintPreviewUI::SetInitiatorTabURLAndTitle( void PrintPreviewUI::SetSourceIsModifiable( TabContentsWrapper* print_preview_tab, bool source_is_modifiable) { - if (!print_preview_tab || !print_preview_tab->tab_contents()->web_ui()) + if (!print_preview_tab || !print_preview_tab->tab_contents()->GetWebUI()) return; - PrintPreviewUI* print_preview_ui = - static_cast<PrintPreviewUI*>(print_preview_tab->tab_contents()->web_ui()); + PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>( + print_preview_tab->tab_contents()->GetWebUI()); print_preview_ui->source_is_modifiable_ = source_is_modifiable; } diff --git a/chrome/browser/ui/webui/print_preview_ui_unittest.cc b/chrome/browser/ui/webui/print_preview_ui_unittest.cc index 861d858..400b4a6 100644 --- a/chrome/browser/ui/webui/print_preview_ui_unittest.cc +++ b/chrome/browser/ui/webui/print_preview_ui_unittest.cc @@ -56,8 +56,8 @@ TEST_F(PrintPreviewUIUnitTest, PrintPreviewData) { EXPECT_EQ(1, browser()->tab_count()); EXPECT_EQ(1U, GetConstrainedWindowCount(initiator_tab)); - PrintPreviewUI* preview_ui = - reinterpret_cast<PrintPreviewUI*>(preview_tab->tab_contents()->web_ui()); + PrintPreviewUI* preview_ui = reinterpret_cast<PrintPreviewUI*>( + preview_tab->tab_contents()->GetWebUI()); ASSERT_TRUE(preview_ui != NULL); scoped_refptr<RefCountedBytes> data; @@ -118,8 +118,8 @@ TEST_F(PrintPreviewUIUnitTest, PrintPreviewDraftPages) { EXPECT_EQ(1, browser()->tab_count()); EXPECT_EQ(1U, GetConstrainedWindowCount(initiator_tab)); - PrintPreviewUI* preview_ui = - reinterpret_cast<PrintPreviewUI*>(preview_tab->tab_contents()->web_ui()); + PrintPreviewUI* preview_ui = reinterpret_cast<PrintPreviewUI*>( + preview_tab->tab_contents()->GetWebUI()); ASSERT_TRUE(preview_ui != NULL); scoped_refptr<RefCountedBytes> data; @@ -187,8 +187,8 @@ TEST_F(PrintPreviewUIUnitTest, GetCurrentPrintPreviewStatus) { EXPECT_EQ(1, browser()->tab_count()); EXPECT_EQ(1U, GetConstrainedWindowCount(initiator_tab)); - PrintPreviewUI* preview_ui = - reinterpret_cast<PrintPreviewUI*>(preview_tab->tab_contents()->web_ui()); + PrintPreviewUI* preview_ui = reinterpret_cast<PrintPreviewUI*>( + preview_tab->tab_contents()->GetWebUI()); ASSERT_TRUE(preview_ui != NULL); // Test with invalid |preview_ui_addr|. diff --git a/chrome/browser/ui/webui/web_ui_browsertest.cc b/chrome/browser/ui/webui/web_ui_browsertest.cc index e7cdc64..d94e5b7 100644 --- a/chrome/browser/ui/webui/web_ui_browsertest.cc +++ b/chrome/browser/ui/webui/web_ui_browsertest.cc @@ -209,7 +209,7 @@ void WebUIBrowserTest::BrowsePrintPreload(const GURL& browse_to) { TabContentsWrapper* preview_tab = tab_controller->GetPrintPreviewForTab( browser()->GetSelectedTabContentsWrapper()); ASSERT_TRUE(preview_tab); - SetWebUIInstance(preview_tab->tab_contents()->web_ui()); + SetWebUIInstance(preview_tab->tab_contents()->GetWebUI()); } const char WebUIBrowserTest::kDummyURL[] = "chrome://DummyURL"; @@ -405,7 +405,7 @@ bool WebUIBrowserTest::RunJavascriptUsingHandler( void WebUIBrowserTest::SetupHandlers() { WebUI* web_ui_instance = override_selected_web_ui_ ? override_selected_web_ui_ : - browser()->GetSelectedTabContents()->web_ui(); + browser()->GetSelectedTabContents()->GetWebUI(); ASSERT_TRUE(web_ui_instance != NULL); web_ui_instance->set_register_callback_overwrites(true); test_handler_->Attach(web_ui_instance); diff --git a/chrome/browser/ui/webui/web_ui_unittest.cc b/chrome/browser/ui/webui/web_ui_unittest.cc index dc78455..33f8e7f 100644 --- a/chrome/browser/ui/webui/web_ui_unittest.cc +++ b/chrome/browser/ui/webui/web_ui_unittest.cc @@ -66,9 +66,9 @@ class WebUITest : public TabContentsWrapperTestHarness { // process transition, and our RVH pointer will be the "committed" one. // In the second call to this function from WebUIToStandard, it won't // actually be pending, which is the point of this test. - if (contents->render_manager_for_testing()->pending_render_view_host()) { + if (contents->GetRenderManagerForTesting()->pending_render_view_host()) { static_cast<TestRenderViewHost*>( - contents->render_manager_for_testing()-> + contents->GetRenderManagerForTesting()-> pending_render_view_host())->SendNavigate(page_id + 1, next_url); } else { static_cast<TestRenderViewHost*>( diff --git a/chrome/test/base/browser_with_test_window_test.cc b/chrome/test/base/browser_with_test_window_test.cc index ec8b2c0..80bb90c 100644 --- a/chrome/test/base/browser_with_test_window_test.cc +++ b/chrome/test/base/browser_with_test_window_test.cc @@ -78,7 +78,7 @@ void BrowserWithTestWindowTest::CommitPendingLoad( TestRenderViewHostForTab(controller->tab_contents()); TestRenderViewHost* pending_rvh = static_cast<TestRenderViewHost*>( - controller->tab_contents()->render_manager_for_testing()-> + controller->tab_contents()->GetRenderManagerForTesting()-> pending_render_view_host()); if (pending_rvh) { // Simulate the ShouldClose_ACK that is received from the current renderer |