summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tabs
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/tabs')
-rw-r--r--chrome/browser/tabs/tab_strip_model.cc6
-rw-r--r--chrome/browser/tabs/tab_strip_model.h10
-rw-r--r--chrome/browser/tabs/tab_strip_model_unittest.cc4
3 files changed, 14 insertions, 6 deletions
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc
index 176bf94..21ba9b5 100644
--- a/chrome/browser/tabs/tab_strip_model.cc
+++ b/chrome/browser/tabs/tab_strip_model.cc
@@ -401,9 +401,11 @@ void TabStripModel::SelectLastTab() {
}
void TabStripModel::TearOffTabContents(TabContents* detached_contents,
- const gfx::Rect& window_bounds) {
+ const gfx::Rect& window_bounds,
+ const DockInfo& dock_info) {
DCHECK(detached_contents);
- delegate_->CreateNewStripWithContents(detached_contents, window_bounds);
+ delegate_->CreateNewStripWithContents(detached_contents, window_bounds,
+ dock_info);
}
// Context menu functions.
diff --git a/chrome/browser/tabs/tab_strip_model.h b/chrome/browser/tabs/tab_strip_model.h
index 386599c..d5d56f2 100644
--- a/chrome/browser/tabs/tab_strip_model.h
+++ b/chrome/browser/tabs/tab_strip_model.h
@@ -18,6 +18,7 @@
namespace gfx {
class Point;
}
+class DockInfo;
class GURL;
class NavigationController;
class Profile;
@@ -94,8 +95,11 @@ class TabStripModelDelegate {
// Ask for a new TabStripModel to be created and the given tab contents to
// be added to it. Its size and position are reflected in |window_bounds|.
+ // If |dock_info|'s type is other than NONE, the newly created window should
+ // be docked as identified by |dock_info|.
virtual void CreateNewStripWithContents(TabContents* contents,
- const gfx::Rect& window_bounds) = 0;
+ const gfx::Rect& window_bounds,
+ const DockInfo& dock_info) = 0;
enum {
TAB_MOVE_ACTION = 1,
@@ -351,7 +355,8 @@ class TabStripModel : public NotificationObserver {
// The specified contents should be opened in a new tabstrip.
void TearOffTabContents(TabContents* detached_contents,
- const gfx::Rect& window_bounds);
+ const gfx::Rect& window_bounds,
+ const DockInfo& dock_info);
// Context menu functions.
enum ContextMenuCommand {
@@ -517,4 +522,3 @@ class TabStripModel : public NotificationObserver {
};
#endif // CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H__
-
diff --git a/chrome/browser/tabs/tab_strip_model_unittest.cc b/chrome/browser/tabs/tab_strip_model_unittest.cc
index 24c9b3c..071975f 100644
--- a/chrome/browser/tabs/tab_strip_model_unittest.cc
+++ b/chrome/browser/tabs/tab_strip_model_unittest.cc
@@ -4,6 +4,7 @@
#include "base/file_util.h"
#include "base/path_service.h"
+#include "chrome/browser/dock_info.h"
#include "chrome/browser/dom_ui/new_tab_ui.h"
#include "chrome/browser/navigation_controller.h"
#include "chrome/browser/navigation_entry.h"
@@ -994,7 +995,8 @@ class TabStripDummyDelegate : public TabStripModelDelegate {
// Overridden from TabStripModelDelegate:
virtual GURL GetBlankTabURL() const { return NewTabUIURL(); }
virtual void CreateNewStripWithContents(TabContents* contents,
- const gfx::Rect& window_bounds) {}
+ const gfx::Rect& window_bounds,
+ const DockInfo& dock_info) {}
virtual int GetDragActions() const { return 0; }
virtual TabContents* CreateTabContentsForURL(
const GURL& url,