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

Unified Diff: chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc

Issue 10824359: Remove ImageSkia::empty and ImageSkia::extractSubset (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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/ui/ash/launcher/browser_launcher_item_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc
index 4209c8ef9c6b4dc97a0142a0baf944c6e9c6b64a..8a893eee0ca1c81602a56ec3d7f646e2c6185b46 100644
--- a/chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc
+++ b/chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc
@@ -252,20 +252,22 @@ void BrowserLauncherItemController::UpdateLauncher(TabContents* tab) {
}
// Update the icon for extension panels.
SkBitmap new_image = favicon_loader_->GetFavicon();
- if (new_image.empty() && tab->extension_tab_helper()->GetExtensionAppIcon())
+ if (new_image.isNull() &&
+ tab->extension_tab_helper()->GetExtensionAppIcon()) {
new_image = *tab->extension_tab_helper()->GetExtensionAppIcon();
+ }
// Only update the icon if we have a new image, or none has been set yet.
// This avoids flickering to an empty image when a pinned app is opened.
- if (!new_image.empty())
+ if (!new_image.isNull())
item.image = new_image;
- else if (item.image.empty())
+ else if (item.image.isNull())
item.image = extensions::Extension::GetDefaultIcon(true);
} else {
DCHECK_EQ(TYPE_TABBED, type());
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
if (tab->favicon_tab_helper()->ShouldDisplayFavicon()) {
item.image = tab->favicon_tab_helper()->GetFavicon().AsBitmap();
- if (item.image.empty()) {
+ if (item.image.isNull()) {
item.image = *rb.GetBitmapNamed(IDR_DEFAULT_FAVICON);
}
} else {
« no previous file with comments | « chrome/browser/notifications/desktop_notification_service.cc ('k') | chrome/browser/ui/views/ash/balloon_view_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698