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