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

Unified Diff: components/exo/pointer.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 | « ash/wm/window_manager_unittest.cc ('k') | components/exo/shell_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/pointer.cc
diff --git a/components/exo/pointer.cc b/components/exo/pointer.cc
index e650b4f4ffe35b7732e406cdf59a315515d966a9..fe25e944589c979ca614ba3fbbd30170ab05c15f 100644
--- a/components/exo/pointer.cc
+++ b/components/exo/pointer.cc
@@ -51,7 +51,7 @@ bool SameLocation(const ui::LocatedEvent* event, const gfx::PointF& location) {
Pointer::Pointer(PointerDelegate* delegate)
: delegate_(delegate),
- cursor_(ui::kCursorNull),
+ cursor_(ui::CursorType::kNull),
cursor_capture_source_id_(base::UnguessableToken::Create()),
cursor_capture_weak_ptr_factory_(this) {
auto* helper = WMHelper::GetInstance();
@@ -125,7 +125,7 @@ void Pointer::SetCursor(Surface* surface, const gfx::Point& hotspot) {
CaptureCursor();
} else {
cursor_capture_weak_ptr_factory_.InvalidateWeakPtrs();
- cursor_ = ui::kCursorNone;
+ cursor_ = ui::CursorType::kNone;
UpdateCursor();
}
}
@@ -151,7 +151,7 @@ void Pointer::OnMouseEvent(ui::MouseEvent* event) {
// response to each OnPointerEnter() call.
focus_->UnregisterCursorProvider(this);
focus_ = nullptr;
- cursor_ = ui::kCursorNull;
+ cursor_ = ui::CursorType::kNull;
cursor_capture_weak_ptr_factory_.InvalidateWeakPtrs();
}
// Second generate an enter event if focus moved to a new target.
@@ -348,7 +348,7 @@ void Pointer::OnCursorCaptured(const gfx::Point& hotspot,
if (!focus_)
return;
- cursor_ = ui::kCursorNone;
+ cursor_ = ui::CursorType::kNone;
if (!result->IsEmpty()) {
DCHECK(result->HasBitmap());
std::unique_ptr<SkBitmap> bitmap = result->TakeBitmap();
@@ -363,7 +363,7 @@ void Pointer::OnCursorCaptured(const gfx::Point& hotspot,
XcursorImage* image = ui::SkBitmapToXcursorImage(bitmap.get(), hotspot);
platform_cursor = ui::CreateReffedCustomXCursor(image);
#endif
- cursor_ = ui::kCursorCustom;
+ cursor_ = ui::CursorType::kCustom;
cursor_.SetPlatformCursor(platform_cursor);
#if defined(USE_OZONE)
ui::CursorFactoryOzone::GetInstance()->UnrefImageCursor(platform_cursor);
« no previous file with comments | « ash/wm/window_manager_unittest.cc ('k') | components/exo/shell_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698