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

Side by Side Diff: chrome/browser/ui/app_list/search/app_result.cc

Issue 458983004: Move app list search result icon sizes to app_list_constants. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/search/app_result.h" 5 #include "chrome/browser/ui/app_list/search/app_result.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.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/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 29 matching lines...) Expand all
40 if (app_list::switches::IsExperimentalAppListEnabled()) 40 if (app_list::switches::IsExperimentalAppListEnabled())
41 set_display_type(DISPLAY_TILE); 41 set_display_type(DISPLAY_TILE);
42 42
43 const extensions::Extension* extension = 43 const extensions::Extension* extension =
44 extensions::ExtensionSystem::Get(profile_)->extension_service() 44 extensions::ExtensionSystem::Get(profile_)->extension_service()
45 ->GetInstalledExtension(app_id_); 45 ->GetInstalledExtension(app_id_);
46 DCHECK(extension); 46 DCHECK(extension);
47 47
48 is_platform_app_ = extension->is_platform_app(); 48 is_platform_app_ = extension->is_platform_app();
49 49
50 icon_.reset(new extensions::IconImage( 50 icon_.reset(
51 profile_, 51 new extensions::IconImage(profile_,
52 extension, 52 extension,
53 extensions::IconsInfo::GetIcons(extension), 53 extensions::IconsInfo::GetIcons(extension),
54 display_type() == DISPLAY_TILE ? extension_misc::EXTENSION_ICON_MEDIUM 54 GetPreferredIconSize(),
Matt Giuca 2014/08/12 06:43:24 So we're explicitly forking these values away from
calamity 2014/08/13 06:03:17 Tried it. It didn't seem to be a problem. Semantic
Matt Giuca 2014/08/13 06:15:25 Acknowledged.
55 : extension_misc::EXTENSION_ICON_SMALL, 55 extensions::util::GetDefaultAppIcon(),
56 extensions::util::GetDefaultAppIcon(), 56 this));
57 this));
58 UpdateIcon(); 57 UpdateIcon();
59 58
60 StartObservingExtensionRegistry(); 59 StartObservingExtensionRegistry();
61 } 60 }
62 61
63 AppResult::~AppResult() { 62 AppResult::~AppResult() {
64 StopObservingExtensionRegistry(); 63 StopObservingExtensionRegistry();
65 } 64 }
66 65
67 void AppResult::UpdateFromMatch(const TokenizedString& title, 66 void AppResult::UpdateFromMatch(const TokenizedString& title,
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 214
216 NotifyItemUninstalled(); 215 NotifyItemUninstalled();
217 } 216 }
218 217
219 void AppResult::OnShutdown(extensions::ExtensionRegistry* registry) { 218 void AppResult::OnShutdown(extensions::ExtensionRegistry* registry) {
220 DCHECK_EQ(extension_registry_, registry); 219 DCHECK_EQ(extension_registry_, registry);
221 StopObservingExtensionRegistry(); 220 StopObservingExtensionRegistry();
222 } 221 }
223 222
224 } // namespace app_list 223 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698