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

Side by Side Diff: ui/views/mus/native_widget_mus.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: Do it the other way + explicit checks that it is a mouse pointer. 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 unified diff | Download patch
« no previous file with comments | « ui/platform_window/x11/x11_window.cc ('k') | ui/views/mus/platform_window_mus.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/mus/native_widget_mus.h" 5 #include "ui/views/mus/native_widget_mus.h"
6 6
7 #include "base/thread_task_runner_handle.h" 7 #include "base/thread_task_runner_handle.h"
8 #include "components/mus/public/cpp/property_type_converters.h" 8 #include "components/mus/public/cpp/property_type_converters.h"
9 #include "components/mus/public/cpp/window.h" 9 #include "components/mus/public/cpp/window.h"
10 #include "components/mus/public/cpp/window_property.h" 10 #include "components/mus/public/cpp/window_property.h"
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 int operation, 582 int operation,
583 ui::DragDropTypes::DragEventSource source) { 583 ui::DragDropTypes::DragEventSource source) {
584 // NOTIMPLEMENTED(); 584 // NOTIMPLEMENTED();
585 } 585 }
586 586
587 void NativeWidgetMus::SchedulePaintInRect(const gfx::Rect& rect) { 587 void NativeWidgetMus::SchedulePaintInRect(const gfx::Rect& rect) {
588 content_->SchedulePaintInRect(rect); 588 content_->SchedulePaintInRect(rect);
589 } 589 }
590 590
591 void NativeWidgetMus::SetCursor(gfx::NativeCursor cursor) { 591 void NativeWidgetMus::SetCursor(gfx::NativeCursor cursor) {
592 // NOTIMPLEMENTED(); 592 // TODO(erg): In aura, our incoming cursor is really two
593 // parts. cursor.native_type() is an integer for standard cursors and is all
594 // we support right now. If native_type() == kCursorCustom, than we should
595 // also send an image, but as the cursor code is currently written, the image
596 // is in a platform native format that's already uploaded to the window
597 // server.
598 window_tree_host_->platform_window()->SetCursorById(
599 mus::mojom::Cursor(cursor.native_type()));
593 } 600 }
594 601
595 bool NativeWidgetMus::IsMouseEventsEnabled() const { 602 bool NativeWidgetMus::IsMouseEventsEnabled() const {
596 // NOTIMPLEMENTED(); 603 // NOTIMPLEMENTED();
597 return true; 604 return true;
598 } 605 }
599 606
600 void NativeWidgetMus::ClearNativeFocus() { 607 void NativeWidgetMus::ClearNativeFocus() {
601 // NOTIMPLEMENTED(); 608 // NOTIMPLEMENTED();
602 } 609 }
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 } else { 782 } else {
776 native_widget_delegate_->OnScrollEvent(event); 783 native_widget_delegate_->OnScrollEvent(event);
777 } 784 }
778 } 785 }
779 786
780 void NativeWidgetMus::OnGestureEvent(ui::GestureEvent* event) { 787 void NativeWidgetMus::OnGestureEvent(ui::GestureEvent* event) {
781 native_widget_delegate_->OnGestureEvent(event); 788 native_widget_delegate_->OnGestureEvent(event);
782 } 789 }
783 790
784 } // namespace views 791 } // namespace views
OLDNEW
« no previous file with comments | « ui/platform_window/x11/x11_window.cc ('k') | ui/views/mus/platform_window_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698