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

Side by Side Diff: chrome/browser/ui/app_list/extension_app_item.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: Created 8 years, 3 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_APP_LIST_EXTENSION_APP_ITEM_H_ 5 #ifndef CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_ITEM_H_
6 #define CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_ITEM_H_ 6 #define CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_ITEM_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "chrome/browser/extensions/image_loading_tracker.h" 11 #include "chrome/browser/extensions/image_loading_tracker.h"
12 #include "chrome/browser/ui/app_list/chrome_app_list_item.h" 12 #include "chrome/browser/ui/app_list/chrome_app_list_item.h"
13 #include "ui/base/models/simple_menu_model.h" 13 #include "ui/base/models/simple_menu_model.h"
14 14
15 class AppListController; 15 class AppListController;
16 class ExtensionResource; 16 class ExtensionResource;
17 class Profile; 17 class Profile;
18 class SkBitmap; 18 class SkBitmap;
19 19
20 namespace extensions { 20 namespace extensions {
21 class ContextMenuManager;
21 class Extension; 22 class Extension;
22 } 23 }
23 24
24 // ExtensionAppItem represents an extension app in app list. 25 // ExtensionAppItem represents an extension app in app list.
25 class ExtensionAppItem : public ChromeAppListItem, 26 class ExtensionAppItem : public ChromeAppListItem,
26 public ImageLoadingTracker::Observer, 27 public ImageLoadingTracker::Observer,
27 public ui::SimpleMenuModel::Delegate { 28 public ui::SimpleMenuModel::Delegate {
28 public: 29 public:
29 ExtensionAppItem(Profile* profile, 30 ExtensionAppItem(Profile* profile,
30 const extensions::Extension* extension, 31 const extensions::Extension* extension,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // Overridden from ChromeAppListItem: 66 // Overridden from ChromeAppListItem:
66 virtual void Activate(int event_flags) OVERRIDE; 67 virtual void Activate(int event_flags) OVERRIDE;
67 virtual ui::MenuModel* GetContextMenuModel() OVERRIDE; 68 virtual ui::MenuModel* GetContextMenuModel() OVERRIDE;
68 69
69 Profile* profile_; 70 Profile* profile_;
70 const std::string extension_id_; 71 const std::string extension_id_;
71 AppListController* controller_; 72 AppListController* controller_;
72 73
73 scoped_ptr<ImageLoadingTracker> tracker_; 74 scoped_ptr<ImageLoadingTracker> tracker_;
74 scoped_ptr<ui::SimpleMenuModel> context_menu_model_; 75 scoped_ptr<ui::SimpleMenuModel> context_menu_model_;
76 scoped_ptr<extensions::ContextMenuManager> context_menu_manager_;
75 77
76 DISALLOW_COPY_AND_ASSIGN(ExtensionAppItem); 78 DISALLOW_COPY_AND_ASSIGN(ExtensionAppItem);
77 }; 79 };
78 80
79 #endif // CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_ITEM_H_ 81 #endif // CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_ITEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698