OLD | NEW |
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 "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 2539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2550 command_updater_.UpdateCommandEnabled(IDC_ZOOM_NORMAL, true); | 2550 command_updater_.UpdateCommandEnabled(IDC_ZOOM_NORMAL, true); |
2551 command_updater_.UpdateCommandEnabled(IDC_ZOOM_MINUS, true); | 2551 command_updater_.UpdateCommandEnabled(IDC_ZOOM_MINUS, true); |
2552 | 2552 |
2553 // Show various bits of UI | 2553 // Show various bits of UI |
2554 command_updater_.UpdateCommandEnabled(IDC_OPEN_FILE, true); | 2554 command_updater_.UpdateCommandEnabled(IDC_OPEN_FILE, true); |
2555 command_updater_.UpdateCommandEnabled(IDC_CREATE_SHORTCUTS, false); | 2555 command_updater_.UpdateCommandEnabled(IDC_CREATE_SHORTCUTS, false); |
2556 command_updater_.UpdateCommandEnabled(IDC_DEV_TOOLS, true); | 2556 command_updater_.UpdateCommandEnabled(IDC_DEV_TOOLS, true); |
2557 command_updater_.UpdateCommandEnabled(IDC_DEV_TOOLS_CONSOLE, true); | 2557 command_updater_.UpdateCommandEnabled(IDC_DEV_TOOLS_CONSOLE, true); |
2558 // TODO(viettrungluu): Temporarily disabled on Mac. Must disable here (not in | 2558 // TODO(viettrungluu): Temporarily disabled on Mac. Must disable here (not in |
2559 // BWC) so that it also affects the page menu. http://crbug.com/13156 | 2559 // BWC) so that it also affects the page menu. http://crbug.com/13156 |
2560 //#if !defined(OS_MACOSX) | 2560 #if !defined(OS_MACOSX) |
2561 command_updater_.UpdateCommandEnabled(IDC_TASK_MANAGER, true); | 2561 command_updater_.UpdateCommandEnabled(IDC_TASK_MANAGER, true); |
2562 //#endif | 2562 #endif |
2563 command_updater_.UpdateCommandEnabled(IDC_SELECT_PROFILE, true); | 2563 command_updater_.UpdateCommandEnabled(IDC_SELECT_PROFILE, true); |
2564 command_updater_.UpdateCommandEnabled(IDC_SHOW_HISTORY, true); | 2564 command_updater_.UpdateCommandEnabled(IDC_SHOW_HISTORY, true); |
2565 command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_MANAGER, true); | 2565 command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_MANAGER, true); |
2566 command_updater_.UpdateCommandEnabled(IDC_SHOW_EXTENSION_SHELF, true); | 2566 command_updater_.UpdateCommandEnabled(IDC_SHOW_EXTENSION_SHELF, true); |
2567 command_updater_.UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true); | 2567 command_updater_.UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true); |
2568 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE, true); | 2568 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE, true); |
2569 command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, true); | 2569 command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, true); |
2570 | 2570 |
2571 ExtensionsService* extensions_service = profile()->GetExtensionsService(); | 2571 ExtensionsService* extensions_service = profile()->GetExtensionsService(); |
2572 bool enable_extensions = | 2572 bool enable_extensions = |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3196 /////////////////////////////////////////////////////////////////////////////// | 3196 /////////////////////////////////////////////////////////////////////////////// |
3197 // BrowserToolbarModel (private): | 3197 // BrowserToolbarModel (private): |
3198 | 3198 |
3199 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { | 3199 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { |
3200 // This |current_tab| can be NULL during the initialization of the | 3200 // This |current_tab| can be NULL during the initialization of the |
3201 // toolbar during window creation (i.e. before any tabs have been added | 3201 // toolbar during window creation (i.e. before any tabs have been added |
3202 // to the window). | 3202 // to the window). |
3203 TabContents* current_tab = browser_->GetSelectedTabContents(); | 3203 TabContents* current_tab = browser_->GetSelectedTabContents(); |
3204 return current_tab ? ¤t_tab->controller() : NULL; | 3204 return current_tab ? ¤t_tab->controller() : NULL; |
3205 } | 3205 } |
OLD | NEW |