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

Unified Diff: ash/mus/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
« no previous file with comments | « no previous file | content/renderer/mus/renderer_window_tree_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/move_event_handler.cc
diff --git a/ash/mus/move_event_handler.cc b/ash/mus/move_event_handler.cc
index 6c89fa9f0554cc817484b9f4797a1d5ce81442d3..0051d49b5e2893386a30d126254e17a4d68478b1 100644
--- a/ash/mus/move_event_handler.cc
+++ b/ash/mus/move_event_handler.cc
@@ -10,6 +10,7 @@
#include "ui/aura/mus/window_manager_delegate.h"
#include "ui/aura/window.h"
#include "ui/base/class_property.h"
+#include "ui/base/cursor/cursor.h"
#include "ui/base/hit_test.h"
#include "ui/events/event.h"
@@ -28,26 +29,26 @@ namespace ash {
namespace mus {
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;
}
}
@@ -122,7 +123,8 @@ void MoveEventHandler::OnMouseEvent(ui::MouseEvent* event) {
const int hit_test_location =
wm_window_->GetNonClientComponent(event->location());
window_manager_client_->SetNonClientCursor(
- wm_window_->aura_window(), CursorForWindowComponent(hit_test_location));
+ wm_window_->aura_window(),
+ ui::CursorData(CursorForWindowComponent(hit_test_location)));
}
WorkspaceEventHandlerMus* workspace_event_handler =
« no previous file with comments | « no previous file | content/renderer/mus/renderer_window_tree_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698