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

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

Issue 338008: Resubmit http://codereview.chromium.org/314016 with views fixed (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 | « no previous file | chrome/browser/dom_ui/new_tab_page_sync_handler.cc » ('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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-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/command_line.h" 9 #include "base/command_line.h"
10 #include "base/keyboard_codes.h" 10 #include "base/keyboard_codes.h"
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 command_updater_.UpdateCommandEnabled(IDC_FOCUS_TOOLBAR, show_main_ui); 646 command_updater_.UpdateCommandEnabled(IDC_FOCUS_TOOLBAR, show_main_ui);
647 command_updater_.UpdateCommandEnabled(IDC_FOCUS_LOCATION, show_main_ui); 647 command_updater_.UpdateCommandEnabled(IDC_FOCUS_LOCATION, show_main_ui);
648 command_updater_.UpdateCommandEnabled(IDC_FOCUS_SEARCH, show_main_ui); 648 command_updater_.UpdateCommandEnabled(IDC_FOCUS_SEARCH, show_main_ui);
649 649
650 // Show various bits of UI 650 // Show various bits of UI
651 command_updater_.UpdateCommandEnabled(IDC_DEVELOPER_MENU, show_main_ui); 651 command_updater_.UpdateCommandEnabled(IDC_DEVELOPER_MENU, show_main_ui);
652 command_updater_.UpdateCommandEnabled(IDC_NEW_PROFILE, show_main_ui); 652 command_updater_.UpdateCommandEnabled(IDC_NEW_PROFILE, show_main_ui);
653 command_updater_.UpdateCommandEnabled(IDC_REPORT_BUG, show_main_ui); 653 command_updater_.UpdateCommandEnabled(IDC_REPORT_BUG, show_main_ui);
654 command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_BAR, show_main_ui); 654 command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_BAR, show_main_ui);
655 command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, show_main_ui); 655 command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, show_main_ui);
656 command_updater_.UpdateCommandEnabled(IDC_SYNC_BOOKMARKS, show_main_ui); 656 #if defined(BROWSER_SYNC)
657 command_updater_.UpdateCommandEnabled(
658 IDC_SYNC_BOOKMARKS,
659 show_main_ui && profile_->GetProfileSyncService() != NULL);
660 #endif
657 command_updater_.UpdateCommandEnabled(IDC_OPTIONS, show_main_ui); 661 command_updater_.UpdateCommandEnabled(IDC_OPTIONS, show_main_ui);
658 command_updater_.UpdateCommandEnabled(IDC_EDIT_SEARCH_ENGINES, show_main_ui); 662 command_updater_.UpdateCommandEnabled(IDC_EDIT_SEARCH_ENGINES, show_main_ui);
659 command_updater_.UpdateCommandEnabled(IDC_VIEW_PASSWORDS, show_main_ui); 663 command_updater_.UpdateCommandEnabled(IDC_VIEW_PASSWORDS, show_main_ui);
660 command_updater_.UpdateCommandEnabled(IDC_ABOUT, show_main_ui); 664 command_updater_.UpdateCommandEnabled(IDC_ABOUT, show_main_ui);
661 command_updater_.UpdateCommandEnabled(IDC_SHOW_APP_MENU, show_main_ui); 665 command_updater_.UpdateCommandEnabled(IDC_SHOW_APP_MENU, show_main_ui);
662 command_updater_.UpdateCommandEnabled(IDC_SHOW_PAGE_MENU, show_main_ui); 666 command_updater_.UpdateCommandEnabled(IDC_SHOW_PAGE_MENU, show_main_ui);
663 } 667 }
664 668
665 /////////////////////////////////////////////////////////////////////////////// 669 ///////////////////////////////////////////////////////////////////////////////
666 // Browser, Assorted browser commands: 670 // Browser, Assorted browser commands:
(...skipping 2285 matching lines...) Expand 10 before | Expand all | Expand 10 after
2952 /////////////////////////////////////////////////////////////////////////////// 2956 ///////////////////////////////////////////////////////////////////////////////
2953 // BrowserToolbarModel (private): 2957 // BrowserToolbarModel (private):
2954 2958
2955 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { 2959 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() {
2956 // This |current_tab| can be NULL during the initialization of the 2960 // This |current_tab| can be NULL during the initialization of the
2957 // toolbar during window creation (i.e. before any tabs have been added 2961 // toolbar during window creation (i.e. before any tabs have been added
2958 // to the window). 2962 // to the window).
2959 TabContents* current_tab = browser_->GetSelectedTabContents(); 2963 TabContents* current_tab = browser_->GetSelectedTabContents();
2960 return current_tab ? &current_tab->controller() : NULL; 2964 return current_tab ? &current_tab->controller() : NULL;
2961 } 2965 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/dom_ui/new_tab_page_sync_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698