OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/views/controls/menu/menu.h" | 5 #include "chrome/views/controls/menu/menu.h" |
6 | 6 |
7 #include <atlbase.h> | 7 #include <atlbase.h> |
8 #include <atlapp.h> | 8 #include <atlapp.h> |
9 #include <atlwin.h> | 9 #include <atlwin.h> |
10 #include <atlcrack.h> | 10 #include <atlcrack.h> |
11 #include <atlframe.h> | 11 #include <atlframe.h> |
12 #include <atlmisc.h> | 12 #include <atlmisc.h> |
13 #include <string> | 13 #include <string> |
14 | 14 |
| 15 #include "app/l10n_util.h" |
| 16 #include "app/l10n_util_win.h" |
15 #include "base/gfx/rect.h" | 17 #include "base/gfx/rect.h" |
16 #include "base/logging.h" | 18 #include "base/logging.h" |
17 #include "base/stl_util-inl.h" | 19 #include "base/stl_util-inl.h" |
18 #include "base/string_util.h" | 20 #include "base/string_util.h" |
19 #include "chrome/common/gfx/chrome_canvas.h" | 21 #include "chrome/common/gfx/chrome_canvas.h" |
20 #include "chrome/common/gfx/chrome_font.h" | 22 #include "chrome/common/gfx/chrome_font.h" |
21 #include "chrome/common/l10n_util.h" | |
22 #include "chrome/common/l10n_util_win.h" | |
23 #include "chrome/views/accelerator.h" | 23 #include "chrome/views/accelerator.h" |
24 | 24 |
25 const SkBitmap* Menu::Delegate::kEmptyIcon = 0; | 25 const SkBitmap* Menu::Delegate::kEmptyIcon = 0; |
26 | 26 |
27 // The width of an icon, including the pixels between the icon and | 27 // The width of an icon, including the pixels between the icon and |
28 // the item label. | 28 // the item label. |
29 static const int kIconWidth = 23; | 29 static const int kIconWidth = 23; |
30 // Margins between the top of the item and the label. | 30 // Margins between the top of the item and the label. |
31 static const int kItemTopMargin = 3; | 31 static const int kItemTopMargin = 3; |
32 // Margins between the bottom of the item and the label. | 32 // Margins between the bottom of the item and the label. |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 } | 617 } |
618 | 618 |
619 void Menu::Cancel() { | 619 void Menu::Cancel() { |
620 DCHECK(is_menu_visible_); | 620 DCHECK(is_menu_visible_); |
621 EndMenu(); | 621 EndMenu(); |
622 } | 622 } |
623 | 623 |
624 int Menu::ItemCount() { | 624 int Menu::ItemCount() { |
625 return GetMenuItemCount(menu_); | 625 return GetMenuItemCount(menu_); |
626 } | 626 } |
OLD | NEW |