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

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

Issue 1477253002: Use a single views::MenuConfig instance for each platform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify more things Created 5 years 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
Index: ui/views/controls/menu/native_menu_win.cc
diff --git a/ui/views/controls/menu/native_menu_win.cc b/ui/views/controls/menu/native_menu_win.cc
index 3c656f16c7c94c06f598c31801e79105674fca11..84c0fd950f11b9742719e3205a4f1896a34537bf 100644
--- a/ui/views/controls/menu/native_menu_win.cc
+++ b/ui/views/controls/menu/native_menu_win.cc
@@ -271,8 +271,7 @@ class NativeMenuWin::MenuHostWindow {
data->native_menu_win->model_->IsItemCheckedAt(
data->model_index)) {
// Manually render a checkbox.
- ui::NativeThemeWin* native_theme = ui::NativeThemeWin::instance();
- const MenuConfig& config = MenuConfig::instance(native_theme);
+ const MenuConfig& config = MenuConfig::instance();
NativeTheme::State state;
if (draw_item_struct->itemState & ODS_DISABLED) {
state = NativeTheme::kDisabled;
@@ -288,6 +287,7 @@ class NativeMenuWin::MenuHostWindow {
gfx::Rect bounds(0, 0, config.check_width, config.check_height);
// Draw the background and the check.
+ ui::NativeThemeWin* native_theme = ui::NativeThemeWin::instance();
native_theme->Paint(
canvas.sk_canvas(), NativeTheme::kMenuCheckBackground,
state, bounds, extra);

Powered by Google App Engine
This is Rietveld 408576698