OLD | NEW |
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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 // Returns true if the tabs were originality one after the other in | 456 // Returns true if the tabs were originality one after the other in |
457 // |source_tabstrip_|. | 457 // |source_tabstrip_|. |
458 bool AreTabsConsecutive(); | 458 bool AreTabsConsecutive(); |
459 | 459 |
460 // Creates and returns a new Browser to handle the drag. | 460 // Creates and returns a new Browser to handle the drag. |
461 Browser* CreateBrowserForDrag(TabStrip* source, | 461 Browser* CreateBrowserForDrag(TabStrip* source, |
462 const gfx::Point& point_in_screen, | 462 const gfx::Point& point_in_screen, |
463 gfx::Vector2d* drag_offset, | 463 gfx::Vector2d* drag_offset, |
464 std::vector<gfx::Rect>* drag_bounds); | 464 std::vector<gfx::Rect>* drag_bounds); |
465 | 465 |
| 466 // Calculates new bounds for the dragged browser window. |
| 467 gfx::Rect CalculateDraggedBrowserBounds(TabStrip* source, |
| 468 const gfx::Point& point_in_screen, |
| 469 std::vector<gfx::Rect>* drag_bounds); |
| 470 |
466 // Returns the TabStripModel for the specified tabstrip. | 471 // Returns the TabStripModel for the specified tabstrip. |
467 TabStripModel* GetModel(TabStrip* tabstrip) const; | 472 TabStripModel* GetModel(TabStrip* tabstrip) const; |
468 | 473 |
469 // Returns the location of the cursor. This is either the location of the | 474 // Returns the location of the cursor. This is either the location of the |
470 // mouse or the location of the current touch point. | 475 // mouse or the location of the current touch point. |
471 gfx::Point GetCursorScreenPoint(); | 476 gfx::Point GetCursorScreenPoint(); |
472 | 477 |
473 // Returns the offset from the top left corner of the window to | 478 // Returns the offset from the top left corner of the window to |
474 // |point_in_screen|. | 479 // |point_in_screen|. |
475 gfx::Vector2d GetWindowOffset(const gfx::Point& point_in_screen); | 480 gfx::Vector2d GetWindowOffset(const gfx::Point& point_in_screen); |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 // See comment around use for more details. | 641 // See comment around use for more details. |
637 int attach_x_; | 642 int attach_x_; |
638 int attach_index_; | 643 int attach_index_; |
639 | 644 |
640 base::WeakPtrFactory<TabDragController> weak_factory_; | 645 base::WeakPtrFactory<TabDragController> weak_factory_; |
641 | 646 |
642 DISALLOW_COPY_AND_ASSIGN(TabDragController); | 647 DISALLOW_COPY_AND_ASSIGN(TabDragController); |
643 }; | 648 }; |
644 | 649 |
645 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ | 650 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ |
OLD | NEW |