| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "device_orientation_event_pump.h" | 5 #include "device_orientation_event_pump.h" |
| 6 | 6 |
| 7 #include <string.h> |
| 8 |
| 7 #include <cmath> | 9 #include <cmath> |
| 8 | 10 |
| 9 #include "content/common/device_sensors/device_orientation_messages.h" | 11 #include "content/common/device_sensors/device_orientation_messages.h" |
| 10 #include "content/public/renderer/render_thread.h" | 12 #include "content/public/renderer/render_thread.h" |
| 11 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic
eOrientationListener.h" | 13 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic
eOrientationListener.h" |
| 12 | 14 |
| 13 namespace content { | 15 namespace content { |
| 14 | 16 |
| 15 const double DeviceOrientationEventPump::kOrientationThreshold = 0.1; | 17 const double DeviceOrientationEventPump::kOrientationThreshold = 0.1; |
| 16 | 18 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 } | 85 } |
| 84 | 86 |
| 85 void DeviceOrientationEventPump::SendFakeDataForTesting(void* fake_data) { | 87 void DeviceOrientationEventPump::SendFakeDataForTesting(void* fake_data) { |
| 86 blink::WebDeviceOrientationData data = | 88 blink::WebDeviceOrientationData data = |
| 87 *static_cast<blink::WebDeviceOrientationData*>(fake_data); | 89 *static_cast<blink::WebDeviceOrientationData*>(fake_data); |
| 88 | 90 |
| 89 listener()->didChangeDeviceOrientation(data); | 91 listener()->didChangeDeviceOrientation(data); |
| 90 } | 92 } |
| 91 | 93 |
| 92 } // namespace content | 94 } // namespace content |
| OLD | NEW |