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 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_GAMEPAD_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_GAMEPAD_HOST_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_GAMEPAD_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_GAMEPAD_HOST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "content/browser/gamepad/gamepad_consumer.h" | |
14 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 14 #include "device/gamepad/gamepad_consumer.h" |
15 #include "ppapi/host/resource_host.h" | 15 #include "ppapi/host/resource_host.h" |
16 | 16 |
17 namespace ppapi { | 17 namespace ppapi { |
18 namespace host { | 18 namespace host { |
19 struct ReplyMessageContext; | 19 struct ReplyMessageContext; |
20 } | 20 } |
21 } | 21 } |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 | 24 |
25 class BrowserPpapiHost; | 25 class BrowserPpapiHost; |
26 class GamepadService; | 26 class GamepadService; |
27 | 27 |
28 class CONTENT_EXPORT PepperGamepadHost : | 28 class CONTENT_EXPORT PepperGamepadHost : |
29 public ppapi::host::ResourceHost, | 29 public ppapi::host::ResourceHost, |
30 public GamepadConsumer { | 30 public device::GamepadConsumer { |
31 public: | 31 public: |
32 PepperGamepadHost(BrowserPpapiHost* host, | 32 PepperGamepadHost(BrowserPpapiHost* host, |
33 PP_Instance instance, | 33 PP_Instance instance, |
34 PP_Resource resource); | 34 PP_Resource resource); |
35 | 35 |
36 // Allows tests to specify a gamepad service to use rather than the global | 36 // Allows tests to specify a gamepad service to use rather than the global |
37 // singleton. The caller owns the gamepad_service pointer. | 37 // singleton. The caller owns the gamepad_service pointer. |
38 PepperGamepadHost(GamepadService* gamepad_service, | 38 PepperGamepadHost(GamepadService* gamepad_service, |
39 BrowserPpapiHost* host, | 39 BrowserPpapiHost* host, |
40 PP_Instance instance, | 40 PP_Instance instance, |
(...skipping 23 matching lines...) Expand all Loading... |
64 bool is_started_; | 64 bool is_started_; |
65 | 65 |
66 base::WeakPtrFactory<PepperGamepadHost> weak_factory_; | 66 base::WeakPtrFactory<PepperGamepadHost> weak_factory_; |
67 | 67 |
68 DISALLOW_COPY_AND_ASSIGN(PepperGamepadHost); | 68 DISALLOW_COPY_AND_ASSIGN(PepperGamepadHost); |
69 }; | 69 }; |
70 | 70 |
71 } // namespace content | 71 } // namespace content |
72 | 72 |
73 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_GAMEPAD_HOST_H_ | 73 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_GAMEPAD_HOST_H_ |
OLD | NEW |