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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_controller.h

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 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_CONTROLLER_H_
7 7
8 #include "chrome/browser/ui/views/tabs/tab_strip_types.h" 8 #include "chrome/browser/ui/views/tabs/tab_strip_types.h"
9 9
10 class Tab; 10 class Tab;
(...skipping 11 matching lines...) Expand all
22 } 22 }
23 23
24 // Controller for tabs. 24 // Controller for tabs.
25 class TabController { 25 class TabController {
26 public: 26 public:
27 virtual const ui::ListSelectionModel& GetSelectionModel() = 0; 27 virtual const ui::ListSelectionModel& GetSelectionModel() = 0;
28 28
29 // Returns true if multiple selection is supported. 29 // Returns true if multiple selection is supported.
30 virtual bool SupportsMultipleSelection() = 0; 30 virtual bool SupportsMultipleSelection() = 0;
31 31
32 // Returns true if the last input type used for this controller was
33 // touch (rather than mouse).
34 virtual bool TouchWasUsedAsLastInput() = 0;
tdanderson 2015/02/06 20:34:33 It seems wrong to add something like this to TabCo
sky 2015/02/07 00:09:39 Agreed. Maybe this should be ShouldShowCloseButton
tdanderson 2015/02/10 18:52:17 Done.
35
32 // Selects the tab. 36 // Selects the tab.
33 virtual void SelectTab(Tab* tab) = 0; 37 virtual void SelectTab(Tab* tab) = 0;
34 38
35 // Extends the selection from the anchor to |tab|. 39 // Extends the selection from the anchor to |tab|.
36 virtual void ExtendSelectionTo(Tab* tab) = 0; 40 virtual void ExtendSelectionTo(Tab* tab) = 0;
37 41
38 // Toggles whether |tab| is selected. 42 // Toggles whether |tab| is selected.
39 virtual void ToggleSelected(Tab* tab) = 0; 43 virtual void ToggleSelected(Tab* tab) = 0;
40 44
41 // Adds the selection from the anchor to |tab|. 45 // Adds the selection from the anchor to |tab|.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 98
95 // Adds private information to the tab's accessibility state. 99 // Adds private information to the tab's accessibility state.
96 virtual void UpdateTabAccessibilityState(const Tab* tab, 100 virtual void UpdateTabAccessibilityState(const Tab* tab,
97 ui::AXViewState* state) = 0; 101 ui::AXViewState* state) = 0;
98 102
99 protected: 103 protected:
100 virtual ~TabController() {} 104 virtual ~TabController() {}
101 }; 105 };
102 106
103 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_CONTROLLER_H_ 107 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698