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

Side by Side Diff: ui/views/controls/menu/menu_delegate.cc

Issue 423833002: Check if the delegate changed the visibility of child MenuItemViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added MenuModelAdapter::IsCommandVisible Created 6 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 | « ui/views/controls/menu/menu_delegate.h ('k') | ui/views/controls/menu/menu_item_view.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 "ui/views/controls/menu/menu_delegate.h" 5 #include "ui/views/controls/menu/menu_delegate.h"
6 6
7 #include "ui/events/event.h" 7 #include "ui/events/event.h"
8 #include "ui/views/controls/menu/menu_config.h" 8 #include "ui/views/controls/menu/menu_config.h"
9 9
10 namespace views { 10 namespace views {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 58
59 bool MenuDelegate::SupportsCommand(int id) const { 59 bool MenuDelegate::SupportsCommand(int id) const {
60 return true; 60 return true;
61 } 61 }
62 62
63 bool MenuDelegate::IsCommandEnabled(int id) const { 63 bool MenuDelegate::IsCommandEnabled(int id) const {
64 return true; 64 return true;
65 } 65 }
66 66
67 bool MenuDelegate::IsCommandVisible(int id) const {
68 return true;
69 }
70
67 bool MenuDelegate::GetContextualLabel(int id, base::string16* out) const { 71 bool MenuDelegate::GetContextualLabel(int id, base::string16* out) const {
68 return false; 72 return false;
69 } 73 }
70 74
71 bool MenuDelegate::ShouldCloseAllMenusOnExecute(int id) { 75 bool MenuDelegate::ShouldCloseAllMenusOnExecute(int id) {
72 return true; 76 return true;
73 } 77 }
74 78
75 void MenuDelegate::ExecuteCommand(int id, int mouse_event_flags) { 79 void MenuDelegate::ExecuteCommand(int id, int mouse_event_flags) {
76 ExecuteCommand(id); 80 ExecuteCommand(id);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 int* right_margin) const { 165 int* right_margin) const {
162 *left_margin = 0; 166 *left_margin = 0;
163 *right_margin = 0; 167 *right_margin = 0;
164 } 168 }
165 169
166 bool MenuDelegate::ShouldReserveSpaceForSubmenuIndicator() const { 170 bool MenuDelegate::ShouldReserveSpaceForSubmenuIndicator() const {
167 return true; 171 return true;
168 } 172 }
169 173
170 } // namespace views 174 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_delegate.h ('k') | ui/views/controls/menu/menu_item_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698