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

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

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_impl.cc
diff --git a/components/mus/ws/window_tree_impl.cc b/components/mus/ws/window_tree_impl.cc
index 18edf8a1319996da410294924f5c16525d039034..296237010693f5ad380c78f3cc8414e2d40c8084 100644
--- a/components/mus/ws/window_tree_impl.cc
+++ b/components/mus/ws/window_tree_impl.cc
@@ -364,6 +364,15 @@ void WindowTreeImpl::ProcessWillChangeWindowVisibility(
NotifyDrawnStateChanged(window, window_target_drawn_state);
}
+void WindowTreeImpl::ProcessCursorChanged(const ServerWindow* window,
+ int32_t cursor_id,
+ bool originated_change) {
+ if (originated_change)
+ return;
+ client()->OnWindowCursorChanged(WindowIdToTransportId(window->id()),
+ mojom::Cursor(cursor_id));
+}
+
void WindowTreeImpl::ProcessFocusChanged(
const ServerWindow* old_focused_window,
const ServerWindow* new_focused_window) {
@@ -857,6 +866,16 @@ void WindowTreeImpl::SetCanFocus(uint32_t window_id, bool can_focus) {
window->set_can_focus(can_focus);
}
+void WindowTreeImpl::SetStandardCursor(uint32_t window_id,
+ mus::mojom::Cursor cursor_id) {
+ ServerWindow* window = GetWindow(WindowIdFromTransportId(window_id));
+
+ // Only the owner of the window can change the bounds.
+ bool success = window && access_policy_->CanSetCursorProperties(window);
+ if (success)
sky 2015/12/01 21:48:01 You need to create an Operation here. See 856 for
+ window->SetCursor(cursor_id);
+}
+
void WindowTreeImpl::WmResponse(uint32 change_id, bool response) {
if (GetHost() && GetHost()->GetWindowTree() == this)
connection_manager_->WindowManagerChangeCompleted(change_id, response);

Powered by Google App Engine
This is Rietveld 408576698