| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ASH_SHELL_CONTEXT_MENU_H_ | |
| 6 #define ASH_SHELL_CONTEXT_MENU_H_ | |
| 7 | |
| 8 #include "base/memory/scoped_ptr.h" | |
| 9 #include "ui/base/models/simple_menu_model.h" | |
| 10 | |
| 11 namespace gfx { | |
| 12 class Point; | |
| 13 class Size; | |
| 14 } | |
| 15 | |
| 16 namespace views { | |
| 17 class MenuRunner; | |
| 18 class Widget; | |
| 19 } | |
| 20 | |
| 21 namespace ash { | |
| 22 namespace internal { | |
| 23 | |
| 24 class ShellContextMenu : public ui::SimpleMenuModel::Delegate { | |
| 25 public: | |
| 26 ShellContextMenu(); | |
| 27 virtual ~ShellContextMenu(); | |
| 28 | |
| 29 // Shows the context menu when right click on background. | |
| 30 void ShowMenu(views::Widget* widget, const gfx::Point& location); | |
| 31 | |
| 32 // ui::SimpleMenuModel::Delegate overrides: | |
| 33 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; | |
| 34 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; | |
| 35 virtual void ExecuteCommand(int command_id) OVERRIDE; | |
| 36 virtual bool GetAcceleratorForCommandId( | |
| 37 int command_id, | |
| 38 ui::Accelerator* accelerator) OVERRIDE; | |
| 39 | |
| 40 private: | |
| 41 enum MenuItem { | |
| 42 MENU_CHANGE_WALLPAPER, | |
| 43 }; | |
| 44 | |
| 45 scoped_ptr<views::MenuRunner> menu_runner_; | |
| 46 | |
| 47 DISALLOW_COPY_AND_ASSIGN(ShellContextMenu); | |
| 48 }; | |
| 49 | |
| 50 } // namespace internal | |
| 51 } // namespace ash | |
| 52 | |
| 53 #endif // ASH_SHELL_CONTEXT_MENU_H_ | |
| OLD | NEW |