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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_strip.cc

Issue 2107603002: Makes the pinned tab title change indicator hide correctly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 4 years, 5 months 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
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.cc ('k') | chrome/browser/ui/views/tabs/tab_strip_unittest.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 "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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.cc ('k') | chrome/browser/ui/views/tabs/tab_strip_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698