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

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: Latest master + Yoyo's requests 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 0eef11e24e36f80cbe0d09dff0b3f318185f3337..e475fba8a719a7ef6be60c8c049940b52f5bcd9c 100644
--- a/chrome/browser/extensions/app_shortcut_manager.cc
+++ b/chrome/browser/extensions/app_shortcut_manager.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -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