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

Unified Diff: chrome/browser/extensions/app_shortcut_manager.cc

Issue 11786003: Move Icons out of Extension class (Closed) Base URL: http://git.chromium.org/chromium/src.git@dc_unref_browser_action
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/app_shortcut_manager.cc
diff --git a/chrome/browser/extensions/app_shortcut_manager.cc b/chrome/browser/extensions/app_shortcut_manager.cc
index 195aaa36f582d08c36b8e5c38945ccffad8b18db..7ca1848fec84138bbc7e775b4450434e999ef9c1 100644
--- a/chrome/browser/extensions/app_shortcut_manager.cc
+++ b/chrome/browser/extensions/app_shortcut_manager.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/web_applications/web_app.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/extensions/api/icons/icons_handler.h"
#include "chrome/common/extensions/extension_resource.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
@@ -118,8 +119,8 @@ void AppShortcutManager::UpdateApplicationShortcuts(
std::vector<ImageLoader::ImageRepresentation> info_list;
for (size_t i = 0; i < arraysize(kDesiredSizes); ++i) {
int size = kDesiredSizes[i];
- ExtensionResource resource = extension->GetIconResource(
- size, ExtensionIconSet::MATCH_EXACTLY);
+ ExtensionResource resource = IconsInfo::GetIconResource(
+ extension, size, ExtensionIconSet::MATCH_EXACTLY);
if (!resource.empty()) {
info_list.push_back(ImageLoader::ImageRepresentation(
resource,
@@ -136,11 +137,11 @@ void AppShortcutManager::UpdateApplicationShortcuts(
// If there is no icon at the desired sizes, we will resize what we can get.
// Making a large icon smaller is preferred to making a small icon larger,
// so look for a larger icon first:
- ExtensionResource resource = extension->GetIconResource(
- size, ExtensionIconSet::MATCH_BIGGER);
+ ExtensionResource resource = IconsInfo::GetIconResource(
+ extension, size, ExtensionIconSet::MATCH_BIGGER);
if (resource.empty()) {
- resource = extension->GetIconResource(
- size, ExtensionIconSet::MATCH_SMALLER);
+ resource = IconsInfo::GetIconResource(
+ extension, size, ExtensionIconSet::MATCH_SMALLER);
}
info_list.push_back(ImageLoader::ImageRepresentation(
resource,

Powered by Google App Engine
This is Rietveld 408576698