Index: ui/touch_selection/touch_handle.cc |
diff --git a/ui/touch_selection/touch_handle.cc b/ui/touch_selection/touch_handle.cc |
index 0680e6db8afeca5bbe649bf07992391810777efe..4e0f33b1d7bf1b576e26c62f5f6510b8188e421d 100644 |
--- a/ui/touch_selection/touch_handle.cc |
+++ b/ui/touch_selection/touch_handle.cc |
@@ -50,14 +50,15 @@ TouchHandle::TouchHandle(TouchHandleClient* client, |
: drawable_(client->CreateDrawable()), |
client_(client), |
orientation_(orientation), |
- deferred_orientation_(TOUCH_HANDLE_ORIENTATION_UNDEFINED), |
+ deferred_orientation_(TouchHandleOrientation::UNDEFINED), |
alpha_(0.f), |
animate_deferred_fade_(false), |
enabled_(true), |
is_visible_(false), |
is_dragging_(false), |
is_drag_within_tap_region_(false) { |
- DCHECK_NE(orientation, TOUCH_HANDLE_ORIENTATION_UNDEFINED); |
+ DCHECK_NE(static_cast<int>(orientation), |
+ static_cast<int>(TouchHandleOrientation::UNDEFINED)); |
drawable_->SetEnabled(enabled_); |
drawable_->SetOrientation(orientation_); |
drawable_->SetAlpha(alpha_); |
@@ -115,12 +116,14 @@ void TouchHandle::SetPosition(const gfx::PointF& position) { |
void TouchHandle::SetOrientation(TouchHandleOrientation orientation) { |
DCHECK(enabled_); |
- DCHECK_NE(orientation, TOUCH_HANDLE_ORIENTATION_UNDEFINED); |
+ DCHECK_NE(static_cast<int>(orientation), |
jdduke (slow)
2015/02/25 17:36:48
Dang, I didn't realize our DCHECK code doesn't pla
AviD
2015/02/26 06:28:08
If we define this in anonymous namespace, it gives
|
+ static_cast<int>(TouchHandleOrientation::UNDEFINED)); |
if (is_dragging_) { |
deferred_orientation_ = orientation; |
return; |
} |
- DCHECK_EQ(deferred_orientation_, TOUCH_HANDLE_ORIENTATION_UNDEFINED); |
+ DCHECK_EQ(static_cast<int>(deferred_orientation_), |
+ static_cast<int>(TouchHandleOrientation::UNDEFINED)); |
if (orientation_ == orientation) |
return; |
@@ -230,9 +233,9 @@ void TouchHandle::EndDrag() { |
is_drag_within_tap_region_ = false; |
client_->OnHandleDragEnd(*this); |
- if (deferred_orientation_ != TOUCH_HANDLE_ORIENTATION_UNDEFINED) { |
+ if (deferred_orientation_ != TouchHandleOrientation::UNDEFINED) { |
TouchHandleOrientation deferred_orientation = deferred_orientation_; |
- deferred_orientation_ = TOUCH_HANDLE_ORIENTATION_UNDEFINED; |
+ deferred_orientation_ = TouchHandleOrientation::UNDEFINED; |
SetOrientation(deferred_orientation); |
} |