Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Side by Side Diff: ash/shell_context_menu.h

Issue 11092034: Add Wallpaper option to launcher context menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Whitespace, Null Check, Comment Update Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/shell.cc ('k') | ash/shell_context_menu.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | ash/shell_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698