| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 25 check_height(16), | 25 check_height(16), |
| 26 radio_width(16), | 26 radio_width(16), |
| 27 radio_height(16), | 27 radio_height(16), |
| 28 arrow_height(9), | 28 arrow_height(9), |
| 29 arrow_width(9), | 29 arrow_width(9), |
| 30 gutter_width(0), | 30 gutter_width(0), |
| 31 separator_height(6), | 31 separator_height(6), |
| 32 render_gutter(false), | 32 render_gutter(false), |
| 33 show_mnemonics(false), | 33 show_mnemonics(false), |
| 34 scroll_arrow_height(3), | 34 scroll_arrow_height(3), |
| 35 label_to_accelerator_padding(10) { | 35 label_to_accelerator_padding(10), |
| 36 show_accelerators(true) { |
| 36 } | 37 } |
| 37 | 38 |
| 38 MenuConfig::~MenuConfig() {} | 39 MenuConfig::~MenuConfig() {} |
| 39 | 40 |
| 40 void MenuConfig::Reset() { | 41 void MenuConfig::Reset() { |
| 41 delete config_instance; | 42 delete config_instance; |
| 42 config_instance = NULL; | 43 config_instance = NULL; |
| 43 } | 44 } |
| 44 | 45 |
| 45 // static | 46 // static |
| 46 const MenuConfig& MenuConfig::instance() { | 47 const MenuConfig& MenuConfig::instance() { |
| 47 if (!config_instance) | 48 if (!config_instance) |
| 48 config_instance = Create(); | 49 config_instance = Create(); |
| 49 return *config_instance; | 50 return *config_instance; |
| 50 } | 51 } |
| 51 | 52 |
| 52 } // namespace views | 53 } // namespace views |
| OLD | NEW |