| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/tabs/tab_strip_selection_model.h" | 5 #include "chrome/browser/tabs/tab_strip_selection_model.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <valarray> | 8 #include <valarray> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 anchor_ = active_ = kUnselectedIndex; | 134 anchor_ = active_ = kUnselectedIndex; |
| 135 SelectedIndices empty_selection; | 135 SelectedIndices empty_selection; |
| 136 selected_indices_.swap(empty_selection); | 136 selected_indices_.swap(empty_selection); |
| 137 } | 137 } |
| 138 | 138 |
| 139 void TabStripSelectionModel::Copy(const TabStripSelectionModel& source) { | 139 void TabStripSelectionModel::Copy(const TabStripSelectionModel& source) { |
| 140 selected_indices_ = source.selected_indices_; | 140 selected_indices_ = source.selected_indices_; |
| 141 active_ = source.active_; | 141 active_ = source.active_; |
| 142 anchor_ = source.anchor_; | 142 anchor_ = source.anchor_; |
| 143 } | 143 } |
| 144 |
| 145 bool TabStripSelectionModel::Equals(const TabStripSelectionModel& rhs) const { |
| 146 return active_ == rhs.active() && |
| 147 anchor_ == rhs.anchor() && |
| 148 selected_indices() == rhs.selected_indices(); |
| 149 } |
| OLD | NEW |