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

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

Issue 301063003: Resized the icon in the Uninstall dialog to be 64x64 px (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_uninstall_dialog.cc
diff --git a/chrome/browser/extensions/extension_uninstall_dialog.cc b/chrome/browser/extensions/extension_uninstall_dialog.cc
index 7a04a5d2f522a7dc66ad7f9d8778833dac44103c..47216fc7309cc9f3d5dc9444900369ca87d1b3ba 100644
--- a/chrome/browser/extensions/extension_uninstall_dialog.cc
+++ b/chrome/browser/extensions/extension_uninstall_dialog.cc
@@ -30,14 +30,6 @@
namespace {
-// Returns pixel size under maximal scale factor for the icon whose device
-// independent size is |size_in_dip|
-int GetSizeForMaxScaleFactor(int size_in_dip) {
- float max_scale_factor_scale = gfx::ImageSkia::GetMaxSupportedScale();
-
- return static_cast<int>(size_in_dip * max_scale_factor_scale);
-}
-
// Returns bitmap for the default icon with size equal to the default icon's
// pixel size under maximal supported scale factor.
SkBitmap GetDefaultIconBitmapForMaxScaleFactor(bool is_app) {
@@ -50,9 +42,6 @@ SkBitmap GetDefaultIconBitmapForMaxScaleFactor(bool is_app) {
} // namespace
-// Size of extension icon in top left of dialog.
-static const int kIconSize = 69;
tapted 2014/05/29 05:14:28 drive-by: This constant is used in some mac .xib (
sashab 2014/05/29 05:19:18 This was feedback from a UX reviewer. The icon siz
-
ExtensionUninstallDialog::ExtensionUninstallDialog(
Profile* profile,
Browser* browser,
@@ -93,20 +82,23 @@ void ExtensionUninstallDialog::ConfirmUninstall(
extension_,
icon_size,
ExtensionIconSet::MATCH_BIGGER);
- // Load the icon whose pixel size is large enough to be displayed under
- // maximal supported scale factor. UI code will scale the icon down if needed.
- int pixel_size = GetSizeForMaxScaleFactor(kIconSize);
// Load the image asynchronously. The response will be sent to OnImageLoaded.
state_ = kImageIsLoading;
extensions::ImageLoader* loader =
extensions::ImageLoader::Get(profile_);
- loader->LoadImageAsync(extension_,
- image,
- gfx::Size(pixel_size, pixel_size),
- base::Bind(&ExtensionUninstallDialog::OnImageLoaded,
- AsWeakPtr(),
- extension_->id()));
+
+ std::vector<extensions::ImageLoader::ImageRepresentation> images_list;
+ images_list.push_back(extensions::ImageLoader::ImageRepresentation(
+ image,
+ extensions::ImageLoader::ImageRepresentation::NEVER_RESIZE,
+ gfx::Size(0, 0),
calamity 2014/05/29 05:36:21 gfx::Size()
sashab 2014/05/29 05:46:15 Done.
+ ui::SCALE_FACTOR_100P));
+ loader->LoadImagesAsync(extension_,
+ images_list,
+ base::Bind(&ExtensionUninstallDialog::OnImageLoaded,
+ AsWeakPtr(),
+ extension_->id()));
}
void ExtensionUninstallDialog::SetIcon(const gfx::Image& image) {
« no previous file with comments | « no previous file | chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698