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

Unified Diff: ui/views/controls/menu/menu_item_view.cc

Issue 12096094: Finalizing the 'OnClick' behavior of the Launcher items. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/menu/menu_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_item_view.cc
diff --git a/ui/views/controls/menu/menu_item_view.cc b/ui/views/controls/menu/menu_item_view.cc
index eb19fbb3fb960cea3e5f6516f7c7f033fff3e181..dc49ea93c973fe5c9d7e5d1d209b14601b983b8a 100644
--- a/ui/views/controls/menu/menu_item_view.cc
+++ b/ui/views/controls/menu/menu_item_view.cc
@@ -776,7 +776,13 @@ void MenuItemView::PaintButtonCommon(gfx::Canvas* canvas,
// only need the background when we want it to look different, as when we're
// selected.
ui::NativeTheme* native_theme = GetNativeTheme();
- if (render_selection) {
+ SkColor override_color;
+ if (GetDelegate() &&
+ GetDelegate()->GetBackgroundColor(GetCommand(),
+ render_selection,
+ &override_color)) {
+ canvas->DrawColor(override_color);
+ } else if (render_selection) {
if (ui::NativeTheme::IsNewMenuStyleEnabled()) {
gfx::Rect item_bounds(0, 0, width(), height());
AdjustBoundsForRTLUI(&item_bounds);
« no previous file with comments | « ui/views/controls/menu/menu_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698