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

Unified Diff: services/ui/ws/drag_controller.cc

Issue 2833163002: Change ui cursor identifiers to an enum class. (Closed)
Patch Set: OK, it can't be explicit for mac. 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 | « services/ui/ws/display.cc ('k') | services/ui/ws/drag_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/drag_controller.cc
diff --git a/services/ui/ws/drag_controller.cc b/services/ui/ws/drag_controller.cc
index 3545ac24aada02d56daee7e964d0ee49ccb79945..d5bce60facc3b449cd5aa5e27efd30ecf0bf8605 100644
--- a/services/ui/ws/drag_controller.cc
+++ b/services/ui/ws/drag_controller.cc
@@ -52,7 +52,7 @@ DragController::DragController(
cursor_updater_(cursor_updater),
drag_operations_(drag_operations),
drag_pointer_id_(drag_pointer),
- current_cursor_(ui::mojom::CursorType::NO_DROP),
+ current_cursor_(ui::mojom::CursorType::kNoDrop),
source_window_(source_window),
source_connection_(source_connection),
mime_data_(mime_data),
@@ -190,8 +190,8 @@ void DragController::SetWindowDropOperations(ServerWindow* window,
ui::mojom::CursorType DragController::CursorForEffectBitmask(
DropEffectBitmask bitmask) {
DropEffectBitmask combined = bitmask & drag_operations_;
- return combined == ui::mojom::kDropEffectNone ? ui::mojom::CursorType::NO_DROP
- : ui::mojom::CursorType::COPY;
+ return combined == ui::mojom::kDropEffectNone ? ui::mojom::CursorType::kNoDrop
+ : ui::mojom::CursorType::kCopy;
}
void DragController::SetCurrentTargetWindow(ServerWindow* current_target) {
@@ -204,7 +204,7 @@ void DragController::SetCurrentTargetWindow(ServerWindow* current_target) {
current_cursor_ = CursorForEffectBitmask(state.bitmask);
} else {
// Can't drop in empty areas.
- current_cursor_ = ui::mojom::CursorType::NO_DROP;
+ current_cursor_ = ui::mojom::CursorType::kNoDrop;
}
cursor_updater_->OnDragCursorUpdated();
« no previous file with comments | « services/ui/ws/display.cc ('k') | services/ui/ws/drag_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698