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

Unified Diff: chrome/browser/views/tabs/browser_tab_strip_controller.cc

Issue 2060004: Removing the app launcher button on ChromeOS (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: One more clean up Created 10 years, 7 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
« no previous file with comments | « chrome/browser/views/pinned_contents_info_bubble.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/tabs/browser_tab_strip_controller.cc
diff --git a/chrome/browser/views/tabs/browser_tab_strip_controller.cc b/chrome/browser/views/tabs/browser_tab_strip_controller.cc
index a2a8c920ae63e1778bf71ec844383e9558471651..eeb24eba6cac21facd04c8025d1138e41c671b6f 100644
--- a/chrome/browser/views/tabs/browser_tab_strip_controller.cc
+++ b/chrome/browser/views/tabs/browser_tab_strip_controller.cc
@@ -252,18 +252,13 @@ bool BrowserTabStripController::IsCompatibleWith(BaseTabStrip* other) const {
}
void BrowserTabStripController::CreateNewTab() {
- // TODO(jcampan): if we decide to keep the app launcher as the default
- // behavior for the new tab button, we should add a method
- // on the TabStripDelegate to do so.
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsPanel)) {
- NavigationController& controller =
- model_->GetSelectedTabContents()->controller();
- AppLauncher::ShowForNewTab(
- Browser::GetBrowserForController(&controller, NULL), std::string());
- return;
- }
UserMetrics::RecordAction(UserMetricsAction("NewTab_Button"),
model_->profile());
+
+ Browser* browser = model_->GetSelectedTabContents()->delegate()->GetBrowser();
+ if (browser->OpenAppsPanelAsNewTab())
+ return;
+
model_->delegate()->AddBlankTab(true);
}
« no previous file with comments | « chrome/browser/views/pinned_contents_info_bubble.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698