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

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

Issue 99853005: Revert of https://codereview.chromium.org/68713009/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/ui/browser_browsertest.cc ('k') | chrome/browser/ui/browser_commands.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/browser_command_controller.h" 5 #include "chrome/browser/ui/browser_command_controller.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 window()->ZoomChangedForActiveTab(false); 1088 window()->ZoomChangedForActiveTab(false);
1089 command_updater_.UpdateCommandEnabled(IDC_VIEW_SOURCE, 1089 command_updater_.UpdateCommandEnabled(IDC_VIEW_SOURCE,
1090 CanViewSource(browser_)); 1090 CanViewSource(browser_));
1091 command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION, 1091 command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION,
1092 CanEmailPageLocation(browser_)); 1092 CanEmailPageLocation(browser_));
1093 if (browser_->is_devtools()) 1093 if (browser_->is_devtools())
1094 command_updater_.UpdateCommandEnabled(IDC_OPEN_FILE, false); 1094 command_updater_.UpdateCommandEnabled(IDC_OPEN_FILE, false);
1095 1095
1096 // Changing the encoding is not possible on Chrome-internal webpages. 1096 // Changing the encoding is not possible on Chrome-internal webpages.
1097 NavigationController& nc = current_web_contents->GetController(); 1097 NavigationController& nc = current_web_contents->GetController();
1098 bool is_chrome_internal = HasInternalURL(nc.GetLastCommittedEntry()) || 1098 bool is_chrome_internal = HasInternalURL(nc.GetActiveEntry()) ||
1099 current_web_contents->ShowingInterstitialPage(); 1099 current_web_contents->ShowingInterstitialPage();
1100 command_updater_.UpdateCommandEnabled(IDC_ENCODING_MENU, 1100 command_updater_.UpdateCommandEnabled(IDC_ENCODING_MENU,
1101 !is_chrome_internal && current_web_contents->IsSavable()); 1101 !is_chrome_internal && current_web_contents->IsSavable());
1102 1102
1103 // Show various bits of UI 1103 // Show various bits of UI
1104 // TODO(pinkerton): Disable app-mode in the model until we implement it 1104 // TODO(pinkerton): Disable app-mode in the model until we implement it
1105 // on the Mac. Be sure to remove both ifdefs. http://crbug.com/13148 1105 // on the Mac. Be sure to remove both ifdefs. http://crbug.com/13148
1106 #if !defined(OS_MACOSX) 1106 #if !defined(OS_MACOSX)
1107 command_updater_.UpdateCommandEnabled( 1107 command_updater_.UpdateCommandEnabled(
1108 IDC_CREATE_SHORTCUTS, 1108 IDC_CREATE_SHORTCUTS,
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1339 1339
1340 BrowserWindow* BrowserCommandController::window() { 1340 BrowserWindow* BrowserCommandController::window() {
1341 return browser_->window(); 1341 return browser_->window();
1342 } 1342 }
1343 1343
1344 Profile* BrowserCommandController::profile() { 1344 Profile* BrowserCommandController::profile() {
1345 return browser_->profile(); 1345 return browser_->profile();
1346 } 1346 }
1347 1347
1348 } // namespace chrome 1348 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/browser_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698