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" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 PP_Resource resource); | 44 PP_Resource resource); |
45 | 45 |
46 ~PepperGamepadHost() override; | 46 ~PepperGamepadHost() override; |
47 | 47 |
48 int32_t OnResourceMessageReceived( | 48 int32_t OnResourceMessageReceived( |
49 const IPC::Message& msg, | 49 const IPC::Message& msg, |
50 ppapi::host::HostMessageContext* context) override; | 50 ppapi::host::HostMessageContext* context) override; |
51 | 51 |
52 // GamepadConsumer implementation. | 52 // GamepadConsumer implementation. |
53 void OnGamepadConnected(unsigned index, | 53 void OnGamepadConnected(unsigned index, |
54 const blink::WebGamepad& gamepad) override {} | 54 const device::Gamepad& gamepad) override {} |
55 void OnGamepadDisconnected(unsigned index, | 55 void OnGamepadDisconnected(unsigned index, |
56 const blink::WebGamepad& gamepad) override {} | 56 const device::Gamepad& gamepad) override {} |
57 | 57 |
58 private: | 58 private: |
59 int32_t OnRequestMemory(ppapi::host::HostMessageContext* context); | 59 int32_t OnRequestMemory(ppapi::host::HostMessageContext* context); |
60 | 60 |
61 void GotUserGesture(const ppapi::host::ReplyMessageContext& in_context); | 61 void GotUserGesture(const ppapi::host::ReplyMessageContext& in_context); |
62 | 62 |
63 BrowserPpapiHost* browser_ppapi_host_; | 63 BrowserPpapiHost* browser_ppapi_host_; |
64 | 64 |
65 device::GamepadService* gamepad_service_; | 65 device::GamepadService* gamepad_service_; |
66 | 66 |
67 bool is_started_; | 67 bool is_started_; |
68 | 68 |
69 base::WeakPtrFactory<PepperGamepadHost> weak_factory_; | 69 base::WeakPtrFactory<PepperGamepadHost> weak_factory_; |
70 | 70 |
71 DISALLOW_COPY_AND_ASSIGN(PepperGamepadHost); | 71 DISALLOW_COPY_AND_ASSIGN(PepperGamepadHost); |
72 }; | 72 }; |
73 | 73 |
74 } // namespace content | 74 } // namespace content |
75 | 75 |
76 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_GAMEPAD_HOST_H_ | 76 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_GAMEPAD_HOST_H_ |
OLD | NEW |