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 #include "chrome/browser/ui/app_list/extension_app_model_builder.h" | 5 #include "chrome/browser/ui/app_list/extension_app_model_builder.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
11 #include "chrome/browser/chrome_notification_types.h" | 11 #include "chrome/browser/chrome_notification_types.h" |
12 #include "chrome/browser/extensions/extension_service.h" | 12 #include "chrome/browser/extensions/extension_service.h" |
13 #include "chrome/browser/extensions/extension_system.h" | |
14 #include "chrome/browser/extensions/install_tracker.h" | 13 #include "chrome/browser/extensions/install_tracker.h" |
15 #include "chrome/browser/extensions/install_tracker_factory.h" | 14 #include "chrome/browser/extensions/install_tracker_factory.h" |
16 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
17 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" | 16 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" |
18 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" | 17 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" |
19 #include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h" | 18 #include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h" |
20 #include "chrome/browser/ui/app_list/extension_app_item.h" | 19 #include "chrome/browser/ui/app_list/extension_app_item.h" |
21 #include "chrome/common/extensions/extension_constants.h" | 20 #include "chrome/common/extensions/extension_constants.h" |
22 #include "chrome/common/pref_names.h" | 21 #include "chrome/common/pref_names.h" |
23 #include "content/public/browser/notification_service.h" | 22 #include "content/public/browser/notification_service.h" |
24 #include "extensions/browser/extension_prefs.h" | 23 #include "extensions/browser/extension_prefs.h" |
| 24 #include "extensions/browser/extension_system.h" |
25 #include "extensions/common/extension.h" | 25 #include "extensions/common/extension.h" |
26 #include "extensions/common/extension_set.h" | 26 #include "extensions/common/extension_set.h" |
27 #include "ui/gfx/image/image_skia.h" | 27 #include "ui/gfx/image/image_skia.h" |
28 | 28 |
29 using extensions::Extension; | 29 using extensions::Extension; |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 bool ShouldDisplayInAppLauncher(Profile* profile, | 33 bool ShouldDisplayInAppLauncher(Profile* profile, |
34 scoped_refptr<const Extension> app) { | 34 scoped_refptr<const Extension> app) { |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 app_list::AppListItem* item = item_list->item_at(idx + 1); | 289 app_list::AppListItem* item = item_list->item_at(idx + 1); |
290 if (item->GetItemType() == ExtensionAppItem::kItemType) { | 290 if (item->GetItemType() == ExtensionAppItem::kItemType) { |
291 next = static_cast<ExtensionAppItem*>(item); | 291 next = static_cast<ExtensionAppItem*>(item); |
292 break; | 292 break; |
293 } | 293 } |
294 } | 294 } |
295 // item->Move will call set_position, overriding the item's position. | 295 // item->Move will call set_position, overriding the item's position. |
296 if (prev || next) | 296 if (prev || next) |
297 static_cast<ExtensionAppItem*>(item)->Move(prev, next); | 297 static_cast<ExtensionAppItem*>(item)->Move(prev, next); |
298 } | 298 } |
OLD | NEW |