Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6511)

Unified Diff: chrome/browser/ui/views/tabs/tab_drag_controller.cc

Issue 2099513003: mus: Use the new drag API to implement tab dragging in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dragging-part-1
Patch Set: Rebase to tot Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/views/tabs/window_finder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/views/tabs/window_finder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698