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

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

Issue 501073: Native Cocoa bookmark manager, part 1 (Closed)
Patch Set: Style fixes, and copy/paste unit tests Created 10 years, 11 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "app/animation.h" 7 #include "app/animation.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 2523 matching lines...) Expand 10 before | Expand all | Expand 10 after
2534 command_updater_.UpdateCommandEnabled(IDC_ZOOM_MINUS, true); 2534 command_updater_.UpdateCommandEnabled(IDC_ZOOM_MINUS, true);
2535 2535
2536 // Show various bits of UI 2536 // Show various bits of UI
2537 command_updater_.UpdateCommandEnabled(IDC_OPEN_FILE, true); 2537 command_updater_.UpdateCommandEnabled(IDC_OPEN_FILE, true);
2538 command_updater_.UpdateCommandEnabled(IDC_CREATE_SHORTCUTS, false); 2538 command_updater_.UpdateCommandEnabled(IDC_CREATE_SHORTCUTS, false);
2539 command_updater_.UpdateCommandEnabled(IDC_DEV_TOOLS, true); 2539 command_updater_.UpdateCommandEnabled(IDC_DEV_TOOLS, true);
2540 command_updater_.UpdateCommandEnabled(IDC_DEV_TOOLS_CONSOLE, true); 2540 command_updater_.UpdateCommandEnabled(IDC_DEV_TOOLS_CONSOLE, true);
2541 command_updater_.UpdateCommandEnabled(IDC_TASK_MANAGER, true); 2541 command_updater_.UpdateCommandEnabled(IDC_TASK_MANAGER, true);
2542 command_updater_.UpdateCommandEnabled(IDC_SELECT_PROFILE, true); 2542 command_updater_.UpdateCommandEnabled(IDC_SELECT_PROFILE, true);
2543 command_updater_.UpdateCommandEnabled(IDC_SHOW_HISTORY, true); 2543 command_updater_.UpdateCommandEnabled(IDC_SHOW_HISTORY, true);
2544 #if !defined(OS_MACOSX) // http://crbug.com/13149
2545 command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_MANAGER, true); 2544 command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_MANAGER, true);
2546 #endif
2547 command_updater_.UpdateCommandEnabled(IDC_SHOW_EXTENSION_SHELF, true); 2545 command_updater_.UpdateCommandEnabled(IDC_SHOW_EXTENSION_SHELF, true);
2548 command_updater_.UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true); 2546 command_updater_.UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true);
2549 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE, true); 2547 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE, true);
2550 command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, true); 2548 command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, true);
2551 2549
2552 ExtensionsService* extensions_service = profile()->GetExtensionsService(); 2550 ExtensionsService* extensions_service = profile()->GetExtensionsService();
2553 bool enable_extensions = 2551 bool enable_extensions =
2554 extensions_service && extensions_service->extensions_enabled(); 2552 extensions_service && extensions_service->extensions_enabled();
2555 command_updater_.UpdateCommandEnabled(IDC_MANAGE_EXTENSIONS, 2553 command_updater_.UpdateCommandEnabled(IDC_MANAGE_EXTENSIONS,
2556 enable_extensions); 2554 enable_extensions);
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
3177 /////////////////////////////////////////////////////////////////////////////// 3175 ///////////////////////////////////////////////////////////////////////////////
3178 // BrowserToolbarModel (private): 3176 // BrowserToolbarModel (private):
3179 3177
3180 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { 3178 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() {
3181 // This |current_tab| can be NULL during the initialization of the 3179 // This |current_tab| can be NULL during the initialization of the
3182 // toolbar during window creation (i.e. before any tabs have been added 3180 // toolbar during window creation (i.e. before any tabs have been added
3183 // to the window). 3181 // to the window).
3184 TabContents* current_tab = browser_->GetSelectedTabContents(); 3182 TabContents* current_tab = browser_->GetSelectedTabContents();
3185 return current_tab ? &current_tab->controller() : NULL; 3183 return current_tab ? &current_tab->controller() : NULL;
3186 } 3184 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698