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

Side by Side Diff: chrome/browser/ui/views/aura/launcher/launcher_context_menu.h

Issue 9570044: Rename chrome/browser/ui/views/{aura => ash}/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 9 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
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 CHROME_BROWSER_UI_VIEWS_AURA_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_
6 #define CHROME_BROWSER_UI_VIEWS_AURA_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_
7 #pragma once
8
9 #include "ash/launcher/launcher_types.h"
10 #include "base/basictypes.h"
11 #include "ui/base/models/simple_menu_model.h"
12
13 namespace gfx {
14 class Point;
15 }
16
17 namespace views {
18 class MenuRunner;
19 class View;
20 }
21
22 class ChromeLauncherDelegate;
23
24 // Context menu shown for a launcher item.
25 class LauncherContextMenu : public ui::SimpleMenuModel,
26 public ui::SimpleMenuModel::Delegate {
27 public:
28 LauncherContextMenu(ChromeLauncherDelegate* delegate, ash::LauncherID id);
29 virtual ~LauncherContextMenu();
30
31 // ID of the item we're showing the context menu for.
32 ash::LauncherID id() const { return id_; }
33
34 // ui::SimpleMenuModel::Delegate overrides:
35 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
36 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
37 virtual bool GetAcceleratorForCommandId(
38 int command_id,
39 ui::Accelerator* accelerator) OVERRIDE;
40 virtual void ExecuteCommand(int command_id) OVERRIDE;
41
42 private:
43 enum MenuItem {
44 MENU_OPEN,
45 MENU_PIN,
46 MENU_CLOSE
47 };
48
49 ChromeLauncherDelegate* delegate_;
50 const ash::LauncherID id_;
51
52 DISALLOW_COPY_AND_ASSIGN(LauncherContextMenu);
53 };
54
55 #endif // CHROME_BROWSER_UI_VIEWS_AURA_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698