OLD | NEW |
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 "chrome/browser/ui/views/action_box_menu.h" | 5 #include "chrome/browser/ui/views/action_box_menu.h" |
6 | 6 |
7 #include "chrome/browser/ui/toolbar/action_box_menu_model.h" | 7 #include "chrome/browser/ui/toolbar/action_box_menu_model.h" |
8 #include "chrome/browser/ui/views/browser_action_view.h" | 8 #include "chrome/browser/ui/views/browser_action_view.h" |
9 #include "grit/generated_resources.h" | 9 #include "grit/generated_resources.h" |
10 #include "grit/theme_resources.h" | 10 #include "grit/theme_resources.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // Ignore the result since we don't need to handle a deleted menu specially. | 50 // Ignore the result since we don't need to handle a deleted menu specially. |
51 ignore_result( | 51 ignore_result( |
52 menu_runner_->RunMenuAt(menu_button->GetWidget(), | 52 menu_runner_->RunMenuAt(menu_button->GetWidget(), |
53 menu_button, | 53 menu_button, |
54 gfx::Rect(screen_location, menu_button->size()), | 54 gfx::Rect(screen_location, menu_button->size()), |
55 views::MenuItemView::TOPRIGHT, | 55 views::MenuItemView::TOPRIGHT, |
56 views::MenuRunner::HAS_MNEMONICS)); | 56 views::MenuRunner::HAS_MNEMONICS)); |
57 } | 57 } |
58 | 58 |
59 void ActionBoxMenu::ExecuteCommand(int id) { | 59 void ActionBoxMenu::ExecuteCommand(int id) { |
60 }; | 60 } |
61 | 61 |
62 views::Border* ActionBoxMenu::CreateMenuBorder() { | 62 views::Border* ActionBoxMenu::CreateMenuBorder() { |
63 // TODO(yefim): Use correct theme color on non-Windows. | 63 // TODO(yefim): Use correct theme color on non-Windows. |
64 SkColor border_color = SK_ColorBLACK; | 64 SkColor border_color = SK_ColorBLACK; |
65 #if defined(OS_WIN) && !defined(USE_AURA) | 65 #if defined(OS_WIN) && !defined(USE_AURA) |
66 // TODO(yefim): Move to Windows only files if possible. | 66 // TODO(yefim): Move to Windows only files if possible. |
67 border_color = ui::NativeThemeWin::instance()->GetThemeColorWithDefault( | 67 border_color = ui::NativeThemeWin::instance()->GetThemeColorWithDefault( |
68 ui::NativeThemeWin::MENU, MENU_POPUPITEM, MPI_NORMAL, TMT_TEXTCOLOR, | 68 ui::NativeThemeWin::MENU, MENU_POPUPITEM, MPI_NORMAL, TMT_TEXTCOLOR, |
69 COLOR_MENUTEXT); | 69 COLOR_MENUTEXT); |
70 #endif | 70 #endif |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 string16 label = l10n_util::GetStringUTF16(starred_ ? | 154 string16 label = l10n_util::GetStringUTF16(starred_ ? |
155 IDS_TOOLTIP_STARRED : IDS_TOOLTIP_STAR); | 155 IDS_TOOLTIP_STARRED : IDS_TOOLTIP_STAR); |
156 gfx::ImageSkia* icon = | 156 gfx::ImageSkia* icon = |
157 ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( | 157 ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( |
158 starred_ ? IDR_STAR_LIT : IDR_STAR); | 158 starred_ ? IDR_STAR_LIT : IDR_STAR); |
159 views::MenuItemView* item = | 159 views::MenuItemView* item = |
160 parent->AppendMenuItemWithIcon(*item_id, label, *icon); | 160 parent->AppendMenuItemWithIcon(*item_id, label, *icon); |
161 (*item_id)++; | 161 (*item_id)++; |
162 return item; | 162 return item; |
163 } | 163 } |
OLD | NEW |