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

Unified Diff: mash/simple_wm/move_event_handler.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
Index: mash/simple_wm/move_event_handler.cc
diff --git a/mash/simple_wm/move_event_handler.cc b/mash/simple_wm/move_event_handler.cc
index 99582edc5f7d80d0f5cf1870c505018e4535cd76..4e1d58aa9d7abd332e084ed557c58cd6f39f4faf 100644
--- a/mash/simple_wm/move_event_handler.cc
+++ b/mash/simple_wm/move_event_handler.cc
@@ -9,32 +9,33 @@
#include "ui/aura/mus/window_port_mus.h"
#include "ui/aura/window.h"
#include "ui/aura/window_delegate.h"
+#include "ui/base/cursor/cursor.h"
#include "ui/base/hit_test.h"
#include "ui/events/event.h"
namespace simple_wm {
namespace {
-ui::mojom::CursorType CursorForWindowComponent(int window_component) {
+ui::CursorType CursorForWindowComponent(int window_component) {
switch (window_component) {
case HTBOTTOM:
- return ui::mojom::CursorType::kSouthResize;
+ return ui::CursorType::kSouthResize;
case HTBOTTOMLEFT:
- return ui::mojom::CursorType::kSouthWestResize;
+ return ui::CursorType::kSouthWestResize;
case HTBOTTOMRIGHT:
- return ui::mojom::CursorType::kSouthEastResize;
+ return ui::CursorType::kSouthEastResize;
case HTLEFT:
- return ui::mojom::CursorType::kWestResize;
+ return ui::CursorType::kWestResize;
case HTRIGHT:
- return ui::mojom::CursorType::kEastResize;
+ return ui::CursorType::kEastResize;
case HTTOP:
- return ui::mojom::CursorType::kNorthResize;
+ return ui::CursorType::kNorthResize;
case HTTOPLEFT:
- return ui::mojom::CursorType::kNorthWestResize;
+ return ui::CursorType::kNorthWestResize;
case HTTOPRIGHT:
- return ui::mojom::CursorType::kNorthEastResize;
+ return ui::CursorType::kNorthEastResize;
default:
- return ui::mojom::CursorType::kNull;
+ return ui::CursorType::kNull;
}
}
@@ -78,8 +79,8 @@ void MoveEventHandler::ProcessLocatedEvent(ui::LocatedEvent* event) {
move_loop_ = MoveLoop::Create(window_, ht_location, *pointer_event.get());
} else if (pointer_event->type() == ui::ET_POINTER_MOVED) {
const int ht_location = GetNonClientComponentForEvent(pointer_event.get());
- aura::WindowPortMus::Get(window_)->SetPredefinedCursor(
- CursorForWindowComponent(ht_location));
+ aura::WindowPortMus::Get(window_)->SetCursor(
+ ui::CursorData(CursorForWindowComponent(ht_location)));
}
if (had_move_loop || move_loop_)
event->SetHandled();
« no previous file with comments | « content/renderer/mus/renderer_window_tree_client.cc ('k') | services/ui/public/interfaces/cursor/cursor.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698