| 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 "views/controls/menu/chrome_menu.h" | 5 #include "views/controls/menu/chrome_menu.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <uxtheme.h> | 8 #include <uxtheme.h> |
| 9 #include <Vssym32.h> | 9 #include <Vssym32.h> |
| 10 | 10 |
| 11 #include "app/gfx/canvas.h" | 11 #include "app/gfx/canvas.h" |
| 12 #include "app/gfx/color_utils.h" | 12 #include "app/gfx/color_utils.h" |
| 13 #include "app/l10n_util.h" | 13 #include "app/l10n_util.h" |
| 14 #include "app/l10n_util_win.h" | 14 #include "app/l10n_util_win.h" |
| 15 #include "app/os_exchange_data.h" | 15 #include "app/os_exchange_data.h" |
| 16 #include "base/base_drag_source.h" | 16 #include "base/base_drag_source.h" |
| 17 #include "base/gfx/native_theme.h" | 17 #include "base/gfx/native_theme.h" |
| 18 #include "base/message_loop.h" | 18 #include "base/message_loop.h" |
| 19 #include "base/task.h" | 19 #include "base/task.h" |
| 20 #include "base/timer.h" | 20 #include "base/timer.h" |
| 21 #include "base/win_util.h" | 21 #include "base/win_util.h" |
| 22 #include "grit/generated_resources.h" | 22 #include "grit/app_strings.h" |
| 23 #include "skia/ext/skia_utils_win.h" | 23 #include "skia/ext/skia_utils_win.h" |
| 24 #include "views/border.h" | 24 #include "views/border.h" |
| 25 #include "views/drag_utils.h" | 25 #include "views/drag_utils.h" |
| 26 #include "views/focus/focus_manager.h" | 26 #include "views/focus/focus_manager.h" |
| 27 #include "views/view_constants.h" | 27 #include "views/view_constants.h" |
| 28 #include "views/widget/root_view.h" | 28 #include "views/widget/root_view.h" |
| 29 #include "views/widget/widget_win.h" | 29 #include "views/widget/widget_win.h" |
| 30 | 30 |
| 31 #undef min | 31 #undef min |
| 32 #undef max | 32 #undef max |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 // is itself a MenuItemView, but it uses a different ID so that it isn't | 781 // is itself a MenuItemView, but it uses a different ID so that it isn't |
| 782 // identified as a MenuItemView. | 782 // identified as a MenuItemView. |
| 783 | 783 |
| 784 class EmptyMenuMenuItem : public MenuItemView { | 784 class EmptyMenuMenuItem : public MenuItemView { |
| 785 public: | 785 public: |
| 786 // ID used for EmptyMenuMenuItem. | 786 // ID used for EmptyMenuMenuItem. |
| 787 static const int kEmptyMenuItemViewID; | 787 static const int kEmptyMenuItemViewID; |
| 788 | 788 |
| 789 explicit EmptyMenuMenuItem(MenuItemView* parent) : | 789 explicit EmptyMenuMenuItem(MenuItemView* parent) : |
| 790 MenuItemView(parent, 0, NORMAL) { | 790 MenuItemView(parent, 0, NORMAL) { |
| 791 SetTitle(l10n_util::GetString(IDS_MENU_EMPTY_SUBMENU)); | 791 SetTitle(l10n_util::GetString(IDS_APP_MENU_EMPTY_SUBMENU)); |
| 792 // Set this so that we're not identified as a normal menu item. | 792 // Set this so that we're not identified as a normal menu item. |
| 793 SetID(kEmptyMenuItemViewID); | 793 SetID(kEmptyMenuItemViewID); |
| 794 SetEnabled(false); | 794 SetEnabled(false); |
| 795 } | 795 } |
| 796 | 796 |
| 797 private: | 797 private: |
| 798 DISALLOW_COPY_AND_ASSIGN(EmptyMenuMenuItem); | 798 DISALLOW_COPY_AND_ASSIGN(EmptyMenuMenuItem); |
| 799 }; | 799 }; |
| 800 | 800 |
| 801 // static | 801 // static |
| (...skipping 2017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2819 if (!scroll_task_.get()) | 2819 if (!scroll_task_.get()) |
| 2820 scroll_task_.reset(new MenuScrollTask()); | 2820 scroll_task_.reset(new MenuScrollTask()); |
| 2821 scroll_task_->Update(part); | 2821 scroll_task_->Update(part); |
| 2822 } | 2822 } |
| 2823 | 2823 |
| 2824 void MenuController::StopScrolling() { | 2824 void MenuController::StopScrolling() { |
| 2825 scroll_task_.reset(NULL); | 2825 scroll_task_.reset(NULL); |
| 2826 } | 2826 } |
| 2827 | 2827 |
| 2828 } // namespace views | 2828 } // namespace views |
| OLD | NEW |