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

Side by Side Diff: ui/views/controls/menu/menu_config.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: Add menu_config_android 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 unified diff | Download patch
« no previous file with comments | « ui/views/controls/menu/menu_config.h ('k') | ui/views/controls/menu/menu_config_android.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 "build/build_config.h" 7 #include "base/macros.h"
8 8
9 namespace views { 9 namespace views {
10 10
11 MenuConfig::MenuConfig(const ui::NativeTheme* theme) 11 MenuConfig::MenuConfig()
12 : arrow_color(SK_ColorBLACK), 12 : arrow_color(SK_ColorBLACK),
13 menu_vertical_border_size(3), 13 menu_vertical_border_size(3),
14 menu_horizontal_border_size(0), 14 menu_horizontal_border_size(0),
15 submenu_horizontal_inset(3), 15 submenu_horizontal_inset(3),
16 item_top_margin(4), 16 item_top_margin(4),
17 item_bottom_margin(3), 17 item_bottom_margin(3),
18 item_no_icon_top_margin(4), 18 item_no_icon_top_margin(4),
19 item_no_icon_bottom_margin(4), 19 item_no_icon_bottom_margin(4),
20 item_left_margin(10), 20 item_left_margin(10),
21 label_to_arrow_padding(10), 21 label_to_arrow_padding(10),
(...skipping 13 matching lines...) Expand all
35 item_min_height(0), 35 item_min_height(0),
36 show_accelerators(true), 36 show_accelerators(true),
37 always_use_icon_to_label_padding(false), 37 always_use_icon_to_label_padding(false),
38 align_arrow_and_shortcut(false), 38 align_arrow_and_shortcut(false),
39 offset_context_menus(false), 39 offset_context_menus(false),
40 use_outer_border(true), 40 use_outer_border(true),
41 icons_in_label(false), 41 icons_in_label(false),
42 check_selected_combobox_item(false), 42 check_selected_combobox_item(false),
43 show_delay(400), 43 show_delay(400),
44 corner_radius(0) { 44 corner_radius(0) {
45 Init(theme); 45 Init();
46 } 46 }
47 47
48 MenuConfig::~MenuConfig() {} 48 MenuConfig::~MenuConfig() {}
49 49
50 // static
51 const MenuConfig& MenuConfig::instance() {
52 CR_DEFINE_STATIC_LOCAL(MenuConfig, instance, ());
53 return instance;
54 }
55
50 } // namespace views 56 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_config.h ('k') | ui/views/controls/menu/menu_config_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698