summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/dock_info_gtk.cc6
-rw-r--r--chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc11
2 files changed, 14 insertions, 3 deletions
diff --git a/chrome/browser/dock_info_gtk.cc b/chrome/browser/dock_info_gtk.cc
index 64a86ef..6923e25 100644
--- a/chrome/browser/dock_info_gtk.cc
+++ b/chrome/browser/dock_info_gtk.cc
@@ -193,12 +193,12 @@ GtkWindow* DockInfo::GetLocalProcessWindowAtPoint(
if (factory_)
return factory_->GetLocalProcessWindowAtPoint(screen_point, ignore);
-#if !defined(TOOLKIT_VIEWS)
+#if defined(OS_CHROMEOS) || defined(TOOLKIT_VIEWS)
+ return NULL;
+#else
XID xid =
LocalProcessWindowFinder::GetProcessWindowAtPoint(screen_point, ignore);
return BrowserWindowGtk::GetBrowserWindowForXID(xid);
-#else
- return NULL;
#endif
}
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);
}