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

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

Issue 205153003: linux_aura: Don't inject black in WrenchMenu::GetForegroundColor(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style nit Created 6 years, 9 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/native_theme/native_theme_win.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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // radio buttons and check buttons. 59 // radio buttons and check buttons.
60 virtual bool IsItemChecked(int id) const; 60 virtual bool IsItemChecked(int id) const;
61 61
62 // The string shown for the menu item. This is only invoked when an item is 62 // The string shown for the menu item. This is only invoked when an item is
63 // added with an empty label. 63 // added with an empty label.
64 virtual base::string16 GetLabel(int id) const; 64 virtual base::string16 GetLabel(int id) const;
65 65
66 // The font for the menu item label. 66 // The font for the menu item label.
67 virtual const gfx::FontList* GetLabelFontList(int id) const; 67 virtual const gfx::FontList* GetLabelFontList(int id) const;
68 68
69 // Whether this item should be displayed with a bolder color when disabled.
70 virtual bool GetBoldedDisabled(int command_id) const;
sky 2014/03/20 02:07:49 Bold implies a font. How about GetShouldUseDisable
71
69 // Override the text color of a given menu item dependent on the 72 // Override the text color of a given menu item dependent on the
70 // |command_id| and its |is_hovered| state. Returns true if it chooses to 73 // |command_id| and its |is_hovered| state. Returns true if it chooses to
71 // override the color. 74 // override the color.
75 //
76 // TODO(erg): Remove this interface. Injecting raw colors into the menu
77 // circumvents the NativeTheme.
72 virtual bool GetForegroundColor(int command_id, 78 virtual bool GetForegroundColor(int command_id,
73 bool is_hovered, 79 bool is_hovered,
74 SkColor* override_color) const; 80 SkColor* override_color) const;
75 81
76 // Override the background color of a given menu item dependent on the 82 // Override the background color of a given menu item dependent on the
77 // |command_id| and its |is_hovered| state. Returns true if it chooses to 83 // |command_id| and its |is_hovered| state. Returns true if it chooses to
78 // override the color. 84 // override the color.
85 //
86 // TODO(erg): Remove this interface. Injecting raw colors into the menu
87 // circumvents the NativeTheme.
79 virtual bool GetBackgroundColor(int command_id, 88 virtual bool GetBackgroundColor(int command_id,
80 bool is_hovered, 89 bool is_hovered,
81 SkColor* override_color) const; 90 SkColor* override_color) const;
82 91
83 // The tooltip shown for the menu item. This is invoked when the user 92 // The tooltip shown for the menu item. This is invoked when the user
84 // hovers over the item, and no tooltip text has been set for that item. 93 // hovers over the item, and no tooltip text has been set for that item.
85 virtual base::string16 GetTooltipText(int id, 94 virtual base::string16 GetTooltipText(int id,
86 const gfx::Point& screen_loc) const; 95 const gfx::Point& screen_loc) const;
87 96
88 // If there is an accelerator for the menu item with id |id| it is set in 97 // If there is an accelerator for the menu item with id |id| it is set in
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 int* left_margin, 234 int* left_margin,
226 int* right_margin) const; 235 int* right_margin) const;
227 // Returns true if the labels should reserve additional spacing for e.g. 236 // Returns true if the labels should reserve additional spacing for e.g.
228 // submenu indicators at the end of the line. 237 // submenu indicators at the end of the line.
229 virtual bool ShouldReserveSpaceForSubmenuIndicator() const; 238 virtual bool ShouldReserveSpaceForSubmenuIndicator() const;
230 }; 239 };
231 240
232 } // namespace views 241 } // namespace views
233 242
234 #endif // UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_ 243 #endif // UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme_win.cc ('k') | ui/views/controls/menu/menu_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698