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

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

Issue 10267023: Gets tab dragging to work in touch mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 8 years, 7 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 | Annotate | Revision Log
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_TOUCH_TAB_STRIP_LAYOUT_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TOUCH_TAB_STRIP_LAYOUT_H_
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TOUCH_TAB_STRIP_LAYOUT_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TOUCH_TAB_STRIP_LAYOUT_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "ui/gfx/size.h" 10 #include "ui/gfx/size.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 int start_x, 70 int start_x,
71 int mini_tab_count); 71 int mini_tab_count);
72 72
73 // Returns the active index as used by this class. The active index dictates 73 // Returns the active index as used by this class. The active index dictates
74 // stacking and what tabs are visible. As mini-tabs are never stacked, 74 // stacking and what tabs are visible. As mini-tabs are never stacked,
75 // TouchTabStripLayout forces the active index to be in the normal tabs. 75 // TouchTabStripLayout forces the active index to be in the normal tabs.
76 int active_index() const { 76 int active_index() const {
77 return active_index_ < mini_tab_count_ ? mini_tab_count_ : active_index_; 77 return active_index_ < mini_tab_count_ ? mini_tab_count_ : active_index_;
78 } 78 }
79 79
80 int mini_tab_count() const { return mini_tab_count_; }
81
82 // Returns true if the tab at index is stacked.
83 bool IsStacked(int index) const;
84
80 private: 85 private:
81 friend class TouchTabStripLayoutTest; 86 friend class TouchTabStripLayoutTest;
82 87
83 // Sets the x-coordinate normal tabs start at, width mini-tab count and 88 // Sets the x-coordinate normal tabs start at, width mini-tab count and
84 // active index at once. 89 // active index at once.
85 void Reset(int x, int width, int mini_tab_count, int active_index); 90 void Reset(int x, int width, int mini_tab_count, int active_index);
86 91
87 // Resets to an ideal layout state. 92 // Resets to an ideal layout state.
88 void ResetToIdealState(); 93 void ResetToIdealState();
89 94
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // Number of mini-tabs. 210 // Number of mini-tabs.
206 int mini_tab_count_; 211 int mini_tab_count_;
207 212
208 // Index of the active tab. 213 // Index of the active tab.
209 int active_index_; 214 int active_index_;
210 215
211 DISALLOW_COPY_AND_ASSIGN(TouchTabStripLayout); 216 DISALLOW_COPY_AND_ASSIGN(TouchTabStripLayout);
212 }; 217 };
213 218
214 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TOUCH_TAB_STRIP_LAYOUT_H_ 219 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TOUCH_TAB_STRIP_LAYOUT_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_strip.cc ('k') | chrome/browser/ui/views/tabs/touch_tab_strip_layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698