Index: chrome/browser/ui/views/tabs/tab_drag_controller.cc |
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc |
index 6c192ae54b273e3028796af00a0668c77ec1dcb6..9c1a3edc74e85e969c0d0d9984dc8fd3951538dc 100644 |
--- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc |
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc |
@@ -54,6 +54,12 @@ |
#include "ui/wm/core/window_modality_controller.h" |
#endif |
+#if defined(MOJO_SHELL_CLIENT) |
+#include "chrome/browser/ui/views/tabs/window_finder_mus.h" |
+#include "content/public/common/mojo_shell_connection.h" |
+#include "services/shell/runner/common/client_util.h" |
+#endif |
+ |
using base::UserMetricsAction; |
using content::OpenURLParams; |
using content::WebContents; |
@@ -222,9 +228,17 @@ TabDragController::TabDragController() |
is_mutating_(false), |
attach_x_(-1), |
attach_index_(-1), |
- window_finder_(new WindowFinder), |
weak_factory_(this) { |
instance_ = this; |
+ |
+#if defined(MOJO_SHELL_CLIENT) |
+ content::MojoShellConnection* mojo_shell_connection = |
+ content::MojoShellConnection::GetForProcess(); |
+ if (mojo_shell_connection && shell::ShellIsRemote()) |
+ window_finder_.reset(new WindowFinderMus); |
+ else |
+#endif |
+ window_finder_.reset(new WindowFinder); |
} |
TabDragController::~TabDragController() { |