| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 "WebMouseEvent should not have gaps"); | 75 "WebMouseEvent should not have gaps"); |
| 76 static_assert(sizeof(WebMouseWheelEvent) == | 76 static_assert(sizeof(WebMouseWheelEvent) == |
| 77 sizeof(SameSizeAsWebMouseWheelEvent), | 77 sizeof(SameSizeAsWebMouseWheelEvent), |
| 78 "WebMouseWheelEvent should not have gaps"); | 78 "WebMouseWheelEvent should not have gaps"); |
| 79 static_assert(sizeof(WebGestureEvent) == sizeof(SameSizeAsWebGestureEvent), | 79 static_assert(sizeof(WebGestureEvent) == sizeof(SameSizeAsWebGestureEvent), |
| 80 "WebGestureEvent should not have gaps"); | 80 "WebGestureEvent should not have gaps"); |
| 81 static_assert(sizeof(WebTouchEvent) == sizeof(SameSizeAsWebTouchEvent), | 81 static_assert(sizeof(WebTouchEvent) == sizeof(SameSizeAsWebTouchEvent), |
| 82 "WebTouchEvent should not have gaps"); | 82 "WebTouchEvent should not have gaps"); |
| 83 | 83 |
| 84 #define CASE_TYPE(t) \ | 84 #define CASE_TYPE(t) \ |
| 85 case WebInputEvent::t: \ | 85 case WebInputEvent::k##t: \ |
| 86 return #t | 86 return #t |
| 87 // static | 87 // static |
| 88 const char* WebInputEvent::GetName(WebInputEvent::Type type) { | 88 const char* WebInputEvent::GetName(WebInputEvent::Type type) { |
| 89 switch (type) { | 89 switch (type) { |
| 90 /* DO NOT SUBMIT - Conflict resolution helper: |
| 91 * important to use Undefined, rather than kUndefined below. */ |
| 90 CASE_TYPE(Undefined); | 92 CASE_TYPE(Undefined); |
| 91 CASE_TYPE(MouseDown); | 93 CASE_TYPE(MouseDown); |
| 92 CASE_TYPE(MouseUp); | 94 CASE_TYPE(MouseUp); |
| 93 CASE_TYPE(MouseMove); | 95 CASE_TYPE(MouseMove); |
| 94 CASE_TYPE(MouseEnter); | 96 CASE_TYPE(MouseEnter); |
| 95 CASE_TYPE(MouseLeave); | 97 CASE_TYPE(MouseLeave); |
| 96 CASE_TYPE(ContextMenu); | 98 CASE_TYPE(ContextMenu); |
| 97 CASE_TYPE(MouseWheel); | 99 CASE_TYPE(MouseWheel); |
| 98 CASE_TYPE(RawKeyDown); | 100 CASE_TYPE(RawKeyDown); |
| 99 CASE_TYPE(KeyDown); | 101 CASE_TYPE(KeyDown); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 114 CASE_TYPE(GestureLongPress); | 116 CASE_TYPE(GestureLongPress); |
| 115 CASE_TYPE(GestureLongTap); | 117 CASE_TYPE(GestureLongTap); |
| 116 CASE_TYPE(GesturePinchBegin); | 118 CASE_TYPE(GesturePinchBegin); |
| 117 CASE_TYPE(GesturePinchEnd); | 119 CASE_TYPE(GesturePinchEnd); |
| 118 CASE_TYPE(GesturePinchUpdate); | 120 CASE_TYPE(GesturePinchUpdate); |
| 119 CASE_TYPE(TouchStart); | 121 CASE_TYPE(TouchStart); |
| 120 CASE_TYPE(TouchMove); | 122 CASE_TYPE(TouchMove); |
| 121 CASE_TYPE(TouchEnd); | 123 CASE_TYPE(TouchEnd); |
| 122 CASE_TYPE(TouchCancel); | 124 CASE_TYPE(TouchCancel); |
| 123 CASE_TYPE(TouchScrollStarted); | 125 CASE_TYPE(TouchScrollStarted); |
| 126 /* DO NOT SUBMIT - Conflict resolution helper: |
| 127 * important to use TouchScrollStarted, rather than kTouchSc... above. */ |
| 124 default: | 128 default: |
| 125 NOTREACHED(); | 129 NOTREACHED(); |
| 126 return ""; | 130 return ""; |
| 127 } | 131 } |
| 128 } | 132 } |
| 129 #undef CASE_TYPE | 133 #undef CASE_TYPE |
| 130 | 134 |
| 131 } // namespace blink | 135 } // namespace blink |
| OLD | NEW |