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

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

Issue 1465803003: mus: Let clients set the cursor of their window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync pass the nacl breakage Created 5 years 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_host_impl.h
diff --git a/components/mus/ws/window_tree_host_impl.h b/components/mus/ws/window_tree_host_impl.h
index ae23e2c117018f74b055add200cc91726c9835e6..916044356442093b18c55e14dc8812a5365c8152 100644
--- a/components/mus/ws/window_tree_host_impl.h
+++ b/components/mus/ws/window_tree_host_impl.h
@@ -93,6 +93,10 @@ class WindowTreeHostImpl : public DisplayManagerDelegate,
const ui::TextInputState& state);
void SetImeVisibility(ServerWindow* window, bool visible);
+ // Called when a client updates a cursor. This will update the cursor on the
+ // native display if the cursor is currently under |window|.
+ void OnCursorUpdated(ServerWindow* window);
+
// WindowTreeHost:
void SetSize(mojo::SizePtr size) override;
void SetTitle(const mojo::String& title) override;
@@ -117,6 +121,8 @@ class WindowTreeHostImpl : public DisplayManagerDelegate,
void OnEventAckTimeout();
void DispatchNextEventFromQueue();
+ void UpdateNativeCursor(int32_t cursor_id);
+
// DisplayManagerDelegate:
ServerWindow* GetRootWindow() override;
void OnEvent(mojom::EventPtr event) override;
@@ -158,6 +164,9 @@ class WindowTreeHostImpl : public DisplayManagerDelegate,
mojom::WindowManagerPtr window_manager_;
mojom::WindowTree* tree_awaiting_input_ack_;
+ // The last cursor set. Used to track whether we need to change the cursor.
+ int32_t last_cursor_;
+
std::set<WindowId> activation_parents_;
// Set of windows with surfaces that need to be destroyed once the frame

Powered by Google App Engine
This is Rietveld 408576698