Index: ui/events/blink/web_input_event_traits.cc |
diff --git a/ui/events/blink/web_input_event_traits.cc b/ui/events/blink/web_input_event_traits.cc |
index b850f5e66f01728f4e8b4b336dbcf494da9cc34b..3bf77fcbef9a98abdf9748ffcd1257554cabf7f4 100644 |
--- a/ui/events/blink/web_input_event_traits.cc |
+++ b/ui/events/blink/web_input_event_traits.cc |
@@ -108,8 +108,7 @@ struct WebInputEventToString { |
template <class EventType> |
bool Execute(const WebInputEvent& event, std::string* result) const { |
SStringPrintf(result, "%s (Time: %lf, Modifiers: %d)\n", |
- WebInputEventTraits::GetName(event.type), |
- event.timeStampSeconds, |
+ WebInputEvent::GetName(event.type), event.timeStampSeconds, |
event.modifiers); |
const EventType& typed_event = static_cast<const EventType&>(event); |
ApppendEventDetails(typed_event, result); |
@@ -169,54 +168,6 @@ bool Apply(Operator op, |
} // namespace |
-const char* WebInputEventTraits::GetName(WebInputEvent::Type type) { |
-#define CASE_TYPE(t) case WebInputEvent::t: return #t |
- switch(type) { |
- CASE_TYPE(Undefined); |
- CASE_TYPE(MouseDown); |
- CASE_TYPE(MouseUp); |
- CASE_TYPE(MouseMove); |
- CASE_TYPE(MouseEnter); |
- CASE_TYPE(MouseLeave); |
- CASE_TYPE(ContextMenu); |
- CASE_TYPE(MouseWheel); |
- CASE_TYPE(RawKeyDown); |
- CASE_TYPE(KeyDown); |
- CASE_TYPE(KeyUp); |
- CASE_TYPE(Char); |
- CASE_TYPE(GestureScrollBegin); |
- CASE_TYPE(GestureScrollEnd); |
- CASE_TYPE(GestureScrollUpdate); |
- CASE_TYPE(GestureFlingStart); |
- CASE_TYPE(GestureFlingCancel); |
- CASE_TYPE(GestureShowPress); |
- CASE_TYPE(GestureTap); |
- CASE_TYPE(GestureTapUnconfirmed); |
- CASE_TYPE(GestureTapDown); |
- CASE_TYPE(GestureTapCancel); |
- CASE_TYPE(GestureDoubleTap); |
- CASE_TYPE(GestureTwoFingerTap); |
- CASE_TYPE(GestureLongPress); |
- CASE_TYPE(GestureLongTap); |
- CASE_TYPE(GesturePinchBegin); |
- CASE_TYPE(GesturePinchEnd); |
- CASE_TYPE(GesturePinchUpdate); |
- CASE_TYPE(TouchStart); |
- CASE_TYPE(TouchMove); |
- CASE_TYPE(TouchEnd); |
- CASE_TYPE(TouchCancel); |
- CASE_TYPE(TouchScrollStarted); |
- default: |
- // Must include default to let blink::WebInputEvent add new event types |
- // before they're added here. |
- DLOG(WARNING) << |
- "Unhandled WebInputEvent type in WebInputEventTraits::GetName.\n"; |
- break; |
- } |
-#undef CASE_TYPE |
- return ""; |
-} |
- |
std::string WebInputEventTraits::ToString(const WebInputEvent& event) { |
std::string result; |
Apply(WebInputEventToString(), event.type, event, &result); |