| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 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 met: | 5 * modification, are permitted provided that the following conditions are met: |
| 6 * | 6 * |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 bool connected() const { return m_connected; } | 47 bool connected() const { return m_connected; } |
| 48 void setConnected(bool val) { m_connected = val; } | 48 void setConnected(bool val) { m_connected = val; } |
| 49 | 49 |
| 50 unsigned long long timestamp() const { return m_timestamp; } | 50 unsigned long long timestamp() const { return m_timestamp; } |
| 51 void setTimestamp(unsigned long long val) { m_timestamp = val; } | 51 void setTimestamp(unsigned long long val) { m_timestamp = val; } |
| 52 | 52 |
| 53 const String& mapping() const { return m_mapping; } | 53 const String& mapping() const { return m_mapping; } |
| 54 void setMapping(const String& val) { m_mapping = val; } | 54 void setMapping(const String& val) { m_mapping = val; } |
| 55 | 55 |
| 56 const DoubleVector& axes() const { return m_axes; } | 56 const DoubleVector& axes() const { return m_axes; } |
| 57 #if defined(ENABLE_NEW_GAMEPAD_API) | |
| 58 void setAxes(unsigned count, const double* data); | 57 void setAxes(unsigned count, const double* data); |
| 59 #else | |
| 60 void setAxes(unsigned count, const float* data); | |
| 61 #endif | |
| 62 | 58 |
| 63 protected: | 59 protected: |
| 64 String m_id; | 60 String m_id; |
| 65 unsigned m_index; | 61 unsigned m_index; |
| 66 bool m_connected; | 62 bool m_connected; |
| 67 unsigned long long m_timestamp; | 63 unsigned long long m_timestamp; |
| 68 String m_mapping; | 64 String m_mapping; |
| 69 DoubleVector m_axes; | 65 DoubleVector m_axes; |
| 70 }; | 66 }; |
| 71 | 67 |
| 72 } // namespace WebCore | 68 } // namespace WebCore |
| 73 | 69 |
| 74 #endif // GamepadCommon_h | 70 #endif // GamepadCommon_h |
| OLD | NEW |