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

Side by Side Diff: ui/views/controls/menu/menu_config_win.cc

Issue 708133002: win: build fixes (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: . Created 6 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 unified diff | Download patch
« no previous file with comments | « ui/views/BUILD.gn ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/controls/menu/menu_config.h" 5 #include "ui/views/controls/menu/menu_config.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <uxtheme.h> 8 #include <uxtheme.h>
9 #include <Vssym32.h> 9 #include <Vssym32.h>
10 10
(...skipping 11 matching lines...) Expand all
22 namespace views { 22 namespace views {
23 23
24 void MenuConfig::Init(const NativeTheme* theme) { 24 void MenuConfig::Init(const NativeTheme* theme) {
25 if (theme == ui::NativeThemeAura::instance()) { 25 if (theme == ui::NativeThemeAura::instance()) {
26 InitAura(theme); 26 InitAura(theme);
27 return; 27 return;
28 } 28 }
29 29
30 arrow_color = color_utils::GetSysSkColor(COLOR_MENUTEXT); 30 arrow_color = color_utils::GetSysSkColor(COLOR_MENUTEXT);
31 31
32 NONCLIENTMETRICS metrics; 32 NONCLIENTMETRICS_XP metrics;
33 base::win::GetNonClientMetrics(&metrics); 33 base::win::GetNonClientMetrics(&metrics);
34 l10n_util::AdjustUIFont(&(metrics.lfMenuFont)); 34 l10n_util::AdjustUIFont(&(metrics.lfMenuFont));
35 { 35 {
36 base::win::ScopedHFONT new_font(CreateFontIndirect(&metrics.lfMenuFont)); 36 base::win::ScopedHFONT new_font(CreateFontIndirect(&metrics.lfMenuFont));
37 DLOG_ASSERT(new_font.Get()); 37 DLOG_ASSERT(new_font.Get());
38 font_list = gfx::FontList(gfx::Font(new_font)); 38 font_list = gfx::FontList(gfx::Font(new_font));
39 } 39 }
40 NativeTheme::ExtraParams extra; 40 NativeTheme::ExtraParams extra;
41 extra.menu_check.is_radio = false; 41 extra.menu_check.is_radio = false;
42 extra.menu_check.is_selected = false; 42 extra.menu_check.is_selected = false;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 win_instance = new MenuConfig(NativeThemeWin::instance()); 87 win_instance = new MenuConfig(NativeThemeWin::instance());
88 return *win_instance; 88 return *win_instance;
89 } 89 }
90 static MenuConfig* views_instance = NULL; 90 static MenuConfig* views_instance = NULL;
91 if (!views_instance) 91 if (!views_instance)
92 views_instance = new MenuConfig(theme); 92 views_instance = new MenuConfig(theme);
93 return *views_instance; 93 return *views_instance;
94 } 94 }
95 95
96 } // namespace views 96 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/BUILD.gn ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698