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

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

Issue 11821036: Fixes couple of bugs in the TabStrip that could cause tabs to dance (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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_TAB_DRAG_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 // operation. This is used to calculate minimum elasticity before a 492 // operation. This is used to calculate minimum elasticity before a
493 // DraggedTabView is constructed. 493 // DraggedTabView is constructed.
494 gfx::Point start_point_in_screen_; 494 gfx::Point start_point_in_screen_;
495 495
496 // This is the offset of the mouse from the top left of the Tab where 496 // This is the offset of the mouse from the top left of the Tab where
497 // dragging begun. This is used to ensure that the dragged view is always 497 // dragging begun. This is used to ensure that the dragged view is always
498 // positioned at the correct location during the drag, and to ensure that the 498 // positioned at the correct location during the drag, and to ensure that the
499 // detached window is created at the right location. 499 // detached window is created at the right location.
500 gfx::Point mouse_offset_; 500 gfx::Point mouse_offset_;
501 501
502 // Offset of the mouse relative to the source tab. 502 // Ratio of the x-coordinate of the |source_tab_offset| to the width of the
503 int source_tab_offset_;
504
505 // Ratio of the x-coordinate of the |source_tab_offset_| to the width of the
506 // tab. Not used for vertical tabs. 503 // tab. Not used for vertical tabs.
507 float offset_to_width_ratio_; 504 float offset_to_width_ratio_;
508 505
509 // A hint to use when positioning new windows created by detaching Tabs. This 506 // A hint to use when positioning new windows created by detaching Tabs. This
510 // is the distance of the mouse from the top left of the dragged tab as if it 507 // is the distance of the mouse from the top left of the dragged tab as if it
511 // were the distance of the mouse from the top left of the first tab in the 508 // were the distance of the mouse from the top left of the first tab in the
512 // attached TabStrip from the top left of the window. 509 // attached TabStrip from the top left of the window.
513 gfx::Point window_create_point_; 510 gfx::Point window_create_point_;
514 511
515 // Location of the first tab in the source tabstrip in screen coordinates. 512 // Location of the first tab in the source tabstrip in screen coordinates.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 // If non-null set to true from destructor. 600 // If non-null set to true from destructor.
604 bool* destroyed_; 601 bool* destroyed_;
605 602
606 // See description above getter. 603 // See description above getter.
607 bool is_mutating_; 604 bool is_mutating_;
608 605
609 DISALLOW_COPY_AND_ASSIGN(TabDragController); 606 DISALLOW_COPY_AND_ASSIGN(TabDragController);
610 }; 607 };
611 608
612 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ 609 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.cc ('k') | chrome/browser/ui/views/tabs/tab_drag_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698