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_item.h" | 5 #include "chrome/browser/ui/app_list/extension_app_item.h" |
6 | 6 |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
9 #include "chrome/browser/extensions/extension_util.h" | 9 #include "chrome/browser/extensions/extension_util.h" |
10 #include "chrome/browser/extensions/launch_util.h" | 10 #include "chrome/browser/extensions/launch_util.h" |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 icon = CreateDisabledIcon(icon); | 189 icon = CreateDisabledIcon(icon); |
190 | 190 |
191 if (GetExtension()->from_bookmark()) | 191 if (GetExtension()->from_bookmark()) |
192 icon = gfx::ImageSkia(new RoundedCornersImageSource(icon), icon.size()); | 192 icon = gfx::ImageSkia(new RoundedCornersImageSource(icon), icon.size()); |
193 } | 193 } |
194 // Paint the shortcut overlay if necessary. | 194 // Paint the shortcut overlay if necessary. |
195 has_overlay_ = NeedsOverlay(); | 195 has_overlay_ = NeedsOverlay(); |
196 if (has_overlay_) | 196 if (has_overlay_) |
197 icon = gfx::ImageSkia(new ShortcutOverlayImageSource(icon), icon.size()); | 197 icon = gfx::ImageSkia(new ShortcutOverlayImageSource(icon), icon.size()); |
198 | 198 |
199 SetIcon(icon, true); | 199 SetIcon(icon); |
200 } | 200 } |
201 | 201 |
202 void ExtensionAppItem::Move(const ExtensionAppItem* prev, | 202 void ExtensionAppItem::Move(const ExtensionAppItem* prev, |
203 const ExtensionAppItem* next) { | 203 const ExtensionAppItem* next) { |
204 if (!prev && !next) | 204 if (!prev && !next) |
205 return; // No reordering necessary | 205 return; // No reordering necessary |
206 | 206 |
207 extensions::ExtensionPrefs* prefs = extensions::ExtensionPrefs::Get(profile_); | 207 extensions::ExtensionPrefs* prefs = extensions::ExtensionPrefs::Get(profile_); |
208 extensions::AppSorting* sorting = GetAppSorting(profile_); | 208 extensions::AppSorting* sorting = GetAppSorting(profile_); |
209 | 209 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 const syncer::StringOrdinal& launch = | 354 const syncer::StringOrdinal& launch = |
355 GetAppSorting(profile_)->GetAppLaunchOrdinal(extension_id_); | 355 GetAppSorting(profile_)->GetAppLaunchOrdinal(extension_id_); |
356 set_position(syncer::StringOrdinal( | 356 set_position(syncer::StringOrdinal( |
357 page.ToInternalValue() + launch.ToInternalValue())); | 357 page.ToInternalValue() + launch.ToInternalValue())); |
358 } | 358 } |
359 | 359 |
360 AppListControllerDelegate* ExtensionAppItem::GetController() { | 360 AppListControllerDelegate* ExtensionAppItem::GetController() { |
361 return AppListService::Get(chrome::GetActiveDesktop())-> | 361 return AppListService::Get(chrome::GetActiveDesktop())-> |
362 GetControllerDelegate(); | 362 GetControllerDelegate(); |
363 } | 363 } |
OLD | NEW |