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

Side by Side Diff: chrome/common/extensions/extension.cc

Issue 10915251: Fix for pixelated icons in extension install ui on 2x scale. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: .. Created 8 years, 3 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
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | no next file » | 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/common/extensions/extension.h" 5 #include "chrome/common/extensions/extension.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 3043 matching lines...) Expand 10 before | Expand all | Expand 10 after
3054 DLOG(ERROR) << "Icon file has unexpected size: " 3054 DLOG(ERROR) << "Icon file has unexpected size: "
3055 << base::IntToString(decoded->width()) << "x" 3055 << base::IntToString(decoded->width()) << "x"
3056 << base::IntToString(decoded->height()); 3056 << base::IntToString(decoded->height());
3057 return; 3057 return;
3058 } 3058 }
3059 3059
3060 result->swap(decoded); 3060 result->swap(decoded);
3061 } 3061 }
3062 3062
3063 // static 3063 // static
3064 const SkBitmap& Extension::GetDefaultIcon(bool is_app) { 3064 const gfx::ImageSkia& Extension::GetDefaultIcon(bool is_app) {
3065 int id = is_app ? IDR_APP_DEFAULT_ICON : IDR_EXTENSION_DEFAULT_ICON; 3065 int id = is_app ? IDR_APP_DEFAULT_ICON : IDR_EXTENSION_DEFAULT_ICON;
3066 return *ResourceBundle::GetSharedInstance().GetBitmapNamed(id); 3066 return *ResourceBundle::GetSharedInstance().GetImageSkiaNamed(id);
3067 } 3067 }
3068 3068
3069 // static 3069 // static
3070 GURL Extension::GetBaseURLFromExtensionId(const std::string& extension_id) { 3070 GURL Extension::GetBaseURLFromExtensionId(const std::string& extension_id) {
3071 return GURL(std::string(chrome::kExtensionScheme) + 3071 return GURL(std::string(chrome::kExtensionScheme) +
3072 content::kStandardSchemeSeparator + extension_id + "/"); 3072 content::kStandardSchemeSeparator + extension_id + "/");
3073 } 3073 }
3074 3074
3075 bool Extension::InitFromValue(int flags, string16* error) { 3075 bool Extension::InitFromValue(int flags, string16* error) {
3076 DCHECK(error); 3076 DCHECK(error);
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
3965 3965
3966 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( 3966 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo(
3967 const Extension* extension, 3967 const Extension* extension,
3968 const PermissionSet* permissions, 3968 const PermissionSet* permissions,
3969 Reason reason) 3969 Reason reason)
3970 : reason(reason), 3970 : reason(reason),
3971 extension(extension), 3971 extension(extension),
3972 permissions(permissions) {} 3972 permissions(permissions) {}
3973 3973
3974 } // namespace extensions 3974 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698