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

Side by Side Diff: views/controls/menu/menu_item_view.cc

Issue 7825024: For Touch: remove some menu items for experimentation, adjust sizes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 9 years, 3 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 | « views/controls/menu/menu_config_linux.cc ('k') | views/controls/menu/menu_item_view_linux.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/controls/menu/menu_item_view.h" 5 #include "views/controls/menu/menu_item_view.h"
6 6
7 #include "base/i18n/case_conversion.h" 7 #include "base/i18n/case_conversion.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "grit/ui_strings.h" 10 #include "grit/ui_strings.h"
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 // instead. 682 // instead.
683 return gfx::Size(width, 0); 683 return gfx::Size(width, 0);
684 } 684 }
685 685
686 string16 MenuItemView::GetAcceleratorText() { 686 string16 MenuItemView::GetAcceleratorText() {
687 if (id() == kEmptyMenuItemViewID) { 687 if (id() == kEmptyMenuItemViewID) {
688 // Don't query the delegate for menus that represent no children. 688 // Don't query the delegate for menus that represent no children.
689 return string16(); 689 return string16();
690 } 690 }
691 691
692 if(!MenuConfig::instance().show_accelerators)
693 return string16();
694
692 Accelerator accelerator; 695 Accelerator accelerator;
693 return (GetDelegate() && 696 return (GetDelegate() &&
694 GetDelegate()->GetAccelerator(GetCommand(), &accelerator)) ? 697 GetDelegate()->GetAccelerator(GetCommand(), &accelerator)) ?
695 accelerator.GetShortcutText() : string16(); 698 accelerator.GetShortcutText() : string16();
696 } 699 }
697 700
698 } // namespace views 701 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/menu/menu_config_linux.cc ('k') | views/controls/menu/menu_item_view_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698