| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 "WebMouseEvent should not have gaps"); | 73 "WebMouseEvent should not have gaps"); |
| 74 static_assert(sizeof(WebMouseWheelEvent) == | 74 static_assert(sizeof(WebMouseWheelEvent) == |
| 75 sizeof(SameSizeAsWebMouseWheelEvent), | 75 sizeof(SameSizeAsWebMouseWheelEvent), |
| 76 "WebMouseWheelEvent should not have gaps"); | 76 "WebMouseWheelEvent should not have gaps"); |
| 77 static_assert(sizeof(WebGestureEvent) == sizeof(SameSizeAsWebGestureEvent), | 77 static_assert(sizeof(WebGestureEvent) == sizeof(SameSizeAsWebGestureEvent), |
| 78 "WebGestureEvent should not have gaps"); | 78 "WebGestureEvent should not have gaps"); |
| 79 static_assert(sizeof(WebTouchEvent) == sizeof(SameSizeAsWebTouchEvent), | 79 static_assert(sizeof(WebTouchEvent) == sizeof(SameSizeAsWebTouchEvent), |
| 80 "WebTouchEvent should not have gaps"); | 80 "WebTouchEvent should not have gaps"); |
| 81 | 81 |
| 82 #define CASE_TYPE(t) \ | 82 #define CASE_TYPE(t) \ |
| 83 case WebInputEvent::t: \ | 83 case WebInputEvent::k##t: \ |
| 84 return #t | 84 return #t |
| 85 // static | 85 // static |
| 86 const char* WebInputEvent::GetName(WebInputEvent::Type type) { | 86 const char* WebInputEvent::GetName(WebInputEvent::Type type) { |
| 87 switch (type) { | 87 switch (type) { |
| 88 /* DO NOT SUBMIT - Conflict resolution helper: |
| 89 * important to use Undefined, rather than kUndefined below. */ |
| 88 CASE_TYPE(Undefined); | 90 CASE_TYPE(Undefined); |
| 89 CASE_TYPE(MouseDown); | 91 CASE_TYPE(MouseDown); |
| 90 CASE_TYPE(MouseUp); | 92 CASE_TYPE(MouseUp); |
| 91 CASE_TYPE(MouseMove); | 93 CASE_TYPE(MouseMove); |
| 92 CASE_TYPE(MouseEnter); | 94 CASE_TYPE(MouseEnter); |
| 93 CASE_TYPE(MouseLeave); | 95 CASE_TYPE(MouseLeave); |
| 94 CASE_TYPE(ContextMenu); | 96 CASE_TYPE(ContextMenu); |
| 95 CASE_TYPE(MouseWheel); | 97 CASE_TYPE(MouseWheel); |
| 96 CASE_TYPE(RawKeyDown); | 98 CASE_TYPE(RawKeyDown); |
| 97 CASE_TYPE(KeyDown); | 99 CASE_TYPE(KeyDown); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 112 CASE_TYPE(GestureLongPress); | 114 CASE_TYPE(GestureLongPress); |
| 113 CASE_TYPE(GestureLongTap); | 115 CASE_TYPE(GestureLongTap); |
| 114 CASE_TYPE(GesturePinchBegin); | 116 CASE_TYPE(GesturePinchBegin); |
| 115 CASE_TYPE(GesturePinchEnd); | 117 CASE_TYPE(GesturePinchEnd); |
| 116 CASE_TYPE(GesturePinchUpdate); | 118 CASE_TYPE(GesturePinchUpdate); |
| 117 CASE_TYPE(TouchStart); | 119 CASE_TYPE(TouchStart); |
| 118 CASE_TYPE(TouchMove); | 120 CASE_TYPE(TouchMove); |
| 119 CASE_TYPE(TouchEnd); | 121 CASE_TYPE(TouchEnd); |
| 120 CASE_TYPE(TouchCancel); | 122 CASE_TYPE(TouchCancel); |
| 121 CASE_TYPE(TouchScrollStarted); | 123 CASE_TYPE(TouchScrollStarted); |
| 124 /* DO NOT SUBMIT - Conflict resolution helper: |
| 125 * important to use TouchScrollStarted, rather than kTouchSc... above. */ |
| 122 default: | 126 default: |
| 123 NOTREACHED(); | 127 NOTREACHED(); |
| 124 return ""; | 128 return ""; |
| 125 } | 129 } |
| 126 } | 130 } |
| 127 #undef CASE_TYPE | 131 #undef CASE_TYPE |
| 128 | 132 |
| 129 } // namespace blink | 133 } // namespace blink |
| OLD | NEW |