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

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

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 years, 7 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/label.cc ('k') | ui/views/controls/menu/menu_delegate.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 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_ 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_
6 #define UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_ 6 #define UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 bool is_hovered, 96 bool is_hovered,
97 SkColor* override_color) const; 97 SkColor* override_color) const;
98 98
99 // The tooltip shown for the menu item. This is invoked when the user 99 // The tooltip shown for the menu item. This is invoked when the user
100 // hovers over the item, and no tooltip text has been set for that item. 100 // hovers over the item, and no tooltip text has been set for that item.
101 virtual base::string16 GetTooltipText(int id, 101 virtual base::string16 GetTooltipText(int id,
102 const gfx::Point& screen_loc) const; 102 const gfx::Point& screen_loc) const;
103 103
104 // If there is an accelerator for the menu item with id |id| it is set in 104 // If there is an accelerator for the menu item with id |id| it is set in
105 // |accelerator| and true is returned. 105 // |accelerator| and true is returned.
106 virtual bool GetAccelerator(int id, ui::Accelerator* accelerator); 106 virtual bool GetAccelerator(int id, ui::Accelerator* accelerator) const;
107 107
108 // Shows the context menu with the specified id. This is invoked when the 108 // Shows the context menu with the specified id. This is invoked when the
109 // user does the appropriate gesture to show a context menu. The id 109 // user does the appropriate gesture to show a context menu. The id
110 // identifies the id of the menu to show the context menu for. 110 // identifies the id of the menu to show the context menu for.
111 // is_mouse_gesture is true if this is the result of a mouse gesture. 111 // is_mouse_gesture is true if this is the result of a mouse gesture.
112 // If this is not the result of a mouse gesture |p| is the recommended 112 // If this is not the result of a mouse gesture |p| is the recommended
113 // location to display the content menu at. In either case, |p| is in 113 // location to display the content menu at. In either case, |p| is in
114 // screen coordinates. 114 // screen coordinates.
115 // Returns true if a context menu was displayed, otherwise false 115 // Returns true if a context menu was displayed, otherwise false
116 virtual bool ShowContextMenu(MenuItemView* source, 116 virtual bool ShowContextMenu(MenuItemView* source,
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 int* left_margin, 241 int* left_margin,
242 int* right_margin) const; 242 int* right_margin) const;
243 // Returns true if the labels should reserve additional spacing for e.g. 243 // Returns true if the labels should reserve additional spacing for e.g.
244 // submenu indicators at the end of the line. 244 // submenu indicators at the end of the line.
245 virtual bool ShouldReserveSpaceForSubmenuIndicator() const; 245 virtual bool ShouldReserveSpaceForSubmenuIndicator() const;
246 }; 246 };
247 247
248 } // namespace views 248 } // namespace views
249 249
250 #endif // UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_ 250 #endif // UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/views/controls/label.cc ('k') | ui/views/controls/menu/menu_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698