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

Side by Side Diff: chrome/browser/extensions/extension_uninstall_dialog.cc

Issue 10453101: Convert most of the rest of chrome to ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 (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/browser/extensions/extension_uninstall_dialog.h" 5 #include "chrome/browser/extensions/extension_uninstall_dialog.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/common/extensions/extension.h" 10 #include "chrome/common/extensions/extension.h"
(...skipping 28 matching lines...) Expand all
39 ExtensionIconSet::MATCH_BIGGER); 39 ExtensionIconSet::MATCH_BIGGER);
40 // Load the image asynchronously. The response will be sent to OnImageLoaded. 40 // Load the image asynchronously. The response will be sent to OnImageLoaded.
41 tracker_.LoadImage(extension_, image, 41 tracker_.LoadImage(extension_, image,
42 gfx::Size(kIconSize, kIconSize), 42 gfx::Size(kIconSize, kIconSize),
43 ImageLoadingTracker::DONT_CACHE); 43 ImageLoadingTracker::DONT_CACHE);
44 } 44 }
45 45
46 void ExtensionUninstallDialog::SetIcon(const gfx::Image& image) { 46 void ExtensionUninstallDialog::SetIcon(const gfx::Image& image) {
47 if (image.IsEmpty()) { 47 if (image.IsEmpty()) {
48 if (extension_->is_app()) { 48 if (extension_->is_app()) {
49 icon_ = *ResourceBundle::GetSharedInstance().GetBitmapNamed( 49 icon_ = *ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
50 IDR_APP_DEFAULT_ICON); 50 IDR_APP_DEFAULT_ICON);
51 } else { 51 } else {
52 icon_ = *ResourceBundle::GetSharedInstance().GetBitmapNamed( 52 icon_ = *ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
53 IDR_EXTENSION_DEFAULT_ICON); 53 IDR_EXTENSION_DEFAULT_ICON);
54 } 54 }
55 } else { 55 } else {
56 icon_ = *image.ToSkBitmap(); 56 icon_ = *image.ToImageSkia();
57 } 57 }
58 } 58 }
59 59
60 void ExtensionUninstallDialog::OnImageLoaded(const gfx::Image& image, 60 void ExtensionUninstallDialog::OnImageLoaded(const gfx::Image& image,
61 const std::string& extension_id, 61 const std::string& extension_id,
62 int index) { 62 int index) {
63 SetIcon(image); 63 SetIcon(image);
64 64
65 Show(); 65 Show();
66 } 66 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_uninstall_dialog.h ('k') | chrome/browser/media/media_stream_capture_indicator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698