| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/tabs/tab_strip.h" | 5 #include "chrome/browser/views/tabs/tab_strip.h" |
| 6 | 6 |
| 7 #include "app/animation_container.h" | 7 #include "app/animation_container.h" |
| 8 #include "app/drag_drop_types.h" | 8 #include "app/drag_drop_types.h" |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/os_exchange_data.h" | 10 #include "app/os_exchange_data.h" |
| (...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1522 | 1522 |
| 1523 void TabStrip::NewTabAnimation2Done() { | 1523 void TabStrip::NewTabAnimation2Done() { |
| 1524 animation_type_ = ANIMATION_NEW_TAB_3; | 1524 animation_type_ = ANIMATION_NEW_TAB_3; |
| 1525 | 1525 |
| 1526 GenerateIdealBounds(); | 1526 GenerateIdealBounds(); |
| 1527 | 1527 |
| 1528 AnimateToIdealBounds(); | 1528 AnimateToIdealBounds(); |
| 1529 | 1529 |
| 1530 SlideAnimation* animation = new SlideAnimation(NULL); | 1530 SlideAnimation* animation = new SlideAnimation(NULL); |
| 1531 animation->SetSlideDuration(kNewTab3DurationMs); | 1531 animation->SetSlideDuration(kNewTab3DurationMs); |
| 1532 animation->SetTweenType(SlideAnimation::EASE_IN_OUT); | 1532 animation->SetTweenType(Tween::EASE_IN_OUT); |
| 1533 | 1533 |
| 1534 // BoundsAnimator takes ownership of animation. | 1534 // BoundsAnimator takes ownership of animation. |
| 1535 bounds_animator_.SetAnimationForView(tab_data_.back().tab, animation); | 1535 bounds_animator_.SetAnimationForView(tab_data_.back().tab, animation); |
| 1536 } | 1536 } |
| 1537 | 1537 |
| 1538 void TabStrip::AnimateToIdealBounds() { | 1538 void TabStrip::AnimateToIdealBounds() { |
| 1539 for (size_t i = 0; i < tab_data_.size(); ++i) { | 1539 for (size_t i = 0; i < tab_data_.size(); ++i) { |
| 1540 if (!tab_data_[i].tab->closing()) { | 1540 if (!tab_data_[i].tab->closing()) { |
| 1541 bounds_animator_.AnimateViewTo(tab_data_[i].tab, | 1541 bounds_animator_.AnimateViewTo(tab_data_[i].tab, |
| 1542 tab_data_[i].ideal_bounds); | 1542 tab_data_[i].ideal_bounds); |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1802 return tab_data_.size(); | 1802 return tab_data_.size(); |
| 1803 } | 1803 } |
| 1804 | 1804 |
| 1805 int TabStrip::TabDataIndexOfTab(Tab* tab) const { | 1805 int TabStrip::TabDataIndexOfTab(Tab* tab) const { |
| 1806 for (size_t i = 0; i < tab_data_.size(); ++i) { | 1806 for (size_t i = 0; i < tab_data_.size(); ++i) { |
| 1807 if (tab_data_[i].tab == tab) | 1807 if (tab_data_[i].tab == tab) |
| 1808 return i; | 1808 return i; |
| 1809 } | 1809 } |
| 1810 return -1; | 1810 return -1; |
| 1811 } | 1811 } |
| OLD | NEW |