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

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

Issue 12483006: wrench_menu: use NativeTheme colors under aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix windows build Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/menu/menu_config.h ('k') | ui/views/controls/menu/menu_config_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_config_views.cc
diff --git a/ui/views/controls/menu/menu_config_views.cc b/ui/views/controls/menu/menu_config_views.cc
index 7cbc23596c67400db2ac1939d6f3881646f4e16a..e07c8a3fcaf74b982e3954a64c1be3bc8ad56f88 100644
--- a/ui/views/controls/menu/menu_config_views.cc
+++ b/ui/views/controls/menu/menu_config_views.cc
@@ -24,12 +24,11 @@ static const int kMenuCornerRadiusForAura = 2;
#if !defined(OS_WIN)
void MenuConfig::Init(const ui::NativeTheme* theme) {
- InitAura();
+ InitAura(theme);
}
#endif
-void MenuConfig::InitAura() {
- ui::NativeTheme* theme = ui::NativeThemeAura::instance();
+void MenuConfig::InitAura(const ui::NativeTheme* theme) {
text_color = theme->GetSystemColor(
ui::NativeTheme::kColorId_EnabledMenuItemForegroundColor);
menu_horizontal_border_size = 0;
@@ -64,7 +63,8 @@ void MenuConfig::InitAura() {
const MenuConfig& MenuConfig::instance(const ui::NativeTheme* theme) {
static MenuConfig* views_instance = NULL;
if (!views_instance)
- views_instance = new MenuConfig(ui::NativeTheme::instance());
+ views_instance = new MenuConfig(theme ?
+ theme : ui::NativeTheme::instance());
return *views_instance;
}
#endif
« no previous file with comments | « ui/views/controls/menu/menu_config.h ('k') | ui/views/controls/menu/menu_config_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698