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

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

Issue 7044061: Fixes bug where closing a pinned tab followed by dragging a tab could (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/timer.h" 10 #include "base/timer.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 // animating to their desired position/bounds. This is used by the standard 207 // animating to their desired position/bounds. This is used by the standard
208 // Layout method and other callers like the DraggedTabController that need 208 // Layout method and other callers like the DraggedTabController that need
209 // stable representations of Tab positions. 209 // stable representations of Tab positions.
210 virtual void GenerateIdealBounds(); 210 virtual void GenerateIdealBounds();
211 211
212 // Starts various types of TabStrip animations. 212 // Starts various types of TabStrip animations.
213 void StartResizeLayoutAnimation(); 213 void StartResizeLayoutAnimation();
214 virtual void StartMiniTabAnimation(); 214 virtual void StartMiniTabAnimation();
215 void StartMouseInitiatedRemoveTabAnimation(int model_index); 215 void StartMouseInitiatedRemoveTabAnimation(int model_index);
216 216
217 // Calculates the available width for tabs, assuming a Tab is to be closed.
218 int GetAvailableWidthForTabs(Tab* last_tab) const;
219
220 // Returns true if the specified point in TabStrip coords is within the 217 // Returns true if the specified point in TabStrip coords is within the
221 // hit-test region of the specified Tab. 218 // hit-test region of the specified Tab.
222 bool IsPointInTab(Tab* tab, const gfx::Point& point_in_tabstrip_coords); 219 bool IsPointInTab(Tab* tab, const gfx::Point& point_in_tabstrip_coords);
223 220
224 // -- Member Variables ------------------------------------------------------ 221 // -- Member Variables ------------------------------------------------------
225 222
226 // The "New Tab" button. 223 // The "New Tab" button.
227 views::ImageButton* newtab_button_; 224 views::ImageButton* newtab_button_;
228 225
229 // Ideal bounds of the new tab button. 226 // Ideal bounds of the new tab button.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 262
266 // Used for stage 1 of new tab animation. 263 // Used for stage 1 of new tab animation.
267 base::OneShotTimer<TabStrip> new_tab_timer_; 264 base::OneShotTimer<TabStrip> new_tab_timer_;
268 265
269 scoped_ptr<views::MouseWatcher> mouse_watcher_; 266 scoped_ptr<views::MouseWatcher> mouse_watcher_;
270 267
271 DISALLOW_COPY_AND_ASSIGN(TabStrip); 268 DISALLOW_COPY_AND_ASSIGN(TabStrip);
272 }; 269 };
273 270
274 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ 271 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698