summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/tabs
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 21:42:35 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 21:42:35 +0000
commit6c9ade0bd9ad6960342efbb01fb121eaf874dc3b (patch)
treedb429bf08416bf4701c09bd553ec672f4b28d4d5 /chrome/browser/gtk/tabs
parent3a73f53f744be8b31f1d0c1080d92b46d3159eac (diff)
downloadchromium_src-6c9ade0bd9ad6960342efbb01fb121eaf874dc3b.zip
chromium_src-6c9ade0bd9ad6960342efbb01fb121eaf874dc3b.tar.gz
chromium_src-6c9ade0bd9ad6960342efbb01fb121eaf874dc3b.tar.bz2
Makes it so you can't detach tabs on Chrome OS. It doesn't make sense
given the current design and triggers a crash. I'm also effectively disabling DockInfo for ChromeOS as that triggers a crash. I don't believe we'll hit the code after my first change, but I'm going for completeness. BUG=none TEST=none Review URL: http://codereview.chromium.org/399083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32408 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/tabs')
-rw-r--r--chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc b/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc
index ae063b7..2bc7772 100644
--- a/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc
+++ b/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc
@@ -248,7 +248,12 @@ void DraggedTabControllerGtk::ContinueDragging() {
// Determine whether or not we have dragged over a compatible TabStrip in
// another browser window. If we have, we should attach to it and start
// dragging within it.
+#if defined(OS_CHROMEOS)
+ // We don't allow detaching on chrome os.
+ TabStripGtk* target_tabstrip = source_tabstrip_;
+#else
TabStripGtk* target_tabstrip = GetTabStripForPoint(screen_point);
+#endif
if (target_tabstrip != attached_tabstrip_) {
// Make sure we're fully detached from whatever TabStrip we're attached to
// (if any).
@@ -669,6 +674,12 @@ gfx::Point DraggedTabControllerGtk::GetDraggedTabPoint(
(tabstrip_bounds.bottom() + vertical_drag_magnetism)) {
y = max_y;
}
+#if defined(OS_CHROMEOS)
+ // We don't allow detaching on chromeos. This restricts dragging to the
+ // source window.
+ x = std::min(std::max(x, tabstrip_bounds.x()), max_x);
+ y = tabstrip_bounds.y();
+#endif
}
return gfx::Point(x, y);
}