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

Side by Side Diff: chrome/browser/ui/panels/panel_window_controller_cocoa.mm

Issue 9456031: Remove PSS::ShowLoginDialog() and obsolete IDC_SYNC_BOOKMARKS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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
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/panels/panel_window_controller_cocoa.h" 5 #include "chrome/browser/ui/panels/panel_window_controller_cocoa.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/bundle_locations.h" 10 #include "base/mac/bundle_locations.h"
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 action == @selector(commandDispatchUsingKeyModifiers:)) { 279 action == @selector(commandDispatchUsingKeyModifiers:)) {
280 NSInteger tag = [item tag]; 280 NSInteger tag = [item tag];
281 CommandUpdater* command_updater = windowShim_->browser()->command_updater(); 281 CommandUpdater* command_updater = windowShim_->browser()->command_updater();
282 if (command_updater->SupportsCommand(tag)) { 282 if (command_updater->SupportsCommand(tag)) {
283 enable = command_updater->IsCommandEnabled(tag); 283 enable = command_updater->IsCommandEnabled(tag);
284 // Disable commands that do not apply to Panels. 284 // Disable commands that do not apply to Panels.
285 switch (tag) { 285 switch (tag) {
286 case IDC_CLOSE_TAB: 286 case IDC_CLOSE_TAB:
287 case IDC_FULLSCREEN: 287 case IDC_FULLSCREEN:
288 case IDC_PRESENTATION_MODE: 288 case IDC_PRESENTATION_MODE:
289 case IDC_SYNC_BOOKMARKS: 289 case IDC_SHOW_SYNC_SETUP:
290 enable = NO; 290 enable = NO;
291 break; 291 break;
292 default: 292 default:
293 // Special handling for the contents of the Text Encoding submenu. On 293 // Special handling for the contents of the Text Encoding submenu. On
294 // Mac OS, instead of enabling/disabling the top-level menu item, we 294 // Mac OS, instead of enabling/disabling the top-level menu item, we
295 // enable/disable the submenu's contents (per Apple's HIG). 295 // enable/disable the submenu's contents (per Apple's HIG).
296 EncodingMenuController encoding_controller; 296 EncodingMenuController encoding_controller;
297 if (encoding_controller.DoesCommandBelongToEncodingMenu(tag)) { 297 if (encoding_controller.DoesCommandBelongToEncodingMenu(tag)) {
298 enable &= command_updater->IsCommandEnabled(IDC_ENCODING_MENU) ? 298 enable &= command_updater->IsCommandEnabled(IDC_ENCODING_MENU) ?
299 YES : NO; 299 YES : NO;
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 621
622 - (BOOL)canBecomeKeyWindow { 622 - (BOOL)canBecomeKeyWindow {
623 // Panel can only gain focus if it is expanded. Minimized panels do not 623 // Panel can only gain focus if it is expanded. Minimized panels do not
624 // participate in Cmd-~ rotation. 624 // participate in Cmd-~ rotation.
625 // TODO(dimich): If it will be ever desired to expand/focus the Panel on 625 // TODO(dimich): If it will be ever desired to expand/focus the Panel on
626 // keyboard navigation or via main menu, the care should be taken to avoid 626 // keyboard navigation or via main menu, the care should be taken to avoid
627 // cases when minimized Panel is getting keyboard input, invisibly. 627 // cases when minimized Panel is getting keyboard input, invisibly.
628 return windowShim_->panel()->expansion_state() == Panel::EXPANDED; 628 return windowShim_->panel()->expansion_state() == Panel::EXPANDED;
629 } 629 }
630 @end 630 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698