diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-12 13:51:27 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-12 13:51:27 +0000 |
commit | c084925c810975c3050e512c2f4f237d14242f01 (patch) | |
tree | 1ec0edb28afdb4717b5f3ea926425ef9658359ed | |
parent | aaacb7ce2b2c5bc57393fc863fd8b5e0d2ec5473 (diff) | |
download | chromium_src-c084925c810975c3050e512c2f4f237d14242f01.zip chromium_src-c084925c810975c3050e512c2f4f237d14242f01.tar.gz chromium_src-c084925c810975c3050e512c2f4f237d14242f01.tar.bz2 |
browser: Rename Browser::tabstrip_model to Browser::tab_strip_model.
This was a TODO for me in browser.h
R=ben@chromium.org
TBR=thestig@chromium.org,sky@chromium.org,tim@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10388101
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136769 0039d316-1c4b-4281-b951-d872f2087c98
46 files changed, 161 insertions, 162 deletions
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc index 051e773..155be19 100644 --- a/chrome/browser/automation/automation_provider_observers.cc +++ b/chrome/browser/automation/automation_provider_observers.cc @@ -461,7 +461,7 @@ TabCountChangeObserver::TabCountChangeObserver(AutomationProvider* automation, int target_tab_count) : automation_(automation->AsWeakPtr()), reply_message_(reply_message), - tab_strip_model_(browser->tabstrip_model()), + tab_strip_model_(browser->tab_strip_model()), target_tab_count_(target_tab_count) { tab_strip_model_->AddObserver(this); CheckTabCount(); diff --git a/chrome/browser/browser_focus_uitest.cc b/chrome/browser/browser_focus_uitest.cc index 24e9a3d..b98f208 100644 --- a/chrome/browser/browser_focus_uitest.cc +++ b/chrome/browser/browser_focus_uitest.cc @@ -271,7 +271,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, DISABLED_BrowsersRememberFocus) { // Open a new browser window. Browser* browser2 = Browser::Create(browser()->profile()); ASSERT_TRUE(browser2); - browser2->tabstrip_model()->delegate()->AddBlankTab(true); + browser2->tab_strip_model()->delegate()->AddBlankTab(true); browser2->window()->Show(); ui_test_utils::NavigateToURL(browser2, url); @@ -423,7 +423,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, // Open a new browser window. Browser* browser2 = Browser::Create(browser()->profile()); ASSERT_TRUE(browser2); - browser2->tabstrip_model()->delegate()->AddBlankTab(true); + browser2->tab_strip_model()->delegate()->AddBlankTab(true); browser2->window()->Show(); Browser* focused_browser = NULL; diff --git a/chrome/browser/chromeos/extensions/file_manager_util.cc b/chrome/browser/chromeos/extensions/file_manager_util.cc index 7c8b014..82deab2 100644 --- a/chrome/browser/chromeos/extensions/file_manager_util.cc +++ b/chrome/browser/chromeos/extensions/file_manager_util.cc @@ -410,7 +410,7 @@ bool FileManageTabExists(const FilePath& path, TAB_REUSE_MODE mode) { for (BrowserList::const_iterator browser_iterator = BrowserList::begin(); browser_iterator != BrowserList::end(); ++browser_iterator) { Browser* browser = *browser_iterator; - TabStripModel* tab_strip = browser->tabstrip_model(); + TabStripModel* tab_strip = browser->tab_strip_model(); for (int idx = 0; idx < tab_strip->count(); idx++) { content::WebContents* web_contents = tab_strip->GetTabContentsAt(idx)->web_contents(); diff --git a/chrome/browser/chromeos/oom_priority_manager.cc b/chrome/browser/chromeos/oom_priority_manager.cc index c2e241b..d17e1e9 100644 --- a/chrome/browser/chromeos/oom_priority_manager.cc +++ b/chrome/browser/chromeos/oom_priority_manager.cc @@ -224,7 +224,7 @@ bool OomPriorityManager::DiscardTabById(int64 target_web_contents_id) { for (BrowserList::const_iterator browser_iterator = BrowserList::begin(); browser_iterator != BrowserList::end(); ++browser_iterator) { Browser* browser = *browser_iterator; - TabStripModel* model = browser->tabstrip_model(); + TabStripModel* model = browser->tab_strip_model(); for (int idx = 0; idx < model->count(); idx++) { // Can't discard tabs that are already discarded. if (model->IsTabDiscarded(idx)) @@ -294,7 +294,7 @@ int OomPriorityManager::GetTabCount() const { for (BrowserList::const_iterator browser_it = BrowserList::begin(); browser_it != BrowserList::end(); ++browser_it) { Browser* browser = *browser_it; - tab_count += browser->tabstrip_model()->count(); + tab_count += browser->tab_strip_model()->count(); } return tab_count; } @@ -429,7 +429,7 @@ OomPriorityManager::TabStatsList OomPriorityManager::GetTabStatsOnUIThread() { for (BrowserList::const_iterator browser_iterator = BrowserList::begin(); browser_iterator != BrowserList::end(); ++browser_iterator) { Browser* browser = *browser_iterator; - const TabStripModel* model = browser->tabstrip_model(); + const TabStripModel* model = browser->tab_strip_model(); for (int i = 0; i < model->count(); i++) { WebContents* contents = model->GetTabContentsAt(i)->web_contents(); if (!contents->IsCrashed()) { diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc index 88652fe..6a104ff 100644 --- a/chrome/browser/debugger/devtools_window.cc +++ b/chrome/browser/debugger/devtools_window.cc @@ -288,8 +288,8 @@ void DevToolsWindow::Show(DevToolsToggleAction action) { inspected_window->UpdateDevTools(); tab_contents_->web_contents()->GetView()->SetInitialFocus(); inspected_window->Show(); - TabStripModel* tabstrip_model = inspected_browser->tabstrip_model(); - tabstrip_model->ActivateTabAt(inspected_tab_index, true); + TabStripModel* tab_strip_model = inspected_browser->tab_strip_model(); + tab_strip_model->ActivateTabAt(inspected_tab_index, true); ScheduleAction(action); return; } else { @@ -334,9 +334,9 @@ void DevToolsWindow::RequestSetDocked(bool docked) { if (docked) { // Detach window from the external devtools browser. It will lead to // the browser object's close and delete. Remove observer first. - TabStripModel* tabstrip_model = browser_->tabstrip_model(); - tabstrip_model->DetachTabContentsAt( - tabstrip_model->GetIndexOfTabContents(tab_contents_)); + TabStripModel* tab_strip_model = browser_->tab_strip_model(); + tab_strip_model->DetachTabContentsAt( + tab_strip_model->GetIndexOfTabContents(tab_contents_)); browser_ = NULL; } else { // Update inspected window to hide split and reset it. @@ -379,7 +379,7 @@ void DevToolsWindow::CreateDevToolsBrowser() { browser_ = Browser::CreateWithParams( Browser::CreateParams::CreateForDevTools(profile_)); - browser_->tabstrip_model()->AddTabContents( + browser_->tab_strip_model()->AddTabContents( tab_contents_, -1, content::PAGE_TRANSITION_START_PAGE, TabStripModel::ADD_ACTIVE); } diff --git a/chrome/browser/extensions/extension_browser_event_router.cc b/chrome/browser/extensions/extension_browser_event_router.cc index 5e1a2bbe..d39810e 100644 --- a/chrome/browser/extensions/extension_browser_event_router.cc +++ b/chrome/browser/extensions/extension_browser_event_router.cc @@ -96,8 +96,8 @@ void ExtensionBrowserEventRouter::Init(ExtensionToolbarModel* model) { // Also catch up our internal bookkeeping of tab entries. Browser* browser = *iter; - if (browser->tabstrip_model()) { - for (int i = 0; i < browser->tabstrip_model()->count(); ++i) { + if (browser->tab_strip_model()) { + for (int i = 0; i < browser->tab_strip_model()->count(); ++i) { WebContents* contents = browser->GetTabContentsWrapperAt(i)->web_contents(); int tab_id = ExtensionTabUtil::GetTabId(contents); @@ -135,7 +135,7 @@ void ExtensionBrowserEventRouter::RegisterForBrowserNotifications( if (!profile_->IsSameProfile(browser->profile())) return; // Start listening to TabStripModel events for this browser. - browser->tabstrip_model()->AddObserver(this); + browser->tab_strip_model()->AddObserver(this); // If this is a new window, it isn't ready at this point, so we register to be // notified when it is. If this is an existing window, this is a no-op that we @@ -143,7 +143,7 @@ void ExtensionBrowserEventRouter::RegisterForBrowserNotifications( registrar_.Add(this, chrome::NOTIFICATION_BROWSER_WINDOW_READY, content::Source<const Browser>(browser)); - for (int i = 0; i < browser->tabstrip_model()->count(); ++i) { + for (int i = 0; i < browser->tab_strip_model()->count(); ++i) { RegisterForTabNotifications( browser->GetTabContentsWrapperAt(i)->web_contents()); } @@ -190,7 +190,7 @@ void ExtensionBrowserEventRouter::OnBrowserRemoved(const Browser* browser) { return; // Stop listening to TabStripModel events for this browser. - browser->tabstrip_model()->RemoveObserver(this); + browser->tab_strip_model()->RemoveObserver(this); registrar_.Remove(this, chrome::NOTIFICATION_BROWSER_WINDOW_READY, content::Source<const Browser>(browser)); diff --git a/chrome/browser/extensions/extension_browsertests_misc.cc b/chrome/browser/extensions/extension_browsertests_misc.cc index 542f029..29bcf42 100644 --- a/chrome/browser/extensions/extension_browsertests_misc.cc +++ b/chrome/browser/extensions/extension_browsertests_misc.cc @@ -913,7 +913,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, DISABLED_OptionsPage) { // Go to the Extension Settings page and click the Options button. ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIExtensionsURL)); - TabStripModel* tab_strip = browser()->tabstrip_model(); + TabStripModel* tab_strip = browser()->tab_strip_model(); ASSERT_TRUE(ui_test_utils::ExecuteJavaScript( browser()->GetSelectedWebContents()->GetRenderViewHost(), L"", jscript_click_option_button)); diff --git a/chrome/browser/extensions/extension_cookies_helpers.cc b/chrome/browser/extensions/extension_cookies_helpers.cc index 1edce88..85fec56 100644 --- a/chrome/browser/extensions/extension_cookies_helpers.cc +++ b/chrome/browser/extensions/extension_cookies_helpers.cc @@ -134,7 +134,7 @@ void AppendMatchingCookiesToList( void AppendToTabIdList(Browser* browser, ListValue* tab_ids) { DCHECK(browser); DCHECK(tab_ids); - TabStripModel* tab_strip = browser->tabstrip_model(); + TabStripModel* tab_strip = browser->tab_strip_model(); for (int i = 0; i < tab_strip->count(); ++i) { tab_ids->Append(Value::CreateIntegerValue( ExtensionTabUtil::GetTabId( diff --git a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc index 43fe195..3e69eb0 100644 --- a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc +++ b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc @@ -458,7 +458,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest, MAYBE_CrashAndUnloadAll) { // Regression test for issue 71629. IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest, ReloadTabsWithBackgroundPage) { - TabStripModel* tab_strip = browser()->tabstrip_model(); + TabStripModel* tab_strip = browser()->tab_strip_model(); const size_t size_before = GetExtensionService()->extensions()->size(); const size_t crash_size_before = GetExtensionService()->terminated_extensions()->size(); diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc index 7bbf9a9..ba6a778 100644 --- a/chrome/browser/extensions/extension_tab_util.cc +++ b/chrome/browser/extensions/extension_tab_util.cc @@ -35,7 +35,7 @@ int ExtensionTabUtil::GetWindowIdOfTabStripModel( const TabStripModel* tab_strip_model) { for (BrowserList::const_iterator it = BrowserList::begin(); it != BrowserList::end(); ++it) { - if ((*it)->tabstrip_model() == tab_strip_model) + if ((*it)->tab_strip_model() == tab_strip_model) return GetWindowId(*it); } return -1; @@ -72,7 +72,7 @@ DictionaryValue* ExtensionTabUtil::CreateTabValue(const WebContents* contents) { ListValue* ExtensionTabUtil::CreateTabList(const Browser* browser) { ListValue* tab_list = new ListValue(); - TabStripModel* tab_strip = browser->tabstrip_model(); + TabStripModel* tab_strip = browser->tab_strip_model(); for (int i = 0; i < tab_strip->count(); ++i) { tab_list->Append(ExtensionTabUtil::CreateTabValue( tab_strip->GetTabContentsAt(i)->web_contents(), tab_strip, i)); @@ -141,7 +141,7 @@ bool ExtensionTabUtil::GetTabStripModel(const WebContents* web_contents, for (BrowserList::const_iterator it = BrowserList::begin(); it != BrowserList::end(); ++it) { - TabStripModel* tab_strip = (*it)->tabstrip_model(); + TabStripModel* tab_strip = (*it)->tab_strip_model(); int index = tab_strip->GetWrapperIndex(web_contents); if (index != -1) { *tab_strip_model = tab_strip; @@ -184,7 +184,7 @@ bool ExtensionTabUtil::GetTabById(int tab_id, Browser* target_browser = *iter; if (target_browser->profile() == profile || target_browser->profile() == incognito_profile) { - TabStripModel* target_tab_strip = target_browser->tabstrip_model(); + TabStripModel* target_tab_strip = target_browser->tab_strip_model(); for (int i = 0; i < target_tab_strip->count(); ++i) { TabContentsWrapper* target_contents = target_tab_strip->GetTabContentsAt(i); diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc index fd8026b..66846fd 100644 --- a/chrome/browser/extensions/extension_tabs_module.cc +++ b/chrome/browser/extensions/extension_tabs_module.cc @@ -624,7 +624,7 @@ bool CreateWindowFunction::RunImpl() { tab->extension_tab_helper()->SetExtensionAppIconById(extension_id); } if (contents) { - TabStripModel* target_tab_strip = new_window->tabstrip_model(); + TabStripModel* target_tab_strip = new_window->tab_strip_model(); target_tab_strip->InsertTabContentsAt(urls.size(), contents, TabStripModel::ADD_NONE); } else if (urls.empty()) { @@ -819,7 +819,7 @@ bool GetSelectedTabFunction::RunImpl() { if (!GetBrowserFromWindowID(this, window_id, &browser)) return false; - TabStripModel* tab_strip = browser->tabstrip_model(); + TabStripModel* tab_strip = browser->tab_strip_model(); TabContentsWrapper* contents = tab_strip->GetActiveTabContents(); if (!contents) { error_ = keys::kNoSelectedTabError; @@ -925,7 +925,7 @@ bool QueryTabsFunction::RunImpl() { (*browser)->extension_window_controller()->GetWindowTypeText()) continue; - TabStripModel* tab_strip = (*browser)->tabstrip_model(); + TabStripModel* tab_strip = (*browser)->tab_strip_model(); for (int i = 0; i < tab_strip->count(); ++i) { const WebContents* web_contents = tab_strip->GetTabContentsAt(i)->web_contents(); @@ -1061,7 +1061,7 @@ bool CreateTabFunction::RunImpl() { if (args->HasKey(keys::kIndexKey)) EXTENSION_FUNCTION_VALIDATE(args->GetInteger(keys::kIndexKey, &index)); - TabStripModel* tab_strip = browser->tabstrip_model(); + TabStripModel* tab_strip = browser->tab_strip_model(); index = std::min(std::max(index, -1), tab_strip->count()); @@ -1078,7 +1078,7 @@ bool CreateTabFunction::RunImpl() { // The tab may have been created in a different window, so make sure we look // at the right tab strip. - tab_strip = params.browser->tabstrip_model(); + tab_strip = params.browser->tab_strip_model(); int new_index = tab_strip->GetIndexOfTabContents(params.target_contents); if (opener) tab_strip->SetOpenerOfTabContentsAt(new_index, opener); @@ -1137,7 +1137,7 @@ bool HighlightTabsFunction::RunImpl() { if (!GetBrowserFromWindowID(this, window_id, &browser)) return false; - TabStripModel* tabstrip = browser->tabstrip_model(); + TabStripModel* tabstrip = browser->tab_strip_model(); TabStripSelectionModel selection; int active_index = -1; @@ -1172,7 +1172,7 @@ bool HighlightTabsFunction::RunImpl() { } selection.set_active(active_index); - browser->tabstrip_model()->SetSelectionFromModel(selection); + browser->tab_strip_model()->SetSelectionFromModel(selection); result_.reset( browser->extension_window_controller()->CreateWindowValueWithTabs()); return true; @@ -1198,7 +1198,7 @@ bool UpdateTabFunction::RunImpl() { error_ = keys::kNoCurrentWindowError; return false; } - contents = browser->tabstrip_model()->GetActiveTabContents(); + contents = browser->tab_strip_model()->GetActiveTabContents(); if (!contents) { error_ = keys::kNoSelectedTabError; return false; @@ -1462,7 +1462,7 @@ bool MoveTabsFunction::RunImpl() { // If windowId is different from the current window, move between windows. if (ExtensionTabUtil::GetWindowId(target_browser) != ExtensionTabUtil::GetWindowId(source_browser)) { - TabStripModel* target_tab_strip = target_browser->tabstrip_model(); + TabStripModel* target_tab_strip = target_browser->tab_strip_model(); contents = source_tab_strip->DetachTabContentsAt(tab_index); if (!contents) { error_ = ExtensionErrorUtils::FormatErrorMessage( @@ -1799,7 +1799,7 @@ bool DetectTabLanguageFunction::RunImpl() { browser = GetCurrentBrowser(); if (!browser) return false; - contents = browser->tabstrip_model()->GetActiveTabContents(); + contents = browser->tab_strip_model()->GetActiveTabContents(); if (!contents) return false; } diff --git a/chrome/browser/extensions/webstore_inline_install_browsertest.cc b/chrome/browser/extensions/webstore_inline_install_browsertest.cc index af112ba..be7b279 100644 --- a/chrome/browser/extensions/webstore_inline_install_browsertest.cc +++ b/chrome/browser/extensions/webstore_inline_install_browsertest.cc @@ -138,7 +138,7 @@ IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallTest, InstallNotSupported) { // The inline install should fail, and a store-provided URL should be opened // in a new tab. - if (browser()->tabstrip_model()->count() == 1) { + if (browser()->tab_strip_model()->count() == 1) { ui_test_utils::WaitForNewTab(browser()); } WebContents* web_contents = browser()->GetSelectedWebContents(); diff --git a/chrome/browser/net/gaia/gaia_oauth_fetcher.cc b/chrome/browser/net/gaia/gaia_oauth_fetcher.cc index 5a91c0e..c156bac 100644 --- a/chrome/browser/net/gaia/gaia_oauth_fetcher.cc +++ b/chrome/browser/net/gaia/gaia_oauth_fetcher.cc @@ -289,9 +289,8 @@ void OpenGetOAuthTokenURL(Browser* browser, browser, url, content::PAGE_TRANSITION_AUTO_BOOKMARK); - params.source_contents = - browser->tabstrip_model()->GetTabContentsAt( - browser->tabstrip_model()->GetWrapperIndex(NULL)); + params.source_contents = browser->tab_strip_model()->GetTabContentsAt( + browser->tab_strip_model()->GetWrapperIndex(NULL)); params.referrer = referrer; params.disposition = disposition; params.tabstrip_add_types = TabStripModel::ADD_NONE; diff --git a/chrome/browser/printing/print_preview_tab_controller_unittest.cc b/chrome/browser/printing/print_preview_tab_controller_unittest.cc index 8a16d84..515e813 100644 --- a/chrome/browser/printing/print_preview_tab_controller_unittest.cc +++ b/chrome/browser/printing/print_preview_tab_controller_unittest.cc @@ -109,7 +109,7 @@ TEST_F(PrintPreviewTabControllerUnitTest, MAYBE_MultiplePreviewTabs) { // The preview tabs are constrained in their respective initiator tabs. EXPECT_EQ(2, browser()->tab_count()); - TabStripModel* model = browser()->tabstrip_model(); + TabStripModel* model = browser()->tab_strip_model(); ASSERT_TRUE(model); int tab_1_index = model->GetIndexOfTabContents(tab_contents_1); diff --git a/chrome/browser/sessions/session_restore_browsertest.cc b/chrome/browser/sessions/session_restore_browsertest.cc index a5c62ab..11286fe 100644 --- a/chrome/browser/sessions/session_restore_browsertest.cc +++ b/chrome/browser/sessions/session_restore_browsertest.cc @@ -724,7 +724,7 @@ IN_PROC_BROWSER_TEST_F(SessionRestoreTest, ShareProcessesOnRestore) { IN_PROC_BROWSER_TEST_F(SessionRestoreTest, RestorePinnedSelectedTab) { // Create a pinned tab. ui_test_utils::NavigateToURL(browser(), url1_); - browser()->tabstrip_model()->SetTabPinned(0, true); + browser()->tab_strip_model()->SetTabPinned(0, true); ASSERT_EQ(0, browser()->active_index()); // Create a nonpinned tab. ui_test_utils::NavigateToURLWithDisposition( @@ -732,7 +732,7 @@ IN_PROC_BROWSER_TEST_F(SessionRestoreTest, RestorePinnedSelectedTab) { ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); ASSERT_EQ(1, browser()->active_index()); // Select the pinned tab. - browser()->tabstrip_model()->ActivateTabAt(0, true); + browser()->tab_strip_model()->ActivateTabAt(0, true); ASSERT_EQ(0, browser()->active_index()); Profile* profile = browser()->profile(); diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index 6f34e74..89019ff 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -900,7 +900,7 @@ WebContents* Browser::OpenApplicationTab(Profile* profile, if (disposition == CURRENT_TAB) { WebContents* existing_tab = browser->GetSelectedWebContents(); - TabStripModel* model = browser->tabstrip_model(); + TabStripModel* model = browser->tab_strip_model(); int tab_index = model->GetWrapperIndex(existing_tab); existing_tab->OpenURL(OpenURLParams( @@ -1768,7 +1768,7 @@ void Browser::ConvertPopupToTabbedBrowser() { TabContentsWrapper* contents = tab_strip_model_->DetachTabContentsAt( active_index()); Browser* browser = Browser::Create(profile_); - browser->tabstrip_model()->AppendTabContents(contents, true); + browser->tab_strip_model()->AppendTabContents(contents, true); browser->window()->Show(); } @@ -3013,7 +3013,7 @@ Browser* Browser::CreateNewStripWithContents( browser->set_show_state( maximize ? ui::SHOW_STATE_MAXIMIZED : ui::SHOW_STATE_NORMAL); browser->InitBrowserWindow(); - browser->tabstrip_model()->AppendTabContents(detached_contents, true); + browser->tab_strip_model()->AppendTabContents(detached_contents, true); // Make sure the loading state is updated correctly, otherwise the throbber // won't start if the page is loading. browser->LoadingStateChanged(detached_contents->web_contents()); @@ -3673,7 +3673,7 @@ void Browser::ConvertContentsToApplication(WebContents* contents) { TabContentsWrapper::GetCurrentWrapperForContents(contents); if (!wrapper) wrapper = new TabContentsWrapper(contents); - app_browser->tabstrip_model()->AppendTabContents(wrapper, true); + app_browser->tab_strip_model()->AppendTabContents(wrapper, true); contents->GetMutableRendererPrefs()->can_accept_load_drops = false; contents->GetRenderViewHost()->SyncRendererPrefs(); @@ -5167,7 +5167,7 @@ WebContents* Browser::GetOrCloneTabForDisposition( case NEW_WINDOW: { current_tab = current_tab->Clone(); Browser* browser = Browser::Create(profile_); - browser->tabstrip_model()->AddTabContents( + browser->tab_strip_model()->AddTabContents( current_tab, -1, content::PAGE_TRANSITION_LINK, TabStripModel::ADD_ACTIVE); browser->window()->Show(); diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h index 5c11191..1f9b16e 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h @@ -413,8 +413,7 @@ class Browser : public TabStripModelDelegate, // TabStripModel pass-thrus ///////////////////////////////////////////////// - // TODO(tfarina): Rename this to tab_strip_model(). - TabStripModel* tabstrip_model() const { return tab_strip_model_.get(); } + TabStripModel* tab_strip_model() const { return tab_strip_model_.get(); } int tab_count() const; int active_index() const; diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc index ee3c6cd..6b0127a 100644 --- a/chrome/browser/ui/browser_browsertest.cc +++ b/chrome/browser/ui/browser_browsertest.cc @@ -854,7 +854,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, TabClosingWhenRemovingExtension) { ASSERT_TRUE(test_server()->Start()); host_resolver()->AddRule("www.example.com", "127.0.0.1"); GURL url(test_server()->GetURL("empty.html")); - TabStripModel* model = browser()->tabstrip_model(); + TabStripModel* model = browser()->tab_strip_model(); ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("app/"))); @@ -1226,7 +1226,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, RestorePinnedTabs) { // Add an pinned app tab. host_resolver()->AddRule("www.example.com", "127.0.0.1"); GURL url(test_server()->GetURL("empty.html")); - TabStripModel* model = browser()->tabstrip_model(); + TabStripModel* model = browser()->tab_strip_model(); ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("app/"))); const Extension* extension_app = GetExtension(); ui_test_utils::NavigateToURL(browser(), url); @@ -1276,7 +1276,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, RestorePinnedTabs) { ASSERT_EQ(3, new_browser->tab_count()); // Make sure the state matches. - TabStripModel* new_model = new_browser->tabstrip_model(); + TabStripModel* new_model = new_browser->tab_strip_model(); EXPECT_TRUE(new_model->IsAppTab(0)); EXPECT_FALSE(new_model->IsAppTab(1)); EXPECT_FALSE(new_model->IsAppTab(2)); diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc index 65d4aee..d08dc296 100644 --- a/chrome/browser/ui/browser_navigator.cc +++ b/chrome/browser/ui/browser_navigator.cc @@ -50,7 +50,7 @@ namespace { // those types of Browser. bool WindowCanOpenTabs(Browser* browser) { return browser->CanSupportWindowFeature(Browser::FEATURE_TABSTRIP) || - browser->tabstrip_model()->empty(); + browser->tab_strip_model()->empty(); } // Finds an existing Browser compatible with |profile|, making a new one if no @@ -198,7 +198,7 @@ Browser* GetBrowserForDisposition(browser::NavigateParams* params) { // conditions. void NormalizeDisposition(browser::NavigateParams* params) { // Calculate the WindowOpenDisposition if necessary. - if (params->browser->tabstrip_model()->empty() && + if (params->browser->tab_strip_model()->empty() && (params->disposition == NEW_BACKGROUND_TAB || params->disposition == CURRENT_TAB || params->disposition == SINGLETON_TAB)) { @@ -469,7 +469,7 @@ void Navigate(NavigateParams* params) { // If a new window has been created, it needs to be displayed. if (params->window_action == browser::NavigateParams::NO_ACTION && source_browser != params->browser && - params->browser->tabstrip_model()->empty()) { + params->browser->tab_strip_model()->empty()) { params->window_action = browser::NavigateParams::SHOW_WINDOW; } @@ -590,7 +590,7 @@ void Navigate(NavigateParams* params) { params->tabstrip_add_types |= TabStripModel::ADD_FORCE_INDEX; // The navigation should insert a new tab into the target Browser. - params->browser->tabstrip_model()->AddTabContents( + params->browser->tab_strip_model()->AddTabContents( params->target_contents, params->tabstrip_index, params->transition, diff --git a/chrome/browser/ui/browser_navigator_browsertest.cc b/chrome/browser/ui/browser_navigator_browsertest.cc index 605611a..8c0181d 100644 --- a/chrome/browser/ui/browser_navigator_browsertest.cc +++ b/chrome/browser/ui/browser_navigator_browsertest.cc @@ -683,7 +683,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, Tabstrip_InsertAtIndex) { // Navigate() should have inserted a new tab at slot 0 in the tabstrip. EXPECT_EQ(browser(), p.browser); - EXPECT_EQ(0, browser()->tabstrip_model()->GetIndexOfTabContents( + EXPECT_EQ(0, browser()->tab_strip_model()->GetIndexOfTabContents( static_cast<const TabContentsWrapper*>(p.target_contents))); // We should have one window - the browser() provided by the framework. diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm index 44d9a81..8c7546e 100644 --- a/chrome/browser/ui/cocoa/browser_window_controller.mm +++ b/chrome/browser/ui/cocoa/browser_window_controller.mm @@ -496,7 +496,7 @@ enum { // from this method. - (void)windowWillClose:(NSNotification*)notification { DCHECK_EQ([notification object], [self window]); - DCHECK(browser_->tabstrip_model()->empty()); + DCHECK(browser_->tab_strip_model()->empty()); [savedRegularWindow_ close]; // We delete statusBubble here because we need to kill off the dependency // that its window has on our window before our window goes away. @@ -552,7 +552,7 @@ enum { // have to save the window position before we call orderOut:. [self saveWindowPositionIfNeeded]; - if (!browser_->tabstrip_model()->empty()) { + if (!browser_->tab_strip_model()->empty()) { // Tab strip isn't empty. Hide the frame (so it appears to have closed // immediately) and close all the tabs, allowing the renderers to shut // down. When the tab strip is empty we'll be called back again. @@ -1277,7 +1277,7 @@ enum { // put into a different tab strip, such as during a drop on another window. - (void)detachTabView:(NSView*)view { int index = [tabStripController_ modelIndexForTabView:view]; - browser_->tabstrip_model()->DetachTabContentsAt(index); + browser_->tab_strip_model()->DetachTabContentsAt(index); } - (NSView*)activeTabView { @@ -1338,17 +1338,17 @@ enum { // deleting the tab contents. This needs to come before creating the new // Browser because it clears the WebContents' delegate, which gets hooked // up during creation of the new window. - browser_->tabstrip_model()->DetachTabContentsAt(index); + browser_->tab_strip_model()->DetachTabContentsAt(index); // Create the new window with a single tab in its model, the one being // dragged. DockInfo dockInfo; - Browser* newBrowser = browser_->tabstrip_model()->delegate()-> + Browser* newBrowser = browser_->tab_strip_model()->delegate()-> CreateNewStripWithContents(contents, browserRect, dockInfo, false); // Propagate the tab pinned state of the new tab (which is the only tab in // this new window). - newBrowser->tabstrip_model()->SetTabPinned(0, isPinned); + newBrowser->tab_strip_model()->SetTabPinned(0, isPinned); // Get the new controller by asking the new window for its delegate. BrowserWindowController* controller = @@ -1488,7 +1488,7 @@ enum { } - (BOOL)hasLiveTabs { - return !browser_->tabstrip_model()->empty(); + return !browser_->tab_strip_model()->empty(); } - (NSString*)activeTabTitle { @@ -2174,7 +2174,7 @@ willAnimateFromState:(bookmarks::VisualState)oldState [TabposeWindow openTabposeFor:[self window] rect:activeArea slomo:slomo - tabStripModel:browser_->tabstrip_model()]; + tabStripModel:browser_->tab_strip_model()]; // When the Tabpose window closes, the infobar container needs to be made // visible again. diff --git a/chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller_unittest.mm index 4f17c77..bccec1c 100644 --- a/chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller_unittest.mm +++ b/chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller_unittest.mm @@ -68,7 +68,7 @@ class FullscreenExitBubbleControllerTest : public CocoaProfileTest { TabContentsWrapper* tab_contents = Browser::TabContentsFactory( profile(), site_instance_, MSG_ROUTING_NONE, NULL, NULL); - browser()->tabstrip_model()->AppendTabContents( + browser()->tab_strip_model()->AppendTabContents( tab_contents, /*foreground=*/true); } diff --git a/chrome/browser/ui/cocoa/tabpose_window_unittest.mm b/chrome/browser/ui/cocoa/tabpose_window_unittest.mm index 49b4804..7ee0906 100644 --- a/chrome/browser/ui/cocoa/tabpose_window_unittest.mm +++ b/chrome/browser/ui/cocoa/tabpose_window_unittest.mm @@ -26,7 +26,7 @@ class TabposeWindowTest : public CocoaProfileTest { TabContentsWrapper* tab_contents = Browser::TabContentsFactory( profile(), site_instance_, MSG_ROUTING_NONE, NULL, NULL); - browser()->tabstrip_model()->AppendTabContents( + browser()->tab_strip_model()->AppendTabContents( tab_contents, /*foreground=*/true); } @@ -50,7 +50,7 @@ TEST_F(TabposeWindowTest, TestShow) { [TabposeWindow openTabposeFor:parent rect:NSMakeRect(10, 20, 250, 160) slomo:NO - tabStripModel:browser()->tabstrip_model()]; + tabStripModel:browser()->tab_strip_model()]; // Should release the window. [window mouseDown:nil]; @@ -70,10 +70,10 @@ TEST_F(TabposeWindowTest, TestModelObserver) { [TabposeWindow openTabposeFor:parent rect:NSMakeRect(10, 20, 250, 160) slomo:NO - tabStripModel:browser()->tabstrip_model()]; + tabStripModel:browser()->tab_strip_model()]; // Exercise all the model change events. - TabStripModel* model = browser()->tabstrip_model(); + TabStripModel* model = browser()->tab_strip_model(); DCHECK_EQ([window thumbnailLayerCount], 3u); DCHECK_EQ([window selectedIndex], 2); diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm index 3969589..c1bb28d 100644 --- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm +++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm @@ -350,7 +350,7 @@ private: tabStripView_.reset([view retain]); switchView_ = switchView; browser_ = browser; - tabStripModel_ = browser_->tabstrip_model(); + tabStripModel_ = browser_->tab_strip_model(); hoverTabSelector_.reset(new HoverTabSelector(tabStripModel_)); delegate_ = delegate; bridge_.reset(new TabStripModelObserverBridge(tabStripModel_, self)); 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 26e40b2..038cbfb 100644 --- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller_unittest.mm +++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller_unittest.mm @@ -88,7 +88,7 @@ class TabStripControllerTest : public CocoaProfileTest { [tab_strip_ setNewTabButton:new_tab_button.get()]; delegate_.reset(new TestTabStripModelDelegate()); - model_ = browser()->tabstrip_model(); + model_ = browser()->tab_strip_model(); controller_delegate_.reset([TestTabStripControllerDelegate alloc]); controller_.reset([[TabStripController alloc] initWithView:static_cast<TabStripView*>(tab_strip_.get()) diff --git a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller_unittest.mm b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller_unittest.mm index e2fda87..24bb98d 100644 --- a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller_unittest.mm +++ b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller_unittest.mm @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -26,7 +26,7 @@ class MockWrenchMenuModel : public WrenchMenuModel { // seems that the vector of observers is getting hosed somewhere between // |-[ToolbarController dealloc]| and ~MockWrenchMenuModel(). This line // short-circuits the parent destructor to avoid this crash. - tabstrip_model_ = NULL; + tab_strip_model_ = NULL; } MOCK_METHOD1(ExecuteCommand, void(int command_id)); }; diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc index 4915597..af838c6 100644 --- a/chrome/browser/ui/gtk/browser_window_gtk.cc +++ b/chrome/browser/ui/gtk/browser_window_gtk.cc @@ -349,7 +349,7 @@ BrowserWindowGtk::BrowserWindowGtk(Browser* browser) BrowserWindowGtk::~BrowserWindowGtk() { ui::ActiveWindowWatcherX::RemoveObserver(this); - browser_->tabstrip_model()->RemoveObserver(this); + browser_->tab_strip_model()->RemoveObserver(this); } void BrowserWindowGtk::Init() { @@ -1340,7 +1340,7 @@ void BrowserWindowGtk::ActiveTabChanged(TabContentsWrapper* old_contents, new_contents->web_contents()->DidBecomeSelected(); // TODO(estade): after we manage browser activation, add a check to make sure // we are the active browser before calling RestoreFocus(). - if (!browser_->tabstrip_model()->closing_all()) { + if (!browser_->tab_strip_model()->closing_all()) { new_contents->web_contents()->GetView()->RestoreFocus(); if (new_contents->find_tab_helper()->find_ui_active()) browser_->GetFindBarController()->find_bar()->SetFocusAndSelection(); @@ -1658,7 +1658,7 @@ bool BrowserWindowGtk::CanClose() const { if (!browser_->ShouldCloseWindow()) return false; - if (!browser_->tabstrip_model()->empty()) { + if (!browser_->tab_strip_model()->empty()) { // Tab strip isn't empty. Hide the window (so it appears to have closed // immediately) and close all the tabs, allowing the renderers to shut // down. When the tab strip is empty we'll be called back again. @@ -1818,7 +1818,7 @@ void BrowserWindowGtk::InitWidgets() { G_CALLBACK(OnCustomFrameExposeThunk), this); gtk_container_add(GTK_CONTAINER(window_container_), window_vbox_); - tabstrip_.reset(new TabStripGtk(browser_->tabstrip_model(), this)); + tabstrip_.reset(new TabStripGtk(browser_->tab_strip_model(), this)); tabstrip_->Init(); // Build the titlebar (tabstrip + header space + min/max/close buttons). @@ -1935,7 +1935,7 @@ void BrowserWindowGtk::InitWidgets() { gtk_container_add(GTK_CONTAINER(window_), window_container_); gtk_widget_show(window_container_); - browser_->tabstrip_model()->AddObserver(this); + browser_->tab_strip_model()->AddObserver(this); } void BrowserWindowGtk::SetBackgroundColor() { 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 964e25e..b36a785 100644 --- a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc +++ b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc @@ -763,7 +763,7 @@ bool DraggedTabControllerGtk::CompleteDrag() { window_bounds, dock_info_, window->IsMaximized()); - TabStripModel* new_model = new_browser->tabstrip_model(); + TabStripModel* new_model = new_browser->tab_strip_model(); new_model->SetTabPinned( new_model->GetIndexOfTabContents(drag_data_->get(0)->contents_), drag_data_->get(0)->pinned_); diff --git a/chrome/browser/ui/intents/web_intent_picker_controller.cc b/chrome/browser/ui/intents/web_intent_picker_controller.cc index 9a99ec9..924f984 100644 --- a/chrome/browser/ui/intents/web_intent_picker_controller.cc +++ b/chrome/browser/ui/intents/web_intent_picker_controller.cc @@ -398,7 +398,7 @@ void WebIntentPickerController::OnSendReturnMessage( Browser* browser = Browser::GetBrowserForController( &service_tab_->GetController(), &index); if (browser) { - browser->tabstrip_model()->CloseTabContentsAt( + browser->tab_strip_model()->CloseTabContentsAt( index, TabStripModel::CLOSE_CREATE_HISTORICAL_TAB); // Activate source tab. @@ -406,7 +406,7 @@ void WebIntentPickerController::OnSendReturnMessage( BrowserList::FindBrowserWithWebContents(wrapper_->web_contents()); if (source_browser) { int source_index = - source_browser->tabstrip_model()->GetIndexOfTabContents(wrapper_); + source_browser->tab_strip_model()->GetIndexOfTabContents(wrapper_); source_browser->ActivateTabAt(source_index, false); } } diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc index 8d438e4..3d91989 100644 --- a/chrome/browser/ui/panels/panel.cc +++ b/chrome/browser/ui/panels/panel.cc @@ -59,7 +59,7 @@ void Panel::Initialize(const gfx::Rect& bounds) { void Panel::OnNativePanelClosed() { if (auto_resizable_) - native_panel_->GetPanelBrowser()->tabstrip_model()->RemoveObserver(this); + native_panel_->GetPanelBrowser()->tab_strip_model()->RemoveObserver(this); manager()->OnPanelClosed(this); DCHECK(!panel_strip_); } @@ -129,11 +129,11 @@ void Panel::SetAutoResizable(bool resizable) { auto_resizable_ = resizable; WebContents* web_contents = browser()->GetSelectedWebContents(); if (auto_resizable_) { - browser()->tabstrip_model()->AddObserver(this); + browser()->tab_strip_model()->AddObserver(this); if (web_contents) EnableWebContentsAutoResize(web_contents); } else { - browser()->tabstrip_model()->RemoveObserver(this); + browser()->tab_strip_model()->RemoveObserver(this); registrar_.RemoveAll(); if (web_contents) { diff --git a/chrome/browser/ui/panels/panel_browser_window_cocoa.mm b/chrome/browser/ui/panels/panel_browser_window_cocoa.mm index 67b74a6..f5fa4f3 100644 --- a/chrome/browser/ui/panels/panel_browser_window_cocoa.mm +++ b/chrome/browser/ui/panels/panel_browser_window_cocoa.mm @@ -54,7 +54,7 @@ PanelBrowserWindowCocoa::PanelBrowserWindowCocoa(Browser* browser, attention_request_id_(0), activation_requested_by_browser_(false) { controller_ = [[PanelWindowControllerCocoa alloc] initWithBrowserWindow:this]; - browser_->tabstrip_model()->AddObserver(this); + browser_->tab_strip_model()->AddObserver(this); registrar_.Add( this, chrome::NOTIFICATION_PANEL_CHANGED_EXPANSION_STATE, @@ -62,7 +62,7 @@ PanelBrowserWindowCocoa::PanelBrowserWindowCocoa(Browser* browser, } PanelBrowserWindowCocoa::~PanelBrowserWindowCocoa() { - browser_->tabstrip_model()->RemoveObserver(this); + browser_->tab_strip_model()->RemoveObserver(this); } bool PanelBrowserWindowCocoa::isClosed() { diff --git a/chrome/browser/ui/panels/panel_browsertest.cc b/chrome/browser/ui/panels/panel_browsertest.cc index 09d937d..b9db08d 100644 --- a/chrome/browser/ui/panels/panel_browsertest.cc +++ b/chrome/browser/ui/panels/panel_browsertest.cc @@ -1407,8 +1407,8 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, DISABLED_CreateWithExistingContents) { // Swap tab contents over to the panel from the tabbed browser. TabContentsWrapper* contents = - browser()->tabstrip_model()->DetachTabContentsAt(0); - panel_browser->tabstrip_model()->InsertTabContentsAt( + browser()->tab_strip_model()->DetachTabContentsAt(0); + panel_browser->tab_strip_model()->InsertTabContentsAt( 0, contents, TabStripModel::ADD_NONE); panel_browser->SelectNumberedTab(0); EXPECT_EQ(contents, panel_browser->GetSelectedTabContentsWrapper()); diff --git a/chrome/browser/ui/panels/panel_window_controller_cocoa.mm b/chrome/browser/ui/panels/panel_window_controller_cocoa.mm index 8a6aaa14..8a9a625 100644 --- a/chrome/browser/ui/panels/panel_window_controller_cocoa.mm +++ b/chrome/browser/ui/panels/panel_window_controller_cocoa.mm @@ -719,7 +719,7 @@ enum { if (!browser->ShouldCloseWindow()) return NO; - if (!browser->tabstrip_model()->empty()) { + if (!browser->tab_strip_model()->empty()) { // Terminate any playing animations. [self terminateBoundsAnimation]; animateOnBoundsChange_ = NO; @@ -738,7 +738,7 @@ enum { // When windowShouldClose returns YES (or if controller receives direct 'close' // signal), window will be unconditionally closed. Clean up. - (void)windowWillClose:(NSNotification*)notification { - DCHECK(windowShim_->browser()->tabstrip_model()->empty()); + DCHECK(windowShim_->browser()->tab_strip_model()->empty()); // Avoid callbacks from a nonblocking animation in progress, if any. [self terminateBoundsAnimation]; windowShim_->DidCloseNativeWindow(); diff --git a/chrome/browser/ui/tabs/pinned_tab_codec.cc b/chrome/browser/ui/tabs/pinned_tab_codec.cc index b6b52e3..849033a 100644 --- a/chrome/browser/ui/tabs/pinned_tab_codec.cc +++ b/chrome/browser/ui/tabs/pinned_tab_codec.cc @@ -28,7 +28,7 @@ static const char kURL[] = "url"; // Returns true if |browser| has any pinned tabs. static bool HasPinnedTabs(Browser* browser) { - TabStripModel* tab_model = browser->tabstrip_model(); + TabStripModel* tab_model = browser->tab_strip_model(); for (int i = 0; i < tab_model->count(); ++i) { if (tab_model->IsTabPinned(i)) return true; @@ -77,7 +77,7 @@ static void EncodePinnedTab(TabStripModel* model, // Invokes EncodePinnedTab for each pinned tab in browser. static void EncodePinnedTabs(Browser* browser, ListValue* values) { - TabStripModel* tab_model = browser->tabstrip_model(); + TabStripModel* tab_model = browser->tab_strip_model(); for (int i = 0; i < tab_model->count() && tab_model->IsTabPinned(i); ++i) EncodePinnedTab(tab_model, i, values); } diff --git a/chrome/browser/ui/tabs/pinned_tab_codec_unittest.cc b/chrome/browser/ui/tabs/pinned_tab_codec_unittest.cc index 82b3f0e..39c28a9 100644 --- a/chrome/browser/ui/tabs/pinned_tab_codec_unittest.cc +++ b/chrome/browser/ui/tabs/pinned_tab_codec_unittest.cc @@ -39,7 +39,7 @@ TEST_F(PinnedTabCodecTest, PinnedAndNonPinned) { // AddTab inserts at index 0, so order after this is url1, url2. AddTab(browser(), url1); - browser()->tabstrip_model()->SetTabPinned(0, true); + browser()->tab_strip_model()->SetTabPinned(0, true); PinnedTabCodec::WritePinnedTabs(profile()); @@ -48,7 +48,7 @@ TEST_F(PinnedTabCodecTest, PinnedAndNonPinned) { EXPECT_EQ("http://www.google.com/::pinned:", result); // Update pinned tabs and restore back the old value directly. - browser()->tabstrip_model()->SetTabPinned(1, true); + browser()->tab_strip_model()->SetTabPinned(1, true); PinnedTabCodec::WritePinnedTabs(profile()); result = PinnedTabTestUtils::TabsToString( diff --git a/chrome/browser/ui/tabs/pinned_tab_service_unittest.cc b/chrome/browser/ui/tabs/pinned_tab_service_unittest.cc index 32f997b..89e57fd 100644 --- a/chrome/browser/ui/tabs/pinned_tab_service_unittest.cc +++ b/chrome/browser/ui/tabs/pinned_tab_service_unittest.cc @@ -48,7 +48,7 @@ class PinnedTabServiceTest : public BrowserWithTestWindowTest { TEST_F(PinnedTabServiceTest, Popup) { GURL url("http://www.google.com"); AddTab(browser(), url); - browser()->tabstrip_model()->SetTabPinned(0, true); + browser()->tab_strip_model()->SetTabPinned(0, true); // Create a popup. scoped_ptr<Browser> popup(new Browser(Browser::TYPE_POPUP, profile())); diff --git a/chrome/browser/ui/tabs/tab_menu_model_unittest.cc b/chrome/browser/ui/tabs/tab_menu_model_unittest.cc index 2f8a503..af0d289 100644 --- a/chrome/browser/ui/tabs/tab_menu_model_unittest.cc +++ b/chrome/browser/ui/tabs/tab_menu_model_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -14,7 +14,7 @@ class TabMenuModelTest : public MenuModelTest, TEST_F(TabMenuModelTest, Basics) { browser()->NewTab(); - TabMenuModel model(&delegate_, browser()->tabstrip_model(), 0); + TabMenuModel model(&delegate_, browser()->tab_strip_model(), 0); // Verify it has items. The number varies by platform, so we don't check // the exact number. diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc index a124f28..d593a8c 100644 --- a/chrome/browser/ui/toolbar/wrench_menu_model.cc +++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc @@ -201,11 +201,11 @@ WrenchMenuModel::WrenchMenuModel(ui::AcceleratorProvider* provider, : ALLOW_THIS_IN_INITIALIZER_LIST(ui::SimpleMenuModel(this)), provider_(provider), browser_(browser), - tabstrip_model_(browser_->tabstrip_model()) { + tab_strip_model_(browser_->tab_strip_model()) { Build(); UpdateZoomControls(); - tabstrip_model_->AddObserver(this); + tab_strip_model_->AddObserver(this); registrar_.Add( this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED, @@ -216,8 +216,8 @@ WrenchMenuModel::WrenchMenuModel(ui::AcceleratorProvider* provider, } WrenchMenuModel::~WrenchMenuModel() { - if (tabstrip_model_) - tabstrip_model_->RemoveObserver(this); + if (tab_strip_model_) + tab_strip_model_->RemoveObserver(this); } bool WrenchMenuModel::DoesCommandIdDismissMenu(int command_id) const { @@ -401,8 +401,8 @@ void WrenchMenuModel::TabReplacedAt(TabStripModel* tab_strip_model, void WrenchMenuModel::TabStripModelDeleted() { // During views shutdown, the tabstrip model/browser is deleted first, while // it is the opposite in gtk land. - tabstrip_model_->RemoveObserver(this); - tabstrip_model_ = NULL; + tab_strip_model_->RemoveObserver(this); + tab_strip_model_ = NULL; } void WrenchMenuModel::Observe(int type, @@ -423,7 +423,7 @@ WrenchMenuModel::WrenchMenuModel() : ALLOW_THIS_IN_INITIALIZER_LIST(ui::SimpleMenuModel(this)), provider_(NULL), browser_(NULL), - tabstrip_model_(NULL) { + tab_strip_model_(NULL) { } void WrenchMenuModel::Build() { diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.h b/chrome/browser/ui/toolbar/wrench_menu_model.h index 5c3bef2..4e04f74 100644 --- a/chrome/browser/ui/toolbar/wrench_menu_model.h +++ b/chrome/browser/ui/toolbar/wrench_menu_model.h @@ -155,7 +155,7 @@ class WrenchMenuModel : public ui::SimpleMenuModel, ui::AcceleratorProvider* provider_; // weak Browser* browser_; // weak - TabStripModel* tabstrip_model_; // weak + TabStripModel* tab_strip_model_; // weak content::NotificationRegistrar registrar_; diff --git a/chrome/browser/ui/views/ash/launcher/browser_launcher_item_controller.cc b/chrome/browser/ui/views/ash/launcher/browser_launcher_item_controller.cc index ef6c2d1..f227d2c 100644 --- a/chrome/browser/ui/views/ash/launcher/browser_launcher_item_controller.cc +++ b/chrome/browser/ui/views/ash/launcher/browser_launcher_item_controller.cc @@ -88,7 +88,7 @@ BrowserLauncherItemController* BrowserLauncherItemController::Create( } BrowserLauncherItemController* icon_updater = new BrowserLauncherItemController( - browser->window()->GetNativeHandle(), browser->tabstrip_model(), + browser->window()->GetNativeHandle(), browser->tab_strip_model(), ChromeLauncherController::instance(), type, app_id); icon_updater->Init(); return icon_updater; diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc index bf536cb..7206311 100644 --- a/chrome/browser/ui/views/frame/browser_view.cc +++ b/chrome/browser/ui/views/frame/browser_view.cc @@ -320,7 +320,7 @@ BrowserView::BrowserView(Browser* browser) #endif force_location_bar_focus_(false), ALLOW_THIS_IN_INITIALIZER_LIST(color_change_listener_(this)) { - browser_->tabstrip_model()->AddObserver(this); + browser_->tab_strip_model()->AddObserver(this); } BrowserView::~BrowserView() { @@ -330,7 +330,7 @@ BrowserView::~BrowserView() { launcher_item_controller_.reset(); #endif - browser_->tabstrip_model()->RemoveObserver(this); + browser_->tab_strip_model()->RemoveObserver(this); #if defined(OS_WIN) && !defined(USE_AURA) // Stop hung plugin monitoring. @@ -1336,7 +1336,7 @@ void BrowserView::TabReplacedAt(TabStripModel* tab_strip_model, TabContentsWrapper* old_contents, TabContentsWrapper* new_contents, int index) { - if (index != browser_->tabstrip_model()->active_index()) + if (index != browser_->tab_strip_model()->active_index()) return; if (contents_->preview_web_contents() == new_contents->web_contents()) { @@ -1612,7 +1612,7 @@ bool BrowserView::CanClose() { if (!browser_->ShouldCloseWindow()) return false; - if (!browser_->tabstrip_model()->empty()) { + if (!browser_->tab_strip_model()->empty()) { // Tab strip isn't empty. Hide the frame (so it appears to have closed // immediately) and close all the tabs, allowing the renderers to shut // down. When the tab strip is empty we'll be called back again. @@ -1788,7 +1788,8 @@ void BrowserView::Init() { // TabStrip takes ownership of the controller. BrowserTabStripController* tabstrip_controller = - new BrowserTabStripController(browser_.get(), browser_->tabstrip_model()); + new BrowserTabStripController(browser_.get(), + browser_->tab_strip_model()); tabstrip_ = new TabStrip(tabstrip_controller); AddChildView(tabstrip_); tabstrip_controller->InitFromModel(tabstrip_); @@ -2325,7 +2326,7 @@ void BrowserView::ProcessTabSelected(TabContentsWrapper* new_contents) { // etc not result in sad tab. new_contents->web_contents()->DidBecomeSelected(); if (BrowserList::GetLastActive() == browser_ && - !browser_->tabstrip_model()->closing_all() && GetWidget()->IsVisible()) { + !browser_->tab_strip_model()->closing_all() && GetWidget()->IsVisible()) { // We only restore focus if our window is visible, to avoid invoking blur // handlers when we are eventually shown. new_contents->web_contents()->GetView()->RestoreFocus(); diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc index d46922f..f1a4ff4 100644 --- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc +++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc @@ -1667,7 +1667,7 @@ void TabDragController::CompleteDrag() { GetModel(source_tabstrip_)->delegate()->CreateNewStripWithContents( drag_data_[0].contents, window_bounds, dock_info_, widget->IsMaximized()); - TabStripModel* new_model = new_browser->tabstrip_model(); + TabStripModel* new_model = new_browser->tab_strip_model(); new_model->SetTabPinned( new_model->GetIndexOfTabContents(drag_data_[0].contents), drag_data_[0].pinned); @@ -1678,7 +1678,7 @@ void TabDragController::CompleteDrag() { drag_data_[i].pinned ? TabStripModel::ADD_PINNED : TabStripModel::ADD_NONE); } - ResetSelection(new_browser->tabstrip_model()); + ResetSelection(new_browser->tab_strip_model()); new_browser->window()->Show(); } diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc b/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc index cacd59df..1f8082f 100644 --- a/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc +++ b/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc @@ -125,7 +125,7 @@ void TabDragControllerTest::StopAnimating(TabStrip* tab_strip) { void TabDragControllerTest::AddTabAndResetBrowser(Browser* browser) { AddBlankTabAndShow(browser); StopAnimating(GetTabStripForBrowser(browser)); - ResetIDs(browser->tabstrip_model(), 0); + ResetIDs(browser->tab_strip_model(), 0); } Browser* TabDragControllerTest::CreateAnotherWindowBrowserAndRelayout() { @@ -134,7 +134,7 @@ Browser* TabDragControllerTest::CreateAnotherWindowBrowserAndRelayout() { // Create another browser. Browser* browser2 = CreateBrowser(browser()->profile()); - ResetIDs(browser2->tabstrip_model(), 100); + ResetIDs(browser2->tab_strip_model(), 100); // Resize the two windows so they're right next to each other. gfx::Rect work_area = gfx::Screen::GetMonitorNearestWindow( @@ -165,7 +165,7 @@ IN_PROC_BROWSER_TEST_F(DetachToBrowserTabDragControllerTest, DragInSameWindow) { AddTabAndResetBrowser(browser()); TabStrip* tab_strip = GetTabStripForBrowser(browser()); - TabStripModel* model = browser()->tabstrip_model(); + TabStripModel* model = browser()->tab_strip_model(); gfx::Point tab_1_center(GetCenterInScreenCoordinates(tab_strip->tab_at(1))); ASSERT_TRUE(ui_test_utils::SendMouseMoveSync(tab_1_center)); @@ -234,8 +234,8 @@ IN_PROC_BROWSER_TEST_F(DetachToBrowserTabDragControllerTest, ASSERT_FALSE(tab_strip2->IsDragSessionActive()); ASSERT_FALSE(tab_strip->IsDragSessionActive()); ASSERT_FALSE(TabDragController::IsActive()); - EXPECT_EQ("100 0", IDString(browser2->tabstrip_model())); - EXPECT_EQ("1", IDString(browser()->tabstrip_model())); + EXPECT_EQ("100 0", IDString(browser2->tab_strip_model())); + EXPECT_EQ("1", IDString(browser()->tab_strip_model())); } // Drags from browser to separate window and releases mouse. @@ -271,8 +271,8 @@ IN_PROC_BROWSER_TEST_F(DetachToBrowserTabDragControllerTest, TabStrip* tab_strip2 = GetTabStripForBrowser(new_browser); ASSERT_FALSE(tab_strip2->IsDragSessionActive()); - EXPECT_EQ("0", IDString(new_browser->tabstrip_model())); - EXPECT_EQ("1", IDString(browser()->tabstrip_model())); + EXPECT_EQ("0", IDString(new_browser->tab_strip_model())); + EXPECT_EQ("1", IDString(browser()->tab_strip_model())); } // Deletes a tab being dragged before the user moved enough to start a drag. @@ -293,13 +293,13 @@ IN_PROC_BROWSER_TEST_F(DetachToBrowserTabDragControllerTest, ASSERT_TRUE(TabDragController::IsActive()); // Delete the tab being dragged. - delete browser()->tabstrip_model()->GetTabContentsAt(0); + delete browser()->tab_strip_model()->GetTabContentsAt(0); // Should have canceled dragging. ASSERT_FALSE(tab_strip->IsDragSessionActive()); ASSERT_FALSE(TabDragController::IsActive()); - EXPECT_EQ("1", IDString(browser()->tabstrip_model())); + EXPECT_EQ("1", IDString(browser()->tab_strip_model())); } // Deletes a tab being dragged while still attached. @@ -323,13 +323,13 @@ IN_PROC_BROWSER_TEST_F(DetachToBrowserTabDragControllerTest, ASSERT_TRUE(TabDragController::IsActive()); // Delete the tab being dragged. - delete browser()->tabstrip_model()->GetTabContentsAt(0); + delete browser()->tab_strip_model()->GetTabContentsAt(0); // Should have canceled dragging. ASSERT_FALSE(tab_strip->IsDragSessionActive()); ASSERT_FALSE(TabDragController::IsActive()); - EXPECT_EQ("1", IDString(browser()->tabstrip_model())); + EXPECT_EQ("1", IDString(browser()->tab_strip_model())); } namespace { @@ -351,7 +351,7 @@ IN_PROC_BROWSER_TEST_F(DetachToBrowserTabDragControllerTest, // Move to the first tab and drag it enough so that it detaches. gfx::Point tab_0_center(GetCenterInScreenCoordinates(tab_strip->tab_at(0))); TabContentsWrapper* to_delete = - browser()->tabstrip_model()->GetTabContentsAt(0); + browser()->tab_strip_model()->GetTabContentsAt(0); ASSERT_TRUE(ui_test_utils::SendMouseMoveSync(tab_0_center)); ASSERT_TRUE(ui_test_utils::SendMouseEventsSync( ui_controls::LEFT, ui_controls::DOWN)); @@ -367,7 +367,7 @@ IN_PROC_BROWSER_TEST_F(DetachToBrowserTabDragControllerTest, ASSERT_FALSE(tab_strip->IsDragSessionActive()); ASSERT_FALSE(TabDragController::IsActive()); - EXPECT_EQ("1", IDString(browser()->tabstrip_model())); + EXPECT_EQ("1", IDString(browser()->tab_strip_model())); } namespace { @@ -392,7 +392,7 @@ IN_PROC_BROWSER_TEST_F(DetachToBrowserTabDragControllerTest, // Move to the first tab and drag it enough so that it detaches. gfx::Point tab_0_center(GetCenterInScreenCoordinates(tab_strip->tab_at(0))); TabContentsWrapper* to_delete = - browser()->tabstrip_model()->GetTabContentsAt(1); + browser()->tab_strip_model()->GetTabContentsAt(1); ASSERT_TRUE(ui_test_utils::SendMouseMoveSync(tab_0_center)); ASSERT_TRUE(ui_test_utils::SendMouseEventsSync( ui_controls::LEFT, ui_controls::DOWN)); @@ -409,7 +409,7 @@ IN_PROC_BROWSER_TEST_F(DetachToBrowserTabDragControllerTest, ASSERT_FALSE(GetTabStripForBrowser(new_browser)->IsDragSessionActive()); ASSERT_FALSE(TabDragController::IsActive()); - EXPECT_EQ("0", IDString(new_browser->tabstrip_model())); + EXPECT_EQ("0", IDString(new_browser->tab_strip_model())); } namespace { @@ -449,7 +449,7 @@ IN_PROC_BROWSER_TEST_F(DetachToBrowserTabDragControllerTest, // And there should only be one window. EXPECT_EQ(1u, BrowserList::size()); - EXPECT_EQ("0 1", IDString(browser()->tabstrip_model())); + EXPECT_EQ("0 1", IDString(browser()->tab_strip_model())); } namespace { @@ -469,8 +469,8 @@ IN_PROC_BROWSER_TEST_F(DetachToBrowserTabDragControllerTest, DragAll) { // Add another tab. AddTabAndResetBrowser(browser()); TabStrip* tab_strip = GetTabStripForBrowser(browser()); - browser()->tabstrip_model()->AddTabAtToSelection(0); - browser()->tabstrip_model()->AddTabAtToSelection(1); + browser()->tab_strip_model()->AddTabAtToSelection(0); + browser()->tab_strip_model()->AddTabAtToSelection(1); // Move to the first tab and drag it enough so that it would normally // detach. @@ -493,7 +493,7 @@ IN_PROC_BROWSER_TEST_F(DetachToBrowserTabDragControllerTest, DragAll) { // And there should only be one window. EXPECT_EQ(1u, BrowserList::size()); - EXPECT_EQ("0 1", IDString(browser()->tabstrip_model())); + EXPECT_EQ("0 1", IDString(browser()->tab_strip_model())); } namespace { @@ -525,8 +525,8 @@ IN_PROC_BROWSER_TEST_F(DetachToBrowserTabDragControllerTest, Browser* browser2 = CreateAnotherWindowBrowserAndRelayout(); TabStrip* tab_strip2 = GetTabStripForBrowser(browser2); - browser()->tabstrip_model()->AddTabAtToSelection(0); - browser()->tabstrip_model()->AddTabAtToSelection(1); + browser()->tab_strip_model()->AddTabAtToSelection(0); + browser()->tab_strip_model()->AddTabAtToSelection(1); // Move to the first tab and drag it enough so that it detaches, but not // enough that it attaches to browser2. @@ -553,7 +553,7 @@ IN_PROC_BROWSER_TEST_F(DetachToBrowserTabDragControllerTest, ui_controls::LEFT, ui_controls::UP)); ASSERT_FALSE(tab_strip2->IsDragSessionActive()); ASSERT_FALSE(TabDragController::IsActive()); - EXPECT_EQ("100 0 1", IDString(browser2->tabstrip_model())); + EXPECT_EQ("100 0 1", IDString(browser2->tab_strip_model())); } namespace { @@ -586,8 +586,8 @@ IN_PROC_BROWSER_TEST_F(DetachToBrowserTabDragControllerTest, Browser* browser2 = CreateAnotherWindowBrowserAndRelayout(); TabStrip* tab_strip2 = GetTabStripForBrowser(browser2); - browser()->tabstrip_model()->AddTabAtToSelection(0); - browser()->tabstrip_model()->AddTabAtToSelection(1); + browser()->tab_strip_model()->AddTabAtToSelection(0); + browser()->tab_strip_model()->AddTabAtToSelection(1); // Move to the first tab and drag it enough so that it detaches, but not // enough that it attaches to browser2. @@ -616,7 +616,7 @@ IN_PROC_BROWSER_TEST_F(DetachToBrowserTabDragControllerTest, ASSERT_FALSE(tab_strip2->IsDragSessionActive()); ASSERT_FALSE(TabDragController::IsActive()); - EXPECT_EQ("100 0 1", IDString(browser2->tabstrip_model())); + EXPECT_EQ("100 0 1", IDString(browser2->tab_strip_model())); // browser() will have been destroyed, but browser2 should remain. ASSERT_EQ(1u, BrowserList::size()); diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest_win.cc b/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest_win.cc index 8547178..9c2a45c 100644 --- a/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest_win.cc +++ b/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest_win.cc @@ -45,7 +45,7 @@ IN_PROC_BROWSER_TEST_F(TabDragControllerTest, DragInSameWindow) { AddTabAndResetBrowser(browser()); TabStrip* tab_strip = GetTabStripForBrowser(browser()); - TabStripModel* model = browser()->tabstrip_model(); + TabStripModel* model = browser()->tab_strip_model(); gfx::Point tab_1_center(GetCenterInScreenCoordinates(tab_strip->tab_at(1))); ASSERT_TRUE(ui_test_utils::SendMouseMoveSync(tab_1_center)); @@ -92,8 +92,8 @@ IN_PROC_BROWSER_TEST_F(TabDragControllerTest, DragToSeparateWindow) { ASSERT_FALSE(tab_strip2->IsDragSessionActive()); ASSERT_FALSE(tab_strip->IsDragSessionActive()); ASSERT_FALSE(TabDragController::IsActive()); - EXPECT_EQ("100 0", IDString(browser2->tabstrip_model())); - EXPECT_EQ("1", IDString(browser()->tabstrip_model())); + EXPECT_EQ("100 0", IDString(browser2->tab_strip_model())); + EXPECT_EQ("1", IDString(browser()->tab_strip_model())); } // Drags from browser to separate window and releases mouse. @@ -124,8 +124,8 @@ IN_PROC_BROWSER_TEST_F(TabDragControllerTest, DetachToOwnWindow) { TabStrip* tab_strip2 = GetTabStripForBrowser(new_browser); ASSERT_FALSE(tab_strip2->IsDragSessionActive()); - EXPECT_EQ("0", IDString(new_browser->tabstrip_model())); - EXPECT_EQ("1", IDString(browser()->tabstrip_model())); + EXPECT_EQ("0", IDString(new_browser->tab_strip_model())); + EXPECT_EQ("1", IDString(browser()->tab_strip_model())); } // Deletes a tab being dragged before the user moved enough to start a drag. @@ -145,13 +145,13 @@ IN_PROC_BROWSER_TEST_F(TabDragControllerTest, DeleteBeforeStartedDragging) { ASSERT_TRUE(TabDragController::IsActive()); // Delete the tab being dragged. - delete browser()->tabstrip_model()->GetTabContentsAt(0); + delete browser()->tab_strip_model()->GetTabContentsAt(0); // Should have canceled dragging. ASSERT_FALSE(tab_strip->IsDragSessionActive()); ASSERT_FALSE(TabDragController::IsActive()); - EXPECT_EQ("1", IDString(browser()->tabstrip_model())); + EXPECT_EQ("1", IDString(browser()->tab_strip_model())); } // Deletes a tab being dragged while still attached. @@ -174,13 +174,13 @@ IN_PROC_BROWSER_TEST_F(TabDragControllerTest, DeleteTabWhileAttached) { ASSERT_TRUE(TabDragController::IsActive()); // Delete the tab being dragged. - delete browser()->tabstrip_model()->GetTabContentsAt(0); + delete browser()->tab_strip_model()->GetTabContentsAt(0); // Should have canceled dragging. ASSERT_FALSE(tab_strip->IsDragSessionActive()); ASSERT_FALSE(TabDragController::IsActive()); - EXPECT_EQ("1", IDString(browser()->tabstrip_model())); + EXPECT_EQ("1", IDString(browser()->tab_strip_model())); } // Deletes a tab being dragged after dragging a tab so that a new window is @@ -193,7 +193,7 @@ IN_PROC_BROWSER_TEST_F(TabDragControllerTest, DeleteTabWhileDetached) { // Move to the first tab and drag it enough so that it detaches. gfx::Point tab_0_center(GetCenterInScreenCoordinates(tab_strip->tab_at(0))); TabContentsWrapper* to_delete = - browser()->tabstrip_model()->GetTabContentsAt(0); + browser()->tab_strip_model()->GetTabContentsAt(0); ASSERT_TRUE(ui_test_utils::SendMouseMoveSync(tab_0_center)); ASSERT_TRUE(ui_test_utils::SendMouseEventsSync( ui_controls::LEFT, ui_controls::DOWN)); @@ -206,7 +206,7 @@ IN_PROC_BROWSER_TEST_F(TabDragControllerTest, DeleteTabWhileDetached) { ASSERT_FALSE(tab_strip->IsDragSessionActive()); ASSERT_FALSE(TabDragController::IsActive()); - EXPECT_EQ("1", IDString(browser()->tabstrip_model())); + EXPECT_EQ("1", IDString(browser()->tab_strip_model())); } namespace { @@ -230,7 +230,7 @@ IN_PROC_BROWSER_TEST_F(TabDragControllerTest, DeleteSourceDetached) { // Move to the first tab and drag it enough so that it detaches. gfx::Point tab_0_center(GetCenterInScreenCoordinates(tab_strip->tab_at(0))); TabContentsWrapper* to_delete = - browser()->tabstrip_model()->GetTabContentsAt(1); + browser()->tab_strip_model()->GetTabContentsAt(1); ASSERT_TRUE(ui_test_utils::SendMouseMoveSync(tab_0_center)); ASSERT_TRUE(ui_test_utils::SendMouseEventsSync( ui_controls::LEFT, ui_controls::DOWN)); @@ -256,7 +256,7 @@ IN_PROC_BROWSER_TEST_F(TabDragControllerTest, DeleteSourceDetached) { ASSERT_FALSE(GetTabStripForBrowser(new_browser)->IsDragSessionActive()); ASSERT_FALSE(TabDragController::IsActive()); - EXPECT_EQ("0", IDString(new_browser->tabstrip_model())); + EXPECT_EQ("0", IDString(new_browser->tab_strip_model())); } // Creates two browsers, selects all tabs in first and drags into second. @@ -267,8 +267,8 @@ IN_PROC_BROWSER_TEST_F(TabDragControllerTest, DragAllToSeparateWindow) { Browser* browser2 = CreateAnotherWindowBrowserAndRelayout(); TabStrip* tab_strip2 = GetTabStripForBrowser(browser2); - browser()->tabstrip_model()->AddTabAtToSelection(0); - browser()->tabstrip_model()->AddTabAtToSelection(1); + browser()->tab_strip_model()->AddTabAtToSelection(0); + browser()->tab_strip_model()->AddTabAtToSelection(1); // Move to the first tab and drag it enough so that it detaches, but not // enough that it attaches to browser2. @@ -300,7 +300,7 @@ IN_PROC_BROWSER_TEST_F(TabDragControllerTest, DragAllToSeparateWindow) { ASSERT_TRUE(ui_test_utils::SendMouseEventsSync( ui_controls::LEFT, ui_controls::UP)); ASSERT_FALSE(TabDragController::IsActive()); - EXPECT_EQ("100 0 1", IDString(browser2->tabstrip_model())); + EXPECT_EQ("100 0 1", IDString(browser2->tab_strip_model())); } // Creates two browsers, selects all tabs in first, drags into second, then hits @@ -313,8 +313,8 @@ IN_PROC_BROWSER_TEST_F(TabDragControllerTest, Browser* browser2 = CreateAnotherWindowBrowserAndRelayout(); TabStrip* tab_strip2 = GetTabStripForBrowser(browser2); - browser()->tabstrip_model()->AddTabAtToSelection(0); - browser()->tabstrip_model()->AddTabAtToSelection(1); + browser()->tab_strip_model()->AddTabAtToSelection(0); + browser()->tab_strip_model()->AddTabAtToSelection(1); // Move to the first tab and drag it enough so that it detaches, but not // enough that it attaches to browser2. @@ -349,6 +349,6 @@ IN_PROC_BROWSER_TEST_F(TabDragControllerTest, ASSERT_FALSE(tab_strip2->IsDragSessionActive()); ASSERT_FALSE(TabDragController::IsActive()); ASSERT_EQ(2u, BrowserList::size()); - EXPECT_EQ("0 1", IDString(browser()->tabstrip_model())); - EXPECT_EQ("100", IDString(browser2->tabstrip_model())); + EXPECT_EQ("0 1", IDString(browser()->tab_strip_model())); + EXPECT_EQ("100", IDString(browser2->tab_strip_model())); } diff --git a/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc b/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc index 3e6ae5a..5ff70903 100644 --- a/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc +++ b/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc @@ -164,7 +164,7 @@ void SyncPromoHandler::Observe(int type, case chrome::NOTIFICATION_BROWSER_CLOSING: { // Make sure we're in the tab strip of the closing window. Browser* browser = content::Source<Browser>(source).ptr(); - if (browser->tabstrip_model()->GetWrapperIndex( + if (browser->tab_strip_model()->GetWrapperIndex( web_ui()->GetWebContents()) != TabStripModel::kNoTab) { RecordUserFlowAction(SYNC_PROMO_CLOSED_WINDOW); window_already_closed_ = true; diff --git a/chrome/browser/ui/webui/web_ui_browsertest.cc b/chrome/browser/ui/webui/web_ui_browsertest.cc index c7061f1..2a7e0bf 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) { ui_test_utils::NavigateToURL(browser(), browse_to); TestTabStripModelObserver tabstrip_observer( - browser()->tabstrip_model(), this); + browser()->tab_strip_model(), this); browser()->Print(); tabstrip_observer.WaitForObservation( base::Bind(&ui_test_utils::RunMessageLoop), |