| 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 "content/renderer/gamepad_shared_memory_reader.h" | 5 #include "content/renderer/gamepad_shared_memory_reader.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
| 8 #include "base/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
| 9 #include "content/common/gamepad_hardware_buffer.h" | 9 #include "content/common/gamepad_hardware_buffer.h" |
| 10 #include "content/common/gamepad_user_gesture.h" | |
| 11 #include "content/public/renderer/render_thread.h" | 10 #include "content/public/renderer/render_thread.h" |
| 12 #include "content/renderer/renderer_blink_platform_impl.h" | 11 #include "content/renderer/renderer_blink_platform_impl.h" |
| 13 #include "ipc/ipc_sync_message_filter.h" | 12 #include "ipc/ipc_sync_message_filter.h" |
| 14 #include "third_party/WebKit/public/platform/WebGamepadListener.h" | 13 #include "third_party/WebKit/public/platform/WebGamepadListener.h" |
| 15 #include "third_party/WebKit/public/platform/WebPlatformEventListener.h" | 14 #include "third_party/WebKit/public/platform/WebPlatformEventListener.h" |
| 16 | 15 |
| 17 namespace content { | 16 namespace content { |
| 18 | 17 |
| 19 GamepadSharedMemoryReader::GamepadSharedMemoryReader(RenderThread* thread) | 18 GamepadSharedMemoryReader::GamepadSharedMemoryReader(RenderThread* thread) |
| 20 : RendererGamepadProvider(thread), | 19 : RendererGamepadProvider(thread), |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 } | 129 } |
| 131 | 130 |
| 132 void GamepadSharedMemoryReader::OnGamepadDisconnected( | 131 void GamepadSharedMemoryReader::OnGamepadDisconnected( |
| 133 int index, | 132 int index, |
| 134 const blink::WebGamepad& gamepad) { | 133 const blink::WebGamepad& gamepad) { |
| 135 if (listener()) | 134 if (listener()) |
| 136 listener()->didDisconnectGamepad(index, gamepad); | 135 listener()->didDisconnectGamepad(index, gamepad); |
| 137 } | 136 } |
| 138 | 137 |
| 139 } // namespace content | 138 } // namespace content |
| OLD | NEW |