Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1182)

Side by Side Diff: ppapi/proxy/gamepad_resource.h

Issue 10912062: Implement the gamepad API in the IPC proxy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 PPAPI_PROXY_GAMEPAD_RESOURCE_H_ 5 #ifndef PPAPI_PROXY_GAMEPAD_RESOURCE_H_
6 #define PPAPI_PROXY_GAMEPAD_RESOURCE_H_ 6 #define PPAPI_PROXY_GAMEPAD_RESOURCE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/shared_memory.h" 11 #include "base/shared_memory.h"
12 #include "ppapi/c/ppb_gamepad.h"
12 #include "ppapi/proxy/plugin_resource.h" 13 #include "ppapi/proxy/plugin_resource.h"
13 #include "ppapi/proxy/ppapi_proxy_export.h" 14 #include "ppapi/proxy/ppapi_proxy_export.h"
15 #include "ppapi/shared_impl/ppb_gamepad_shared.h"
14 #include "ppapi/thunk/ppb_gamepad_api.h" 16 #include "ppapi/thunk/ppb_gamepad_api.h"
15 17
16 struct PP_GamepadsSampleData; 18 struct PP_GamepadsSampleData;
17 19
18 namespace base { 20 namespace base {
19 class SharedMemory; 21 class SharedMemory;
20 } 22 }
21 23
22 namespace ppapi { 24 namespace ppapi {
23 namespace proxy { 25 namespace proxy {
(...skipping 14 matching lines...) Expand all
38 40
39 private: 41 private:
40 // PluginResource override. 42 // PluginResource override.
41 virtual void OnReplyReceived(const ResourceMessageReplyParams& params, 43 virtual void OnReplyReceived(const ResourceMessageReplyParams& params,
42 const IPC::Message& msg) OVERRIDE; 44 const IPC::Message& msg) OVERRIDE;
43 45
44 void OnPluginMsgSendMemory(const ResourceMessageReplyParams& params, 46 void OnPluginMsgSendMemory(const ResourceMessageReplyParams& params,
45 base::SharedMemoryHandle shared_memory_handle); 47 base::SharedMemoryHandle shared_memory_handle);
46 48
47 scoped_ptr<base::SharedMemory> shared_memory_; 49 scoped_ptr<base::SharedMemory> shared_memory_;
48 void* buffer_; 50 const ContentGamepadHardwareBuffer* buffer_;
51
52 // Last data returned so we can use this in the event of a read failure.
53 PP_GamepadsSampleData last_read_;
49 54
50 DISALLOW_COPY_AND_ASSIGN(GamepadResource); 55 DISALLOW_COPY_AND_ASSIGN(GamepadResource);
51 }; 56 };
52 57
53 } // namespace proxy 58 } // namespace proxy
54 } // namespace ppapi 59 } // namespace ppapi
55 60
56 #endif // PPAPI_PROXY_GAMEPAD_RESOURCE_H_ 61 #endif // PPAPI_PROXY_GAMEPAD_RESOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698