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

Side by Side Diff: chrome/browser/browser.cc

Issue 661019: Add command line option to use a tabbed bookmark manager (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/dom_ui/bookmarks_ui.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/browser.h" 5 #include "chrome/browser/browser.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "app/animation.h" 10 #include "app/animation.h"
(...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 window_->ToggleBookmarkBar(); 1282 window_->ToggleBookmarkBar();
1283 } 1283 }
1284 1284
1285 void Browser::ToggleExtensionShelf() { 1285 void Browser::ToggleExtensionShelf() {
1286 UserMetrics::RecordAction("ToggleExtensionShelf", profile_); 1286 UserMetrics::RecordAction("ToggleExtensionShelf", profile_);
1287 window_->ToggleExtensionShelf(); 1287 window_->ToggleExtensionShelf();
1288 } 1288 }
1289 1289
1290 void Browser::OpenBookmarkManager() { 1290 void Browser::OpenBookmarkManager() {
1291 UserMetrics::RecordAction("ShowBookmarkManager", profile_); 1291 UserMetrics::RecordAction("ShowBookmarkManager", profile_);
1292 window_->ShowBookmarkManager(); 1292 if (CommandLine::ForCurrentProcess()->HasSwitch(
1293 switches::kEnableTabbedBookmarkManager)) {
1294 ShowBookmarkManagerTab();
1295 } else {
1296 window_->ShowBookmarkManager();
1297 }
1293 } 1298 }
1294 1299
1295 void Browser::ShowAppMenu() { 1300 void Browser::ShowAppMenu() {
1296 UserMetrics::RecordAction("ShowAppMenu", profile_); 1301 UserMetrics::RecordAction("ShowAppMenu", profile_);
1297 window_->ShowAppMenu(); 1302 window_->ShowAppMenu();
1298 } 1303 }
1299 1304
1300 void Browser::ShowPageMenu() { 1305 void Browser::ShowPageMenu() {
1301 UserMetrics::RecordAction("ShowPageMenu", profile_); 1306 UserMetrics::RecordAction("ShowPageMenu", profile_);
1302 window_->ShowPageMenu(); 1307 window_->ShowPageMenu();
1303 } 1308 }
1304 1309
1310 void Browser::ShowBookmarkManagerTab() {
1311 UserMetrics::RecordAction("ShowBookmarks", profile_);
1312 ShowSingletonTab(GURL(chrome::kChromeUIBookmarksURL));
1313 }
1314
1305 void Browser::ShowHistoryTab() { 1315 void Browser::ShowHistoryTab() {
1306 UserMetrics::RecordAction("ShowHistory", profile_); 1316 UserMetrics::RecordAction("ShowHistory", profile_);
1307 ShowSingletonTab(GURL(chrome::kChromeUIHistoryURL)); 1317 ShowSingletonTab(GURL(chrome::kChromeUIHistoryURL));
1308 } 1318 }
1309 1319
1310 void Browser::ShowDownloadsTab() { 1320 void Browser::ShowDownloadsTab() {
1311 UserMetrics::RecordAction("ShowDownloads", profile_); 1321 UserMetrics::RecordAction("ShowDownloads", profile_);
1312 ShowSingletonTab(GURL(chrome::kChromeUIDownloadsURL)); 1322 ShowSingletonTab(GURL(chrome::kChromeUIDownloadsURL));
1313 } 1323 }
1314 1324
(...skipping 1993 matching lines...) Expand 10 before | Expand all | Expand 10 after
3308 return; 3318 return;
3309 3319
3310 ExtensionsService* extension_service = profile()->GetExtensionsService(); 3320 ExtensionsService* extension_service = profile()->GetExtensionsService();
3311 if (extension_service && extension_service->is_ready()) { 3321 if (extension_service && extension_service->is_ready()) {
3312 Extension* extension = 3322 Extension* extension =
3313 extension_service->GetExtensionById(app_extension_id, false); 3323 extension_service->GetExtensionById(app_extension_id, false);
3314 if (extension) 3324 if (extension)
3315 contents->SetAppExtension(extension); 3325 contents->SetAppExtension(extension);
3316 } 3326 }
3317 } 3327 }
OLDNEW
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/dom_ui/bookmarks_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698