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

Unified Diff: components/mus/ws/window_tree.cc

Issue 1881253002: mus: Implement ScreenMus::GetCursorScreenPoint(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test mocks too Created 4 years, 8 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
Index: components/mus/ws/window_tree.cc
diff --git a/components/mus/ws/window_tree.cc b/components/mus/ws/window_tree.cc
index ed05e243550eee04060839076904650c0b889b1f..5500b5512ad96f153833160757fb12bfeef16dee 100644
--- a/components/mus/ws/window_tree.cc
+++ b/components/mus/ws/window_tree.cc
@@ -18,6 +18,7 @@
#include "components/mus/ws/platform_display.h"
#include "components/mus/ws/server_window.h"
#include "components/mus/ws/server_window_observer.h"
+#include "components/mus/ws/user_display_manager.h"
#include "components/mus/ws/window_manager_state.h"
#include "components/mus/ws/window_server.h"
#include "components/mus/ws/window_tree_binding.h"
@@ -669,6 +670,12 @@ WindowManagerState* WindowTree::GetWindowManagerStateForWindowManager() {
return wms;
}
+void WindowTree::GetCursorScreenPoint(
+ const GetCursorScreenPointCallback& callback) {
+ callback.Run(mojo::Point::From(
+ display_manager()->GetUserDisplayManager(user_id_)->cursor_location()));
+}
+
bool WindowTree::ShouldRouteToWindowManager(const ServerWindow* window) const {
// If the client created this window, then do not route it through the WM.
if (window->id().connection_id == id_)

Powered by Google App Engine
This is Rietveld 408576698