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

Unified Diff: components/mus/public/cpp/lib/window_tree_client_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/public/cpp/lib/window_tree_client_impl.cc
diff --git a/components/mus/public/cpp/lib/window_tree_client_impl.cc b/components/mus/public/cpp/lib/window_tree_client_impl.cc
index 163f1a35d31bdc70f3a169568e1c36a8d085bba5..02c35274b097206daf5f8fe5c5664fac4d74231b 100644
--- a/components/mus/public/cpp/lib/window_tree_client_impl.cc
+++ b/components/mus/public/cpp/lib/window_tree_client_impl.cc
@@ -222,6 +222,12 @@ void WindowTreeClientImpl::SetCanFocus(Id window_id, bool can_focus) {
tree_->SetCanFocus(window_id, can_focus);
}
+void WindowTreeClientImpl::SetStandardCursor(Id window_id,
+ mus::mojom::Cursor cursor_id) {
+ DCHECK(tree_);
+ tree_->SetStandardCursor(window_id, cursor_id);
+}
+
void WindowTreeClientImpl::SetVisible(Id window_id, bool visible) {
DCHECK(tree_);
tree_->SetWindowVisibility(window_id, visible, ActionCompletedCallback());
@@ -592,6 +598,15 @@ void WindowTreeClientImpl::OnWindowFocused(Id focused_window_id) {
}
}
+void WindowTreeClientImpl::OnWindowCursorChanged(Id window_id,
+ mojom::Cursor cursor) {
+ Window* window = GetWindowById(window_id);
+ if (window) {
+ FOR_EACH_OBSERVER(WindowObserver, *WindowPrivate(window).observers(),
+ OnWindowCursorChanged(window, cursor));
+ }
+}
+
void WindowTreeClientImpl::OnChangeCompleted(uint32 change_id, bool success) {
scoped_ptr<InFlightChange> change(std::move(in_flight_map_[change_id]));
in_flight_map_.erase(change_id);

Powered by Google App Engine
This is Rietveld 408576698