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

Unified Diff: chrome/browser/ui/views/tabs/tab_drag_controller.h

Issue 338263002: Change how the insertion point for tab drags is calculated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.h ('k') | chrome/browser/ui/views/tabs/tab_drag_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab_drag_controller.h
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.h b/chrome/browser/ui/views/tabs/tab_drag_controller.h
index e402dda724c5bb9bb353ad8f7fdb26b484ee5a28..1f4b7ed131efb26dc5f679667eba5403b4cc1d51 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller.h
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller.h
@@ -330,11 +330,14 @@ class TabDragController : public content::WebContentsDelegate,
void RunMoveLoop(const gfx::Vector2d& drag_offset);
// Determines the index to insert tabs at. |dragged_bounds| is the bounds of
- // the tabs being dragged, |start| the index of the tab to start looking from
- // and |delta| the amount to increment (1 or -1).
- int GetInsertionIndexFrom(const gfx::Rect& dragged_bounds,
- int start,
- int delta) const;
+ // the tabs being dragged, |start| the index of the tab to start looking from.
+ // The search proceeds to the end of the strip.
+ int GetInsertionIndexFrom(const gfx::Rect& dragged_bounds, int start) const;
+
+ // Like GetInsertionIndexFrom(), but searches backwards from |start| to the
+ // beginning of the strip.
+ int GetInsertionIndexFromReversed(const gfx::Rect& dragged_bounds,
+ int start) const;
// Returns the index where the dragged WebContents should be inserted into
// |attached_tabstrip_| given the DraggedTabView's bounds |dragged_bounds| in
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.h ('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