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