Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Side by Side Diff: chrome/browser/ui/app_list/extension_app_item.cc

Issue 1154323002: Use app list item shadow for app list folders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_arrow_keys_crash
Patch Set: fix mac compile Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/shell/app_list.cc ('k') | chrome/browser/ui/app_list/fast_show_pickler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « ash/shell/app_list.cc ('k') | chrome/browser/ui/app_list/fast_show_pickler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698