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

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

Issue 893843007: Experiment to hide close buttons of inactive tabs when using touch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
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 #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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698