| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <map> | 5 #include <map> |
| 6 | 6 |
| 7 #include "webkit/plugins/ppapi/event_conversion.h" | 7 #include "webkit/plugins/ppapi/event_conversion.h" |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/i18n/char_iterator.h" | 10 #include "base/i18n/char_iterator.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 MiddleButtonMatches); | 69 MiddleButtonMatches); |
| 70 COMPILE_ASSERT(static_cast<int>(PP_INPUTEVENT_MODIFIER_RIGHTBUTTONDOWN) == | 70 COMPILE_ASSERT(static_cast<int>(PP_INPUTEVENT_MODIFIER_RIGHTBUTTONDOWN) == |
| 71 static_cast<int>(WebInputEvent::RightButtonDown), | 71 static_cast<int>(WebInputEvent::RightButtonDown), |
| 72 RightButtonMatches); | 72 RightButtonMatches); |
| 73 COMPILE_ASSERT(static_cast<int>(PP_INPUTEVENT_MODIFIER_CAPSLOCKKEY) == | 73 COMPILE_ASSERT(static_cast<int>(PP_INPUTEVENT_MODIFIER_CAPSLOCKKEY) == |
| 74 static_cast<int>(WebInputEvent::CapsLockOn), | 74 static_cast<int>(WebInputEvent::CapsLockOn), |
| 75 CapsLockMatches); | 75 CapsLockMatches); |
| 76 COMPILE_ASSERT(static_cast<int>(PP_INPUTEVENT_MODIFIER_NUMLOCKKEY) == | 76 COMPILE_ASSERT(static_cast<int>(PP_INPUTEVENT_MODIFIER_NUMLOCKKEY) == |
| 77 static_cast<int>(WebInputEvent::NumLockOn), | 77 static_cast<int>(WebInputEvent::NumLockOn), |
| 78 NumLockMatches); | 78 NumLockMatches); |
| 79 COMPILE_ASSERT(static_cast<int>(PP_INPUTEVENT_MODIFIER_ISLEFT) == |
| 80 static_cast<int>(WebInputEvent::IsLeft), |
| 81 LeftMatches); |
| 82 COMPILE_ASSERT(static_cast<int>(PP_INPUTEVENT_MODIFIER_ISRIGHT) == |
| 83 static_cast<int>(WebInputEvent::IsRight), |
| 84 RightMatches); |
| 79 | 85 |
| 80 PP_InputEvent_Type ConvertEventTypes(WebInputEvent::Type wetype) { | 86 PP_InputEvent_Type ConvertEventTypes(WebInputEvent::Type wetype) { |
| 81 switch (wetype) { | 87 switch (wetype) { |
| 82 case WebInputEvent::MouseDown: | 88 case WebInputEvent::MouseDown: |
| 83 return PP_INPUTEVENT_TYPE_MOUSEDOWN; | 89 return PP_INPUTEVENT_TYPE_MOUSEDOWN; |
| 84 case WebInputEvent::MouseUp: | 90 case WebInputEvent::MouseUp: |
| 85 return PP_INPUTEVENT_TYPE_MOUSEUP; | 91 return PP_INPUTEVENT_TYPE_MOUSEUP; |
| 86 case WebInputEvent::MouseMove: | 92 case WebInputEvent::MouseMove: |
| 87 return PP_INPUTEVENT_TYPE_MOUSEMOVE; | 93 return PP_INPUTEVENT_TYPE_MOUSEMOVE; |
| 88 case WebInputEvent::MouseEnter: | 94 case WebInputEvent::MouseEnter: |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 output_pad.buttons_length = webkit_pad.buttonsLength; | 751 output_pad.buttons_length = webkit_pad.buttonsLength; |
| 746 memcpy(output_pad.buttons, | 752 memcpy(output_pad.buttons, |
| 747 webkit_pad.buttons, | 753 webkit_pad.buttons, |
| 748 sizeof(output_pad.buttons)); | 754 sizeof(output_pad.buttons)); |
| 749 } | 755 } |
| 750 } | 756 } |
| 751 } | 757 } |
| 752 | 758 |
| 753 } // namespace ppapi | 759 } // namespace ppapi |
| 754 } // namespace webkit | 760 } // namespace webkit |
| OLD | NEW |