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

Side by Side Diff: ash/launcher/tabbed_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
« no previous file with comments | « ash/launcher/launcher_button.cc ('k') | ash/system/power/tray_power.cc » ('j') | 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 "ash/launcher/tabbed_launcher_button.h" 5 #include "ash/launcher/tabbed_launcher_button.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/launcher/launcher_button_host.h" 9 #include "ash/launcher/launcher_button_host.h"
10 #include "ash/launcher/launcher_types.h" 10 #include "ash/launcher/launcher_types.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 animating_image_ = SkBitmap(); 51 animating_image_ = SkBitmap();
52 } 52 }
53 53
54 void TabbedLauncherButton::IconView::AnimationProgressed( 54 void TabbedLauncherButton::IconView::AnimationProgressed(
55 const ui::Animation* animation) { 55 const ui::Animation* animation) {
56 if (animation_->current_part_index() == 1) 56 if (animation_->current_part_index() == 1)
57 SchedulePaint(); 57 SchedulePaint();
58 } 58 }
59 59
60 void TabbedLauncherButton::IconView::SetTabImage(const gfx::ImageSkia& image) { 60 void TabbedLauncherButton::IconView::SetTabImage(const gfx::ImageSkia& image) {
61 if (image.empty()) { 61 if (image.isNull()) {
62 if (!image_.empty()) { 62 if (!image_.isNull()) {
63 // Pause for 500ms, then ease out for 200ms. 63 // Pause for 500ms, then ease out for 200ms.
64 ui::MultiAnimation::Parts animation_parts; 64 ui::MultiAnimation::Parts animation_parts;
65 animation_parts.push_back(ui::MultiAnimation::Part(500, ui::Tween::ZERO)); 65 animation_parts.push_back(ui::MultiAnimation::Part(500, ui::Tween::ZERO));
66 animation_parts.push_back( 66 animation_parts.push_back(
67 ui::MultiAnimation::Part(200, ui::Tween::EASE_OUT)); 67 ui::MultiAnimation::Part(200, ui::Tween::EASE_OUT));
68 animation_.reset(new ui::MultiAnimation(animation_parts)); 68 animation_.reset(new ui::MultiAnimation(animation_parts));
69 animation_->set_continuous(false); 69 animation_->set_continuous(false);
70 animation_->set_delegate(this); 70 animation_->set_delegate(this);
71 animation_->Start(); 71 animation_->Start();
72 animating_image_ = image_; 72 animating_image_ = image_;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON; 135 state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
136 state->name = host()->GetAccessibleName(this); 136 state->name = host()->GetAccessibleName(this);
137 } 137 }
138 138
139 LauncherButton::IconView* TabbedLauncherButton::CreateIconView() { 139 LauncherButton::IconView* TabbedLauncherButton::CreateIconView() {
140 return new IconView(this); 140 return new IconView(this);
141 } 141 }
142 142
143 } // namespace internal 143 } // namespace internal
144 } // namespace ash 144 } // namespace ash
OLDNEW
« no previous file with comments | « ash/launcher/launcher_button.cc ('k') | ash/system/power/tray_power.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698