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

Unified Diff: components/exo/pointer.cc

Issue 2833163002: Change ui cursor identifiers to an enum class. (Closed)
Patch Set: Remove extranious ::ui:: 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: components/exo/pointer.cc
diff --git a/components/exo/pointer.cc b/components/exo/pointer.cc
index e650b4f4ffe35b7732e406cdf59a315515d966a9..53d32a88578f10378c50028f701fd8fbc35b036d 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::CURSOR_NULL),
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::NONE;
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::CURSOR_NULL;
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::NONE;
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::CUSTOM;
cursor_.SetPlatformCursor(platform_cursor);
#if defined(USE_OZONE)
ui::CursorFactoryOzone::GetInstance()->UnrefImageCursor(platform_cursor);

Powered by Google App Engine
This is Rietveld 408576698