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

Side by Side Diff: views/controls/menu/menu_config.cc

Issue 6622002: Do all OOLing in the views code. linux_views now builds clean with the clang plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "views/controls/menu/menu_config.h" 5 #include "views/controls/menu/menu_config.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 namespace views { 9 namespace views {
10 10
11 static MenuConfig* config_instance = NULL; 11 static MenuConfig* config_instance = NULL;
12 12
13 MenuConfig::MenuConfig()
14 : text_color(SK_ColorBLACK),
15 item_top_margin(3),
16 item_bottom_margin(4),
17 item_no_icon_top_margin(1),
18 item_no_icon_bottom_margin(3),
19 item_left_margin(4),
20 label_to_arrow_padding(10),
21 arrow_to_edge_padding(5),
22 icon_to_label_padding(8),
23 gutter_to_label(5),
24 check_width(16),
25 check_height(16),
26 radio_width(16),
27 radio_height(16),
28 arrow_height(9),
29 arrow_width(9),
30 gutter_width(0),
31 separator_height(6),
32 render_gutter(false),
33 show_mnemonics(false),
34 scroll_arrow_height(3),
35 label_to_accelerator_padding(10) {
36 }
37
38 MenuConfig::~MenuConfig() {}
39
13 void MenuConfig::Reset() { 40 void MenuConfig::Reset() {
14 delete config_instance; 41 delete config_instance;
15 config_instance = NULL; 42 config_instance = NULL;
16 } 43 }
17 44
18 // static 45 // static
19 const MenuConfig& MenuConfig::instance() { 46 const MenuConfig& MenuConfig::instance() {
20 if (!config_instance) 47 if (!config_instance)
21 config_instance = Create(); 48 config_instance = Create();
22 return *config_instance; 49 return *config_instance;
23 } 50 }
24 51
25 } // namespace views 52 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698