| 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 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 | 960 |
| 961 const ui::ListSelectionModel& TabStrip::GetSelectionModel() { | 961 const ui::ListSelectionModel& TabStrip::GetSelectionModel() { |
| 962 return controller_->GetSelectionModel(); | 962 return controller_->GetSelectionModel(); |
| 963 } | 963 } |
| 964 | 964 |
| 965 bool TabStrip::SupportsMultipleSelection() { | 965 bool TabStrip::SupportsMultipleSelection() { |
| 966 // TODO: currently only allow single selection in touch layout mode. | 966 // TODO: currently only allow single selection in touch layout mode. |
| 967 return touch_layout_ == NULL; | 967 return touch_layout_ == NULL; |
| 968 } | 968 } |
| 969 | 969 |
| 970 bool TabStrip::TouchWasUsedAsLastInput() { |
| 971 return stacked_layout_; |
| 972 } |
| 973 |
| 970 void TabStrip::SelectTab(Tab* tab) { | 974 void TabStrip::SelectTab(Tab* tab) { |
| 971 int model_index = GetModelIndexOfTab(tab); | 975 int model_index = GetModelIndexOfTab(tab); |
| 972 if (IsValidModelIndex(model_index)) | 976 if (IsValidModelIndex(model_index)) |
| 973 controller_->SelectTab(model_index); | 977 controller_->SelectTab(model_index); |
| 974 } | 978 } |
| 975 | 979 |
| 976 void TabStrip::ExtendSelectionTo(Tab* tab) { | 980 void TabStrip::ExtendSelectionTo(Tab* tab) { |
| 977 int model_index = GetModelIndexOfTab(tab); | 981 int model_index = GetModelIndexOfTab(tab); |
| 978 if (IsValidModelIndex(model_index)) | 982 if (IsValidModelIndex(model_index)) |
| 979 controller_->ExtendSelectionTo(model_index); | 983 controller_->ExtendSelectionTo(model_index); |
| (...skipping 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2740 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); | 2744 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); |
| 2741 if (view) | 2745 if (view) |
| 2742 return view; | 2746 return view; |
| 2743 } | 2747 } |
| 2744 Tab* tab = FindTabForEvent(point); | 2748 Tab* tab = FindTabForEvent(point); |
| 2745 if (tab) | 2749 if (tab) |
| 2746 return ConvertPointToViewAndGetEventHandler(this, tab, point); | 2750 return ConvertPointToViewAndGetEventHandler(this, tab, point); |
| 2747 } | 2751 } |
| 2748 return this; | 2752 return this; |
| 2749 } | 2753 } |
| OLD | NEW |