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

Unified Diff: ppapi/thunk/ppb_gamepad_thunk.cc

Issue 13142007: IDL: Autogenerate thunk for PPB_Gamepad. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« ppapi/generators/idl_thunk.py ('K') | « ppapi/generators/idl_thunk.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/ppb_gamepad_thunk.cc
diff --git a/ppapi/thunk/ppb_gamepad_thunk.cc b/ppapi/thunk/ppb_gamepad_thunk.cc
index 34386c6e503d9451f2a728d6c28a441026d340c9..252e38e4b33ffbd0960340363e89a8dfe512c917 100644
--- a/ppapi/thunk/ppb_gamepad_thunk.cc
+++ b/ppapi/thunk/ppb_gamepad_thunk.cc
@@ -2,38 +2,41 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// From ppb_gamepad.idl modified Thu Mar 28 15:36:32 2013.
+
#include <string.h>
+#include "ppapi/c/pp_errors.h"
#include "ppapi/c/ppb_gamepad.h"
-#include "ppapi/thunk/thunk.h"
+#include "ppapi/shared_impl/tracked_callback.h"
#include "ppapi/thunk/enter.h"
#include "ppapi/thunk/ppb_gamepad_api.h"
#include "ppapi/thunk/ppb_instance_api.h"
#include "ppapi/thunk/resource_creation_api.h"
+#include "ppapi/thunk/thunk.h"
namespace ppapi {
namespace thunk {
namespace {
-void SampleGamepads(PP_Instance instance, PP_GamepadsSampleData* data) {
+void Sample(PP_Instance instance, struct PP_GamepadsSampleData* data) {
EnterInstanceAPI<PPB_Gamepad_API> enter(instance);
if (enter.succeeded()) {
enter.functions()->Sample(instance, data);
return;
}
- // Failure, zero out.
- memset(data, 0, sizeof(PP_GamepadsSampleData));
+ memset(data, 0, sizeof(struct PP_GamepadsSampleData));
}
-const PPB_Gamepad g_ppb_gamepad_thunk = {
- &SampleGamepads,
+const PPB_Gamepad_1_0 g_ppb_gamepad_thunk_1_0 = {
+ &Sample
};
} // namespace
-const PPB_Gamepad* GetPPB_Gamepad_1_0_Thunk() {
- return &g_ppb_gamepad_thunk;
+const PPB_Gamepad_1_0* GetPPB_Gamepad_1_0_Thunk() {
+ return &g_ppb_gamepad_thunk_1_0;
}
} // namespace thunk
« ppapi/generators/idl_thunk.py ('K') | « ppapi/generators/idl_thunk.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698