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

Unified Diff: ui/views/controls/menu/menu_config_mac.mm

Issue 1461923002: Change name of NativeTheme::instance() to make it clear it's web only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: ui/views/controls/menu/menu_config_mac.mm
diff --git a/ui/views/controls/menu/menu_config_mac.mm b/ui/views/controls/menu/menu_config_mac.mm
index a961b68320fae3faf135ac86a02663e2c686d100..f46919b8cb8a52e88e600f1c7eb469953696cafe 100644
--- a/ui/views/controls/menu/menu_config_mac.mm
+++ b/ui/views/controls/menu/menu_config_mac.mm
@@ -13,6 +13,7 @@
namespace views {
void MenuConfig::Init(const ui::NativeTheme* theme) {
+ DCHECK_EQ(theme, ui::NativeThemeMac::instance());
font_list = gfx::FontList(gfx::Font([NSFont menuFontOfSize:0.0]));
menu_vertical_border_size = 4;
item_top_margin = item_no_icon_top_margin = 1;
@@ -34,8 +35,7 @@ void MenuConfig::Init(const ui::NativeTheme* theme) {
// static
const MenuConfig& MenuConfig::instance(const ui::NativeTheme* theme) {
- CR_DEFINE_STATIC_LOCAL(MenuConfig, mac_instance,
- (theme ? theme : ui::NativeTheme::instance()));
+ CR_DEFINE_STATIC_LOCAL(MenuConfig, mac_instance, theme);
return mac_instance;
}

Powered by Google App Engine
This is Rietveld 408576698