Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6932)

Unified Diff: chrome/browser/ui/startup/startup_browser_creator_impl.cc

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/startup/startup_browser_creator_impl.cc
===================================================================
--- chrome/browser/ui/startup/startup_browser_creator_impl.cc (revision 145001)
+++ chrome/browser/ui/startup/startup_browser_creator_impl.cc (working copy)
@@ -44,6 +44,8 @@
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_navigator.h"
+#include "chrome/browser/ui/browser_tabrestore.h"
+#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/extensions/application_launch.h"
#include "chrome/browser/ui/startup/autolaunch_prompt.h"
@@ -696,7 +698,7 @@
add_types |= TabStripModel::ADD_FORCE_INDEX;
if (tabs[i].is_pinned)
add_types |= TabStripModel::ADD_PINNED;
- int index = browser->GetIndexForInsertionDuringRestore(i);
+ int index = chrome::GetIndexForInsertionDuringRestore(browser, i);
browser::NavigateParams params(browser, tabs[i].url,
content::PAGE_TRANSITION_START_PAGE);
@@ -709,18 +711,18 @@
first_tab = false;
}
- if (!browser->GetActiveWebContents()) {
+ if (!chrome::GetActiveWebContents(browser)) {
// TODO: this is a work around for 110909. Figure out why it's needed.
if (!browser->tab_count())
browser->AddBlankTab(true);
else
- browser->ActivateTabAt(0, false);
+ chrome::ActivateTabAt(browser, 0, false);
}
browser->window()->Show();
// TODO(jcampan): http://crbug.com/8123 we should not need to set the initial
// focus explicitly.
- browser->GetActiveWebContents()->GetView()->SetInitialFocus();
+ chrome::GetActiveWebContents(browser)->GetView()->SetInitialFocus();
return browser;
}

Powered by Google App Engine
This is Rietveld 408576698