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

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

Issue 1881253002: mus: Implement ScreenMus::GetCursorScreenPoint(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: And fix chromeos. 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/user_display_manager.cc
diff --git a/components/mus/ws/user_display_manager.cc b/components/mus/ws/user_display_manager.cc
index e54e9b7fc444c6813b186f2c49f3824770563253..52fa97b508d08e23183377df185ecd1748c457a5 100644
--- a/components/mus/ws/user_display_manager.cc
+++ b/components/mus/ws/user_display_manager.cc
@@ -7,6 +7,7 @@
#include "components/mus/ws/display.h"
#include "components/mus/ws/display_manager.h"
#include "components/mus/ws/window_manager_state.h"
+#include "mojo/converters/geometry/geometry_type_converters.h"
namespace mus {
namespace ws {
@@ -62,6 +63,11 @@ void UserDisplayManager::OnWillDestroyDisplay(Display* display) {
test_observer_->OnDisplayRemoved(display->id());
}
+void UserDisplayManager::OnMouseCursorLocationChanged(
+ const gfx::Point& location) {
+ mouse_location_ = location;
+}
+
std::set<const WindowManagerState*>
UserDisplayManager::GetWindowManagerStatesForUser() const {
std::set<const WindowManagerState*> result;
@@ -120,5 +126,10 @@ void UserDisplayManager::AddObserver(
OnObserverAdded(observer_impl);
}
+void UserDisplayManager::GetCursorScreenPoint(
+ const GetCursorScreenPointCallback& callback) {
+ callback.Run(mojo::Point::From(mouse_location_));
+}
+
} // namespace ws
} // namespace mus

Powered by Google App Engine
This is Rietveld 408576698