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" |
(...skipping 30 matching lines...) Expand all Loading... |
41 bool is_platform_app); | 41 bool is_platform_app); |
42 virtual ~ExtensionAppItem(); | 42 virtual ~ExtensionAppItem(); |
43 | 43 |
44 // Reload the title and icon from the underlying extension. | 44 // Reload the title and icon from the underlying extension. |
45 void Reload(); | 45 void Reload(); |
46 | 46 |
47 // Updates the app item's icon, if necessary adding an overlay and/or making | 47 // Updates the app item's icon, if necessary adding an overlay and/or making |
48 // it gray. | 48 // it gray. |
49 void UpdateIcon(); | 49 void UpdateIcon(); |
50 | 50 |
| 51 // Update page and app launcher ordinals to put the app in between |prev| and |
| 52 // |next|. Note that |prev| and |next| could be NULL when the app is put at |
| 53 // the beginning or at the end. |
| 54 void Move(const ExtensionAppItem* prev, const ExtensionAppItem* next); |
| 55 |
51 const std::string& extension_id() const { return extension_id_; } | 56 const std::string& extension_id() const { return extension_id_; } |
52 | 57 |
53 static const char kAppType[]; | 58 static const char kAppType[]; |
54 | 59 |
55 private: | 60 private: |
56 // Gets extension associated with this model. Returns NULL if extension | 61 // Gets extension associated with this model. Returns NULL if extension |
57 // no longer exists. | 62 // no longer exists. |
58 const extensions::Extension* GetExtension() const; | 63 const extensions::Extension* GetExtension() const; |
59 | 64 |
60 // Loads extension icon. | 65 // Loads extension icon. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 112 |
108 // Cache initial sort order. Sort order is not synced with the extensions | 113 // Cache initial sort order. Sort order is not synced with the extensions |
109 // app ordering once apps are loaded. This will be ignored (or overridden) | 114 // app ordering once apps are loaded. This will be ignored (or overridden) |
110 // once the app list is synced. | 115 // once the app list is synced. |
111 std::string sort_order_; | 116 std::string sort_order_; |
112 | 117 |
113 DISALLOW_COPY_AND_ASSIGN(ExtensionAppItem); | 118 DISALLOW_COPY_AND_ASSIGN(ExtensionAppItem); |
114 }; | 119 }; |
115 | 120 |
116 #endif // CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_ITEM_H_ | 121 #endif // CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_ITEM_H_ |
OLD | NEW |