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

Side by Side Diff: ash/launcher/tabbed_launcher_button.cc

Issue 11359008: Merge 164399 - Make MultiAnimation take time param and slow down tab highlight (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1271/src/
Patch Set: Created 8 years, 1 month 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 | « no previous file | chrome/browser/ui/search/toolbar_search_animator.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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 61 }
62 62
63 void TabbedLauncherButton::IconView::SetTabImage(const gfx::ImageSkia& image) { 63 void TabbedLauncherButton::IconView::SetTabImage(const gfx::ImageSkia& image) {
64 if (image.isNull()) { 64 if (image.isNull()) {
65 if (!image_.isNull()) { 65 if (!image_.isNull()) {
66 // Pause for 500ms, then ease out for 200ms. 66 // Pause for 500ms, then ease out for 200ms.
67 ui::MultiAnimation::Parts animation_parts; 67 ui::MultiAnimation::Parts animation_parts;
68 animation_parts.push_back(ui::MultiAnimation::Part(500, ui::Tween::ZERO)); 68 animation_parts.push_back(ui::MultiAnimation::Part(500, ui::Tween::ZERO));
69 animation_parts.push_back( 69 animation_parts.push_back(
70 ui::MultiAnimation::Part(200, ui::Tween::EASE_OUT)); 70 ui::MultiAnimation::Part(200, ui::Tween::EASE_OUT));
71 animation_.reset(new ui::MultiAnimation(animation_parts)); 71 animation_.reset(new ui::MultiAnimation(
72 animation_parts,
73 ui::MultiAnimation::GetDefaultTimerInterval()));
72 animation_->set_continuous(false); 74 animation_->set_continuous(false);
73 animation_->set_delegate(this); 75 animation_->set_delegate(this);
74 animation_->Start(); 76 animation_->Start();
75 animating_image_ = image_; 77 animating_image_ = image_;
76 image_ = image; 78 image_ = image;
77 } 79 }
78 } else { 80 } else {
79 animation_.reset(); 81 animation_.reset();
80 SchedulePaint(); 82 SchedulePaint();
81 image_ = image; 83 image_ = image;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON; 141 state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
140 state->name = host()->GetAccessibleName(this); 142 state->name = host()->GetAccessibleName(this);
141 } 143 }
142 144
143 LauncherButton::IconView* TabbedLauncherButton::CreateIconView() { 145 LauncherButton::IconView* TabbedLauncherButton::CreateIconView() {
144 return new IconView(this); 146 return new IconView(this);
145 } 147 }
146 148
147 } // namespace internal 149 } // namespace internal
148 } // namespace ash 150 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/search/toolbar_search_animator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698