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 <memory> |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "chrome/browser/ui/app_list/app_context_menu_delegate.h" | 12 #include "chrome/browser/ui/app_list/app_context_menu_delegate.h" |
13 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" | 13 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" |
14 #include "chrome/browser/ui/app_list/chrome_app_list_item.h" | 14 #include "chrome/browser/ui/app_list/chrome_app_list_item.h" |
15 #include "chrome/browser/ui/extensions/extension_enable_flow_delegate.h" | 15 #include "chrome/browser/ui/extensions/extension_enable_flow_delegate.h" |
16 #include "extensions/browser/extension_icon_image.h" | 16 #include "extensions/browser/extension_icon_image.h" |
17 #include "ui/gfx/image/image_skia.h" | 17 #include "ui/gfx/image/image_skia.h" |
18 | 18 |
19 class AppListControllerDelegate; | 19 class AppListControllerDelegate; |
20 class ExtensionEnableFlow; | 20 class ExtensionEnableFlow; |
21 class Profile; | 21 class Profile; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 // Updates the icon if the overlay needs to be added/removed. | 92 // Updates the icon if the overlay needs to be added/removed. |
93 void OnExtensionPreferenceChanged() override; | 93 void OnExtensionPreferenceChanged() override; |
94 const char* GetItemType() const override; | 94 const char* GetItemType() const override; |
95 | 95 |
96 // Overridden from app_list::AppContextMenuDelegate: | 96 // Overridden from app_list::AppContextMenuDelegate: |
97 void ExecuteLaunchCommand(int event_flags) override; | 97 void ExecuteLaunchCommand(int event_flags) override; |
98 | 98 |
99 // Set the position from the ordering. | 99 // Set the position from the ordering. |
100 void UpdatePositionFromOrdering(); | 100 void UpdatePositionFromOrdering(); |
101 | 101 |
102 scoped_ptr<extensions::IconImage> icon_; | 102 std::unique_ptr<extensions::IconImage> icon_; |
103 scoped_ptr<app_list::ExtensionAppContextMenu> context_menu_; | 103 std::unique_ptr<app_list::ExtensionAppContextMenu> context_menu_; |
104 scoped_ptr<ExtensionEnableFlow> extension_enable_flow_; | 104 std::unique_ptr<ExtensionEnableFlow> extension_enable_flow_; |
105 AppListControllerDelegate* extension_enable_flow_controller_; | 105 AppListControllerDelegate* extension_enable_flow_controller_; |
106 | 106 |
107 // Name to use for the extension if we can't access it. | 107 // Name to use for the extension if we can't access it. |
108 std::string extension_name_; | 108 std::string extension_name_; |
109 | 109 |
110 // Icon for the extension if we can't access the installed extension. | 110 // Icon for the extension if we can't access the installed extension. |
111 gfx::ImageSkia installing_icon_; | 111 gfx::ImageSkia installing_icon_; |
112 | 112 |
113 // Whether or not this app is a platform app. | 113 // Whether or not this app is a platform app. |
114 bool is_platform_app_; | 114 bool is_platform_app_; |
115 | 115 |
116 // Whether this app item has an overlay. | 116 // Whether this app item has an overlay. |
117 bool has_overlay_; | 117 bool has_overlay_; |
118 | 118 |
119 DISALLOW_COPY_AND_ASSIGN(ExtensionAppItem); | 119 DISALLOW_COPY_AND_ASSIGN(ExtensionAppItem); |
120 }; | 120 }; |
121 | 121 |
122 #endif // CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_ITEM_H_ | 122 #endif // CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_ITEM_H_ |
OLD | NEW |