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

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

Issue 1454583002: Change Views menus to consistently use GetNativeTheme for theming. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review Created 5 years, 1 month 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_controller.h ('k') | ui/views/controls/menu/menu_item_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_controller.cc
diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
index b3a6adacecfd3197cc01a845b7e06019ed13fdbe..3d437a8e60d6c528f8a4108a8a0b65c5036d995a 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -1217,8 +1217,7 @@ void MenuController::OnKeyDown(ui::KeyboardCode key_code) {
}
}
-MenuController::MenuController(ui::NativeTheme* theme,
- bool blocking,
+MenuController::MenuController(bool blocking,
internal::MenuControllerDelegate* delegate)
: blocking_run_(blocking),
showing_(false),
@@ -1238,7 +1237,6 @@ MenuController::MenuController(ui::NativeTheme* theme,
active_mouse_view_id_(ViewStorage::GetInstance()->CreateStorageID()),
delegate_(delegate),
message_loop_depth_(0),
- menu_config_(theme),
closing_event_time_(base::TimeDelta()),
menu_start_time_(base::TimeTicks()),
is_combobox_(false),
@@ -1733,8 +1731,11 @@ void MenuController::BuildMenuItemPath(MenuItemView* item,
}
void MenuController::StartShowTimer() {
+ static MenuConfig* menu_config = nullptr;
sky 2015/11/17 18:22:24 I don't like the static here. Can you get the menu
Evan Stade 2015/11/17 18:54:33 I'm not sure what you meant by root item, but I th
+ if (!menu_config)
+ menu_config = new MenuConfig(nullptr);
show_timer_.Start(FROM_HERE,
- TimeDelta::FromMilliseconds(menu_config_.show_delay),
+ TimeDelta::FromMilliseconds(menu_config->show_delay),
this, &MenuController::CommitPendingSelection);
}
« no previous file with comments | « ui/views/controls/menu/menu_controller.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