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

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

Issue 10918103: Give platform apps control over launcher right-click context menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase and fix conflicts 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_
7 7
8 #include "ash/launcher/launcher_alignment_menu.h" 8 #include "ash/launcher/launcher_alignment_menu.h"
9 #include "ash/launcher/launcher_types.h" 9 #include "ash/launcher/launcher_types.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
11 #include "ui/base/models/simple_menu_model.h" 12 #include "ui/base/models/simple_menu_model.h"
12 13
13 class ChromeLauncherController; 14 class ChromeLauncherController;
14 15
16 namespace extensions {
17 class ContextMenuMatcher;
18 }
19
15 // Context menu shown for a launcher item. 20 // Context menu shown for a launcher item.
16 class LauncherContextMenu : public ui::SimpleMenuModel, 21 class LauncherContextMenu : public ui::SimpleMenuModel,
17 public ui::SimpleMenuModel::Delegate { 22 public ui::SimpleMenuModel::Delegate {
18 public: 23 public:
19 // |item| is NULL if the context menu is for the launcher (the user right 24 // |item| is NULL if the context menu is for the launcher (the user right
20 // |clicked on an area with no icons). 25 // |clicked on an area with no icons).
21 LauncherContextMenu(ChromeLauncherController* controller, 26 LauncherContextMenu(ChromeLauncherController* controller,
22 const ash::LauncherItem* item); 27 const ash::LauncherItem* item);
23 virtual ~LauncherContextMenu(); 28 virtual ~LauncherContextMenu();
24 29
(...skipping 26 matching lines...) Expand all
51 // Does |item_| represent a valid item? See description of constructor for 56 // Does |item_| represent a valid item? See description of constructor for
52 // details on why it may not be valid. 57 // details on why it may not be valid.
53 bool is_valid_item() const { return item_.id != 0; } 58 bool is_valid_item() const { return item_.id != 0; }
54 59
55 ChromeLauncherController* controller_; 60 ChromeLauncherController* controller_;
56 61
57 ash::LauncherItem item_; 62 ash::LauncherItem item_;
58 63
59 ash::LauncherAlignmentMenu alignment_menu_; 64 ash::LauncherAlignmentMenu alignment_menu_;
60 65
66 scoped_ptr<extensions::ContextMenuMatcher> extension_items_;
67
61 DISALLOW_COPY_AND_ASSIGN(LauncherContextMenu); 68 DISALLOW_COPY_AND_ASSIGN(LauncherContextMenu);
62 }; 69 };
63 70
64 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ 71 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc ('k') | chrome/browser/ui/ash/launcher/launcher_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698