| OLD | NEW |
| 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/extension_icon_image.h" | 11 #include "chrome/browser/extensions/extension_icon_image.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 "sync/api/string_ordinal.h" | 13 #include "sync/api/string_ordinal.h" |
| 14 #include "ui/base/models/simple_menu_model.h" | 14 #include "ui/base/models/simple_menu_model.h" |
| 15 | 15 |
| 16 class AppListController; | 16 class AppListController; |
| 17 class ExtensionResource; | 17 class ExtensionResource; |
| 18 class Profile; | 18 class Profile; |
| 19 class SkBitmap; | 19 class SkBitmap; |
| 20 | 20 |
| 21 namespace extensions { | 21 namespace extensions { |
| 22 class ContextMenuMatcher; |
| 22 class Extension; | 23 class Extension; |
| 23 } | 24 } |
| 24 | 25 |
| 25 // ExtensionAppItem represents an extension app in app list. | 26 // ExtensionAppItem represents an extension app in app list. |
| 26 class ExtensionAppItem : public ChromeAppListItem, | 27 class ExtensionAppItem : public ChromeAppListItem, |
| 27 public extensions::IconImage::Observer, | 28 public extensions::IconImage::Observer, |
| 28 public ui::SimpleMenuModel::Delegate { | 29 public ui::SimpleMenuModel::Delegate { |
| 29 public: | 30 public: |
| 30 ExtensionAppItem(Profile* profile, | 31 ExtensionAppItem(Profile* profile, |
| 31 const extensions::Extension* extension, | 32 const extensions::Extension* extension, |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 // Overridden from ChromeAppListItem: | 70 // Overridden from ChromeAppListItem: |
| 70 virtual void Activate(int event_flags) OVERRIDE; | 71 virtual void Activate(int event_flags) OVERRIDE; |
| 71 virtual ui::MenuModel* GetContextMenuModel() OVERRIDE; | 72 virtual ui::MenuModel* GetContextMenuModel() OVERRIDE; |
| 72 | 73 |
| 73 Profile* profile_; | 74 Profile* profile_; |
| 74 const std::string extension_id_; | 75 const std::string extension_id_; |
| 75 AppListController* controller_; | 76 AppListController* controller_; |
| 76 | 77 |
| 77 scoped_ptr<extensions::IconImage> icon_; | 78 scoped_ptr<extensions::IconImage> icon_; |
| 78 scoped_ptr<ui::SimpleMenuModel> context_menu_model_; | 79 scoped_ptr<ui::SimpleMenuModel> context_menu_model_; |
| 80 scoped_ptr<extensions::ContextMenuMatcher> extension_menu_items_; |
| 79 | 81 |
| 80 DISALLOW_COPY_AND_ASSIGN(ExtensionAppItem); | 82 DISALLOW_COPY_AND_ASSIGN(ExtensionAppItem); |
| 81 }; | 83 }; |
| 82 | 84 |
| 83 #endif // CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_ITEM_H_ | 85 #endif // CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_ITEM_H_ |
| OLD | NEW |