| 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 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <iterator> | 10 #include <iterator> |
| (...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1010 // and no longer selected, since selected_indices() is always sorted. | 1010 // and no longer selected, since selected_indices() is always sorted. |
| 1011 ui::ListSelectionModel::SelectedIndices no_longer_selected = | 1011 ui::ListSelectionModel::SelectedIndices no_longer_selected = |
| 1012 base::STLSetDifference<ui::ListSelectionModel::SelectedIndices>( | 1012 base::STLSetDifference<ui::ListSelectionModel::SelectedIndices>( |
| 1013 old_selection.selected_indices(), | 1013 old_selection.selected_indices(), |
| 1014 new_selection.selected_indices()); | 1014 new_selection.selected_indices()); |
| 1015 ui::ListSelectionModel::SelectedIndices newly_selected = | 1015 ui::ListSelectionModel::SelectedIndices newly_selected = |
| 1016 base::STLSetDifference<ui::ListSelectionModel::SelectedIndices>( | 1016 base::STLSetDifference<ui::ListSelectionModel::SelectedIndices>( |
| 1017 new_selection.selected_indices(), | 1017 new_selection.selected_indices(), |
| 1018 old_selection.selected_indices()); | 1018 old_selection.selected_indices()); |
| 1019 | 1019 |
| 1020 // Fire accessibility events that reflect the changes to selection, and | 1020 // Fire accessibility events that reflect the changes to selection. |
| 1021 // stop the pinned tab title animation on tabs no longer selected. | |
| 1022 for (size_t i = 0; i < no_longer_selected.size(); ++i) { | 1021 for (size_t i = 0; i < no_longer_selected.size(); ++i) { |
| 1023 tab_at(no_longer_selected[i]) | |
| 1024 ->SetPinnedTabTitleChangedIndicatorVisible(false); | |
| 1025 tab_at(no_longer_selected[i])->NotifyAccessibilityEvent( | 1022 tab_at(no_longer_selected[i])->NotifyAccessibilityEvent( |
| 1026 ui::AX_EVENT_SELECTION_REMOVE, true); | 1023 ui::AX_EVENT_SELECTION_REMOVE, true); |
| 1027 } | 1024 } |
| 1028 for (size_t i = 0; i < newly_selected.size(); ++i) { | 1025 for (size_t i = 0; i < newly_selected.size(); ++i) { |
| 1029 tab_at(newly_selected[i])->NotifyAccessibilityEvent( | 1026 tab_at(newly_selected[i])->NotifyAccessibilityEvent( |
| 1030 ui::AX_EVENT_SELECTION_ADD, true); | 1027 ui::AX_EVENT_SELECTION_ADD, true); |
| 1031 } | 1028 } |
| 1032 tab_at(new_selection.active())->NotifyAccessibilityEvent( | 1029 tab_at(new_selection.active())->NotifyAccessibilityEvent( |
| 1033 ui::AX_EVENT_SELECTION, true); | 1030 ui::AX_EVENT_SELECTION, true); |
| 1034 } | 1031 } |
| (...skipping 1853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2888 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); | 2885 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); |
| 2889 if (view) | 2886 if (view) |
| 2890 return view; | 2887 return view; |
| 2891 } | 2888 } |
| 2892 Tab* tab = FindTabForEvent(point); | 2889 Tab* tab = FindTabForEvent(point); |
| 2893 if (tab) | 2890 if (tab) |
| 2894 return ConvertPointToViewAndGetEventHandler(this, tab, point); | 2891 return ConvertPointToViewAndGetEventHandler(this, tab, point); |
| 2895 } | 2892 } |
| 2896 return this; | 2893 return this; |
| 2897 } | 2894 } |
| OLD | NEW |