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

Unified Diff: ui/aura/mus/window_tree_client.cc

Issue 2830703003: [views-mus] Support custom cursors. (Closed)
Patch Set: fix cast_shell_linux Created 3 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
« no previous file with comments | « ui/aura/mus/window_tree_client.h ('k') | ui/aura/test/mus/test_window_manager_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/window_tree_client.cc
diff --git a/ui/aura/mus/window_tree_client.cc b/ui/aura/mus/window_tree_client.cc
index d272bad304b7fd8c3e26437a9cf8df824b03117e..52b15cbc039d056cc8bad570c02cf09c62897be3 100644
--- a/ui/aura/mus/window_tree_client.cc
+++ b/ui/aura/mus/window_tree_client.cc
@@ -302,14 +302,14 @@ void WindowTreeClient::SetCanFocus(Window* window, bool can_focus) {
tree_->SetCanFocus(WindowMus::Get(window)->server_id(), can_focus);
}
-void WindowTreeClient::SetPredefinedCursor(WindowMus* window,
- ui::mojom::CursorType old_cursor,
- ui::mojom::CursorType new_cursor) {
+void WindowTreeClient::SetCursor(WindowMus* window,
+ const ui::CursorData& old_cursor,
+ const ui::CursorData& new_cursor) {
DCHECK(tree_);
const uint32_t change_id = ScheduleInFlightChange(
- base::MakeUnique<InFlightPredefinedCursorChange>(window, old_cursor));
- tree_->SetPredefinedCursor(change_id, window->server_id(), new_cursor);
+ base::MakeUnique<InFlightCursorChange>(window, old_cursor));
+ tree_->SetCursor(change_id, window->server_id(), new_cursor);
}
void WindowTreeClient::SetWindowTextInputState(WindowMus* window,
@@ -1341,18 +1341,17 @@ void WindowTreeClient::OnWindowFocused(Id focused_window_id) {
focus_synchronizer_->SetFocusFromServer(focused_window);
}
-void WindowTreeClient::OnWindowPredefinedCursorChanged(
- Id window_id,
- ui::mojom::CursorType cursor) {
+void WindowTreeClient::OnWindowCursorChanged(Id window_id,
+ ui::CursorData cursor) {
WindowMus* window = GetWindowByServerId(window_id);
if (!window)
return;
- InFlightPredefinedCursorChange new_change(window, cursor);
+ InFlightCursorChange new_change(window, cursor);
if (ApplyServerChangeToExistingInFlightChange(new_change))
return;
- window->SetPredefinedCursorFromServer(cursor);
+ window->SetCursorFromServer(cursor);
}
void WindowTreeClient::OnWindowSurfaceChanged(
@@ -1770,10 +1769,10 @@ void WindowTreeClient::SetFrameDecorationValues(
}
void WindowTreeClient::SetNonClientCursor(Window* window,
- ui::mojom::CursorType cursor_id) {
+ const ui::CursorData& cursor) {
if (window_manager_client_) {
window_manager_client_->WmSetNonClientCursor(
- WindowMus::Get(window)->server_id(), cursor_id);
+ WindowMus::Get(window)->server_id(), cursor);
}
}
« no previous file with comments | « ui/aura/mus/window_tree_client.h ('k') | ui/aura/test/mus/test_window_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698