summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tabs
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-07 18:44:31 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-07 18:44:31 +0000
commit7c0560f904487819f2c408c87899d1ccfa91c1fe (patch)
treeda949466cd6dd09f5ce575b206a65b6ba0e1a2f9 /chrome/browser/tabs
parent93a2c7241cddc33af51cdc3daea03e414f544ec8 (diff)
downloadchromium_src-7c0560f904487819f2c408c87899d1ccfa91c1fe.zip
chromium_src-7c0560f904487819f2c408c87899d1ccfa91c1fe.tar.gz
chromium_src-7c0560f904487819f2c408c87899d1ccfa91c1fe.tar.bz2
Basics of a new TabStrip.It's very, very rough, but I wanted to check it in so I don't have to keep typing svn pset as I pass patches back and forth between machines.Behind a command line flag --enable-tabtastic2.I'm trying to split the TabContents specific stuff off of the TabStrip so it's more generic (and more easily mocked for unit testing of various layout conditions). Hence TabStrip vs. BrowserTabStrip. TabStrip may move into views/ once this process is complete.Animator is a utility that can be associated with a View that (at this point) animates that View's bounds from wherever it is now to somewhere else. The TabStrip uses this to do animations for individual Tabs that are independent of each other - a limitation of the old TabStrip is that only one animation is ever active at a time so its animations are a little jumpy compared to other products.Also, detached tab dragging shows the live contents, with all animations/video/etc.Like I said, this is really rough, but I didn't want it to grow any bigger. I will write up a design doc later.http://crbug.com/9032TEST=TBD... will finally be doing some for TabStrip layout!
Review URL: http://codereview.chromium.org/42490 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20053 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tabs')
-rw-r--r--chrome/browser/tabs/tab_strip_model.h10
-rw-r--r--chrome/browser/tabs/tab_strip_model_unittest.cc4
2 files changed, 14 insertions, 0 deletions
diff --git a/chrome/browser/tabs/tab_strip_model.h b/chrome/browser/tabs/tab_strip_model.h
index 2431883..fdbe77e 100644
--- a/chrome/browser/tabs/tab_strip_model.h
+++ b/chrome/browser/tabs/tab_strip_model.h
@@ -130,6 +130,16 @@ class TabStripModelDelegate {
const gfx::Rect& window_bounds,
const DockInfo& dock_info) = 0;
+ // Creates a new Browser object and window containing the specified
+ // |contents|, and continues a drag operation that began within the source
+ // window's tab strip. |window_bounds| are the bounds of the source window in
+ // screen coordinates, used to place the new window, and |tab_bounds| are the
+ // bounds of the dragged Tab view in the source window, in screen coordinates,
+ // used to place the new Tab in the new window.
+ virtual void ContinueDraggingDetachedTab(TabContents* contents,
+ const gfx::Rect& window_bounds,
+ const gfx::Rect& tab_bounds) = 0;
+
enum {
TAB_MOVE_ACTION = 1,
TAB_TEAROFF_ACTION = 2
diff --git a/chrome/browser/tabs/tab_strip_model_unittest.cc b/chrome/browser/tabs/tab_strip_model_unittest.cc
index 0f74cc0..19991a3 100644
--- a/chrome/browser/tabs/tab_strip_model_unittest.cc
+++ b/chrome/browser/tabs/tab_strip_model_unittest.cc
@@ -36,6 +36,10 @@ class TabStripDummyDelegate : public TabStripModelDelegate {
const DockInfo& dock_info) {
return NULL;
}
+ virtual void ContinueDraggingDetachedTab(TabContents* contents,
+ const gfx::Rect& window_bounds,
+ const gfx::Rect& tab_bounds) {
+ }
virtual int GetDragActions() const { return 0; }
virtual TabContents* CreateTabContentsForURL(
const GURL& url,