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_prefs.h" |
13 #include "chrome/browser/extensions/install_tracker.h" | 13 #include "chrome/browser/extensions/install_tracker.h" |
14 #include "chrome/browser/extensions/install_tracker_factory.h" | 14 #include "chrome/browser/extensions/install_tracker_factory.h" |
15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" | 16 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" |
17 #include "chrome/browser/ui/app_list/extension_app_item.h" | 17 #include "chrome/browser/ui/app_list/extension_app_item.h" |
18 #include "chrome/common/extensions/extension.h" | |
19 #include "chrome/common/extensions/extension_constants.h" | 18 #include "chrome/common/extensions/extension_constants.h" |
20 #include "chrome/common/extensions/extension_set.h" | 19 #include "chrome/common/extensions/extension_set.h" |
21 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
22 #include "content/public/browser/notification_service.h" | 21 #include "content/public/browser/notification_service.h" |
| 22 #include "extensions/common/extension.h" |
23 #include "ui/gfx/image/image_skia.h" | 23 #include "ui/gfx/image/image_skia.h" |
24 | 24 |
25 using extensions::Extension; | 25 using extensions::Extension; |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 bool ShouldDisplayInAppLauncher(Profile* profile, | 29 bool ShouldDisplayInAppLauncher(Profile* profile, |
30 scoped_refptr<const Extension> app) { | 30 scoped_refptr<const Extension> app) { |
31 // If it's the web store, check the policy. | 31 // If it's the web store, check the policy. |
32 bool blocked_by_policy = | 32 bool blocked_by_policy = |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 app_list::AppListItemModel* item = item_list->item_at(idx + 1); | 252 app_list::AppListItemModel* item = item_list->item_at(idx + 1); |
253 if (item->GetAppType() == ExtensionAppItem::kAppType) { | 253 if (item->GetAppType() == ExtensionAppItem::kAppType) { |
254 next = static_cast<ExtensionAppItem*>(item); | 254 next = static_cast<ExtensionAppItem*>(item); |
255 break; | 255 break; |
256 } | 256 } |
257 } | 257 } |
258 // item->Move will call set_position, overriding the item's position. | 258 // item->Move will call set_position, overriding the item's position. |
259 if (prev || next) | 259 if (prev || next) |
260 static_cast<ExtensionAppItem*>(item)->Move(prev, next); | 260 static_cast<ExtensionAppItem*>(item)->Move(prev, next); |
261 } | 261 } |
OLD | NEW |