| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/drag_drop_types.h" | 7 #include "app/drag_drop_types.h" |
| 8 #include "app/gfx/canvas.h" | 8 #include "app/gfx/canvas.h" |
| 9 #include "app/gfx/path.h" | 9 #include "app/gfx/path.h" |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 // a different size to the selected ones. | 817 // a different size to the selected ones. |
| 818 bool tiny_tabs = current_unselected_width_ != current_selected_width_; | 818 bool tiny_tabs = current_unselected_width_ != current_selected_width_; |
| 819 if (!IsAnimating() && (!resize_layout_scheduled_ || tiny_tabs)) { | 819 if (!IsAnimating() && (!resize_layout_scheduled_ || tiny_tabs)) { |
| 820 Layout(); | 820 Layout(); |
| 821 } else { | 821 } else { |
| 822 SchedulePaint(); | 822 SchedulePaint(); |
| 823 } | 823 } |
| 824 } | 824 } |
| 825 } | 825 } |
| 826 | 826 |
| 827 void TabStrip::TabMoved(TabContents* contents, int from_index, int to_index) { | 827 void TabStrip::TabMoved(TabContents* contents, int from_index, int to_index, |
| 828 bool pinned_state_changed) { |
| 828 Tab* tab = GetTabAt(from_index); | 829 Tab* tab = GetTabAt(from_index); |
| 829 tab_data_.erase(tab_data_.begin() + from_index); | 830 tab_data_.erase(tab_data_.begin() + from_index); |
| 830 TabData data = {tab, gfx::Rect()}; | 831 TabData data = {tab, gfx::Rect()}; |
| 831 tab_data_.insert(tab_data_.begin() + to_index, data); | 832 tab_data_.insert(tab_data_.begin() + to_index, data); |
| 832 GenerateIdealBounds(); | 833 GenerateIdealBounds(); |
| 833 StartMoveTabAnimation(from_index, to_index); | 834 StartMoveTabAnimation(from_index, to_index); |
| 834 } | 835 } |
| 835 | 836 |
| 836 void TabStrip::TabChangedAt(TabContents* contents, int index, | 837 void TabStrip::TabChangedAt(TabContents* contents, int index, |
| 837 bool loading_only) { | 838 bool loading_only) { |
| (...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1631 &TabStrip::ResizeLayoutTabs), | 1632 &TabStrip::ResizeLayoutTabs), |
| 1632 kResizeTabsTimeMs); | 1633 kResizeTabsTimeMs); |
| 1633 } | 1634 } |
| 1634 } else { | 1635 } else { |
| 1635 // Mouse moved quickly out of the tab strip and then into it again, so | 1636 // Mouse moved quickly out of the tab strip and then into it again, so |
| 1636 // cancel the timer so that the strip doesn't move when the mouse moves | 1637 // cancel the timer so that the strip doesn't move when the mouse moves |
| 1637 // back over it. | 1638 // back over it. |
| 1638 resize_layout_factory_.RevokeAll(); | 1639 resize_layout_factory_.RevokeAll(); |
| 1639 } | 1640 } |
| 1640 } | 1641 } |
| OLD | NEW |