| OLD | NEW |
| 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 "chrome/browser/ui/views/tabs/tab_strip.h" | 5 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windowsx.h> | 8 #include <windowsx.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 // We have "tiny tabs" if the tabs are so tiny that the unselected ones are | 836 // We have "tiny tabs" if the tabs are so tiny that the unselected ones are |
| 837 // a different size to the selected ones. | 837 // a different size to the selected ones. |
| 838 bool tiny_tabs = current_unselected_width_ != current_selected_width_; | 838 bool tiny_tabs = current_unselected_width_ != current_selected_width_; |
| 839 if (!IsAnimating() && (!in_tab_close_ || tiny_tabs)) { | 839 if (!IsAnimating() && (!in_tab_close_ || tiny_tabs)) { |
| 840 DoLayout(); | 840 DoLayout(); |
| 841 } else { | 841 } else { |
| 842 SchedulePaint(); | 842 SchedulePaint(); |
| 843 } | 843 } |
| 844 } | 844 } |
| 845 | 845 |
| 846 ui::ListSelectionModel::SelectedIndices no_longer_selected; | 846 ui::ListSelectionModel::SelectedIndices no_longer_selected = |
| 847 std::insert_iterator<ui::ListSelectionModel::SelectedIndices> | 847 base::STLSetDifference<ui::ListSelectionModel::SelectedIndices>( |
| 848 it(no_longer_selected, no_longer_selected.begin()); | 848 old_selection.selected_indices(), |
| 849 std::set_difference(old_selection.selected_indices().begin(), | 849 new_selection.selected_indices()); |
| 850 old_selection.selected_indices().end(), | |
| 851 new_selection.selected_indices().begin(), | |
| 852 new_selection.selected_indices().end(), | |
| 853 it); | |
| 854 for (size_t i = 0; i < no_longer_selected.size(); ++i) | 850 for (size_t i = 0; i < no_longer_selected.size(); ++i) |
| 855 tab_at(no_longer_selected[i])->StopMiniTabTitleAnimation(); | 851 tab_at(no_longer_selected[i])->StopMiniTabTitleAnimation(); |
| 856 } | 852 } |
| 857 | 853 |
| 858 void TabStrip::TabTitleChangedNotLoading(int model_index) { | 854 void TabStrip::TabTitleChangedNotLoading(int model_index) { |
| 859 Tab* tab = tab_at(model_index); | 855 Tab* tab = tab_at(model_index); |
| 860 if (tab->data().mini && !tab->IsActive()) | 856 if (tab->data().mini && !tab->IsActive()) |
| 861 tab->StartMiniTabTitleAnimation(); | 857 tab->StartMiniTabTitleAnimation(); |
| 862 } | 858 } |
| 863 | 859 |
| (...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2716 if (!adjust_layout_) | 2712 if (!adjust_layout_) |
| 2717 return false; | 2713 return false; |
| 2718 | 2714 |
| 2719 #if !defined(OS_CHROMEOS) | 2715 #if !defined(OS_CHROMEOS) |
| 2720 if (ui::GetDisplayLayout() != ui::LAYOUT_TOUCH) | 2716 if (ui::GetDisplayLayout() != ui::LAYOUT_TOUCH) |
| 2721 return false; | 2717 return false; |
| 2722 #endif | 2718 #endif |
| 2723 | 2719 |
| 2724 return true; | 2720 return true; |
| 2725 } | 2721 } |
| OLD | NEW |