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

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

Issue 10831372: Revert 152080 - Refactor browser window zoom handling and enable zoom icon on all platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/ui/browser.cc ('k') | chrome/browser/ui/browser_window.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) 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 "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/defaults.h" 9 #include "chrome/browser/defaults.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 command_updater_.UpdateCommandEnabled(IDC_RELOAD_CLEARING_CACHE, 892 command_updater_.UpdateCommandEnabled(IDC_RELOAD_CLEARING_CACHE,
893 CanReload(browser_)); 893 CanReload(browser_));
894 894
895 // Window management commands 895 // Window management commands
896 command_updater_.UpdateCommandEnabled(IDC_DUPLICATE_TAB, 896 command_updater_.UpdateCommandEnabled(IDC_DUPLICATE_TAB,
897 !browser_->is_app() && CanDuplicateTab(browser_)); 897 !browser_->is_app() && CanDuplicateTab(browser_));
898 898
899 // Page-related commands 899 // Page-related commands
900 window()->SetStarredState( 900 window()->SetStarredState(
901 current_tab_contents->bookmark_tab_helper()->is_starred()); 901 current_tab_contents->bookmark_tab_helper()->is_starred());
902 window()->ZoomChangedForActiveTab(false); 902 window()->SetZoomIconState(
903 current_tab_contents->zoom_controller()->zoom_icon_state());
904 window()->SetZoomIconTooltipPercent(
905 current_tab_contents->zoom_controller()->zoom_percent());
903 command_updater_.UpdateCommandEnabled(IDC_VIEW_SOURCE, 906 command_updater_.UpdateCommandEnabled(IDC_VIEW_SOURCE,
904 CanViewSource(browser_)); 907 CanViewSource(browser_));
905 command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION, 908 command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION,
906 CanEmailPageLocation(browser_)); 909 CanEmailPageLocation(browser_));
907 if (browser_->is_devtools()) 910 if (browser_->is_devtools())
908 command_updater_.UpdateCommandEnabled(IDC_OPEN_FILE, false); 911 command_updater_.UpdateCommandEnabled(IDC_OPEN_FILE, false);
909 912
910 // Changing the encoding is not possible on Chrome-internal webpages. 913 // Changing the encoding is not possible on Chrome-internal webpages.
911 NavigationController& nc = current_web_contents->GetController(); 914 NavigationController& nc = current_web_contents->GetController();
912 bool is_chrome_internal = HasInternalURL(nc.GetActiveEntry()) || 915 bool is_chrome_internal = HasInternalURL(nc.GetActiveEntry()) ||
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 bool BrowserCommandController::IsFullScreenWindowOpen() { 1104 bool BrowserCommandController::IsFullScreenWindowOpen() {
1102 #if defined(USE_ASH) 1105 #if defined(USE_ASH)
1103 aura::Window* window = ash::wm::GetActiveWindow(); 1106 aura::Window* window = ash::wm::GetActiveWindow();
1104 return (window && ash::wm::IsWindowFullscreen(window)); 1107 return (window && ash::wm::IsWindowFullscreen(window));
1105 #else 1108 #else
1106 return false; 1109 return false;
1107 #endif 1110 #endif
1108 } 1111 }
1109 1112
1110 } // namespace chrome 1113 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698