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

Side by Side Diff: ash/launcher/launcher_button.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 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 "ash/launcher/launcher_button.h" 5 #include "ash/launcher/launcher_button.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/launcher/launcher_button_host.h" 10 #include "ash/launcher/launcher_button_host.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 240
241 LauncherButton::~LauncherButton() { 241 LauncherButton::~LauncherButton() {
242 } 242 }
243 243
244 void LauncherButton::SetShadowedImage(const gfx::ImageSkia& image) { 244 void LauncherButton::SetShadowedImage(const gfx::ImageSkia& image) {
245 icon_view_->SetImage(gfx::ImageSkiaOperations::CreateImageWithDropShadow( 245 icon_view_->SetImage(gfx::ImageSkiaOperations::CreateImageWithDropShadow(
246 image, icon_shadows_)); 246 image, icon_shadows_));
247 } 247 }
248 248
249 void LauncherButton::SetImage(const gfx::ImageSkia& image) { 249 void LauncherButton::SetImage(const gfx::ImageSkia& image) {
250 if (image.empty()) { 250 if (image.isNull()) {
251 // TODO: need an empty image. 251 // TODO: need an empty image.
252 icon_view_->SetImage(image); 252 icon_view_->SetImage(image);
253 return; 253 return;
254 } 254 }
255 255
256 if (icon_view_->icon_size() == 0) { 256 if (icon_view_->icon_size() == 0) {
257 SetShadowedImage(image); 257 SetShadowedImage(image);
258 return; 258 return;
259 } 259 }
260 260
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 bar_->SetVerticalAlignment(views::ImageView::CENTER); 504 bar_->SetVerticalAlignment(views::ImageView::CENTER);
505 break; 505 break;
506 } 506 }
507 507
508 Layout(); 508 Layout();
509 SchedulePaint(); 509 SchedulePaint();
510 } 510 }
511 511
512 } // namespace internal 512 } // namespace internal
513 } // namespace ash 513 } // namespace ash
OLDNEW
« no previous file with comments | « ash/desktop_background/desktop_background_view.cc ('k') | ash/launcher/tabbed_launcher_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698