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

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

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.h
diff --git a/components/mus/ws/user_display_manager.h b/components/mus/ws/user_display_manager.h
index c17a7c6981a155821d53159ac3482e8ddaedc8ad..ec0eb72233d5159e96a4b0b28a937e9c637fa399 100644
--- a/components/mus/ws/user_display_manager.h
+++ b/components/mus/ws/user_display_manager.h
@@ -12,6 +12,7 @@
#include "components/mus/ws/user_id.h"
#include "mojo/public/cpp/bindings/binding_set.h"
#include "mojo/public/cpp/bindings/interface_ptr_set.h"
+#include "ui/gfx/geometry/point.h"
namespace mus {
namespace ws {
@@ -39,6 +40,9 @@ class UserDisplayManager : public mojom::DisplayManager {
// Called by Display prior to |display| being removed and destroyed.
void OnWillDestroyDisplay(Display* display);
+ // Updates the location of the cursor on this user's display.
+ void OnMouseCursorLocationChanged(const gfx::Point& location);
+
private:
friend class test::UserDisplayManagerTestApi;
@@ -57,6 +61,8 @@ class UserDisplayManager : public mojom::DisplayManager {
// Overriden from mojom::DisplayManager:
void AddObserver(mojom::DisplayManagerObserverPtr observer) override;
+ void GetCursorScreenPoint(
+ const GetCursorScreenPointCallback& callback) override;
ws::DisplayManager* display_manager_;
@@ -71,6 +77,8 @@ class UserDisplayManager : public mojom::DisplayManager {
mojo::InterfacePtrSet<mojom::DisplayManagerObserver>
display_manager_observers_;
+ gfx::Point mouse_location_;
+
// Observer used for tests.
mojom::DisplayManagerObserver* test_observer_ = nullptr;

Powered by Google App Engine
This is Rietveld 408576698