From 69cda6547de3c2bc25e6476607e7550ba548cac9 Mon Sep 17 00:00:00 2001 From: "jam@chromium.org" Date: Wed, 21 Dec 2011 05:09:04 +0000 Subject: Rename TabContents::controller() to GetController and put it into the WebContents namespace. BUG=98716 TBR=dpranke Review URL: http://codereview.chromium.org/8956050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115276 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/sessions/session_restore.cc | 10 +++++----- chrome/browser/sessions/session_service.cc | 16 ++++++++-------- chrome/browser/sessions/tab_restore_service.cc | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) (limited to 'chrome/browser/sessions') diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc index 0931ae0..fefce53 100644 --- a/chrome/browser/sessions/session_restore.cc +++ b/chrome/browser/sessions/session_restore.cc @@ -252,10 +252,10 @@ void TabLoader::Observe(int type, TabContents* tab_contents = content::Source(source).ptr(); if (!got_first_paint_) { RenderWidgetHost* render_widget_host = - GetRenderWidgetHost(&tab_contents->controller()); + GetRenderWidgetHost(&tab_contents->GetController()); render_widget_hosts_loading_.erase(render_widget_host); } - HandleTabClosedOrLoaded(&tab_contents->controller()); + HandleTabClosedOrLoaded(&tab_contents->GetController()); break; } case content::NOTIFICATION_LOAD_STOP: { @@ -468,7 +468,7 @@ class SessionRestoreImpl : public content::NotificationObserver { RestoreTabsToBrowser(*(*i), browser, selected_tab_index); ShowBrowser(browser, initial_tab_count, selected_tab_index); tab_loader_->TabIsLoading( - &browser->GetSelectedTabContents()->controller()); + &browser->GetSelectedTabContents()->GetController()); NotifySessionServiceOfRestoredTabs(browser, initial_tab_count); } @@ -661,7 +661,7 @@ class SessionRestoreImpl : public content::NotificationObserver { active_tab = NULL; } tab_loader_->TabIsLoading( - &browser->GetSelectedTabContents()->controller()); + &browser->GetSelectedTabContents()->GetController()); NotifySessionServiceOfRestoredTabs(browser, initial_tab_count); } @@ -730,7 +730,7 @@ class SessionRestoreImpl : public content::NotificationObserver { true, NULL); if (schedule_load) - tab_loader_->ScheduleLoad(&tab_contents->controller()); + tab_loader_->ScheduleLoad(&tab_contents->GetController()); } Browser* CreateRestoredBrowser(Browser::Type type, diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc index e60d30e..93f2ad1 100644 --- a/chrome/browser/sessions/session_service.cc +++ b/chrome/browser/sessions/session_service.cc @@ -560,7 +560,7 @@ void SessionService::Observe(int type, TabNavigationPathPrunedFromBack( tab->restore_tab_helper()->window_id(), tab->restore_tab_helper()->session_id(), - tab->tab_contents()->controller().entry_count()); + tab->tab_contents()->GetController().entry_count()); } RecordSessionUpdateHistogramData(content::NOTIFICATION_NAV_LIST_PRUNED, &last_updated_nav_list_pruned_time_); @@ -590,7 +590,7 @@ void SessionService::Observe(int type, if (!tab || tab->profile() != profile()) return; int current_entry_index = - tab->tab_contents()->controller().GetCurrentEntryIndex(); + tab->tab_contents()->GetController().GetCurrentEntryIndex(); SetSelectedNavigationIndex(tab->restore_tab_helper()->window_id(), tab->restore_tab_helper()->session_id(), current_entry_index); @@ -598,7 +598,7 @@ void SessionService::Observe(int type, tab->restore_tab_helper()->window_id(), tab->restore_tab_helper()->session_id(), current_entry_index, - *tab->tab_contents()->controller().GetEntryAtIndex( + *tab->tab_contents()->GetController().GetEntryAtIndex( current_entry_index)); content::Details changed(details); if (changed->type == content::NAVIGATION_TYPE_NEW_PAGE || @@ -1114,14 +1114,14 @@ void SessionService::BuildCommandsForTab( const SessionID& session_id(tab->restore_tab_helper()->session_id()); commands->push_back(CreateSetTabWindowCommand(window_id, session_id)); const int current_index = - tab->tab_contents()->controller().GetCurrentEntryIndex(); + tab->tab_contents()->GetController().GetCurrentEntryIndex(); const int min_index = std::max(0, current_index - max_persist_navigation_count); const int max_index = std::min(current_index + max_persist_navigation_count, - tab->tab_contents()->controller().entry_count()); + tab->tab_contents()->GetController().entry_count()); const int pending_index = - tab->tab_contents()->controller().pending_entry_index(); + tab->tab_contents()->GetController().pending_entry_index(); if (tab_to_available_range) { (*tab_to_available_range)[session_id.id()] = std::pair(min_index, max_index); @@ -1139,8 +1139,8 @@ void SessionService::BuildCommandsForTab( } for (int i = min_index; i < max_index; ++i) { const NavigationEntry* entry = (i == pending_index) ? - tab->tab_contents()->controller().pending_entry() : - tab->tab_contents()->controller().GetEntryAtIndex(i); + tab->tab_contents()->GetController().pending_entry() : + tab->tab_contents()->GetController().GetEntryAtIndex(i); DCHECK(entry); if (ShouldTrackEntry(entry->virtual_url())) { commands->push_back( diff --git a/chrome/browser/sessions/tab_restore_service.cc b/chrome/browser/sessions/tab_restore_service.cc index 3fb872a..1582c88 100644 --- a/chrome/browser/sessions/tab_restore_service.cc +++ b/chrome/browser/sessions/tab_restore_service.cc @@ -250,7 +250,7 @@ void TabRestoreService::BrowserClosing(TabRestoreServiceDelegate* delegate) { PopulateTab(&(window->tabs[entry_index]), tab_index, delegate, - &delegate->GetTabContentsAt(tab_index)->controller()); + &delegate->GetTabContentsAt(tab_index)->GetController()); if (window->tabs[entry_index].navigations.empty()) { window->tabs.erase(window->tabs.begin() + entry_index); } else { @@ -361,7 +361,7 @@ void TabRestoreService::RestoreEntryById(TabRestoreServiceDelegate* delegate, tab.pinned, tab.from_last_session, tab.session_storage_namespace); if (restored_tab) { - restored_tab->controller().LoadIfNecessary(); + restored_tab->GetController().LoadIfNecessary(); RecordAppLaunch(profile(), tab); } } -- cgit v1.1