OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/native_menu_win.h" | 5 #include "views/controls/menu/native_menu_win.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/stl_util-inl.h" | 8 #include "base/stl_util-inl.h" |
9 #include "gfx/canvas_skia.h" | |
10 #include "gfx/font.h" | |
11 #include "third_party/skia/include/core/SkBitmap.h" | 9 #include "third_party/skia/include/core/SkBitmap.h" |
12 #include "ui/base/keycodes/keyboard_codes.h" | 10 #include "ui/base/keycodes/keyboard_codes.h" |
13 #include "ui/base/l10n/l10n_util.h" | 11 #include "ui/base/l10n/l10n_util.h" |
14 #include "ui/base/l10n/l10n_util_win.h" | 12 #include "ui/base/l10n/l10n_util_win.h" |
15 #include "ui/base/win/hwnd_util.h" | 13 #include "ui/base/win/hwnd_util.h" |
| 14 #include "ui/gfx/canvas_skia.h" |
| 15 #include "ui/gfx/font.h" |
16 #include "views/accelerator.h" | 16 #include "views/accelerator.h" |
17 #include "views/controls/menu/menu_2.h" | 17 #include "views/controls/menu/menu_2.h" |
18 | 18 |
19 namespace views { | 19 namespace views { |
20 | 20 |
21 // The width of an icon, including the pixels between the icon and | 21 // The width of an icon, including the pixels between the icon and |
22 // the item label. | 22 // the item label. |
23 static const int kIconWidth = 23; | 23 static const int kIconWidth = 23; |
24 // Margins between the top of the item and the label. | 24 // Margins between the top of the item and the label. |
25 static const int kItemTopMargin = 3; | 25 static const int kItemTopMargin = 3; |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 | 630 |
631 //////////////////////////////////////////////////////////////////////////////// | 631 //////////////////////////////////////////////////////////////////////////////// |
632 // MenuWrapper, public: | 632 // MenuWrapper, public: |
633 | 633 |
634 // static | 634 // static |
635 MenuWrapper* MenuWrapper::CreateWrapper(Menu2* menu) { | 635 MenuWrapper* MenuWrapper::CreateWrapper(Menu2* menu) { |
636 return new NativeMenuWin(menu->model(), NULL); | 636 return new NativeMenuWin(menu->model(), NULL); |
637 } | 637 } |
638 | 638 |
639 } // namespace views | 639 } // namespace views |
OLD | NEW |