summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-01 17:17:55 +0000
committerteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-01 17:17:55 +0000
commit9254f60db6f9233782805c37daa762ea50c27058 (patch)
treed1305c4cbc5f167f647cf2db2caa3e845c205f67
parent3cd9f524ba9ca2801f3967698ec65d918345c598 (diff)
downloadchromium_src-9254f60db6f9233782805c37daa762ea50c27058.zip
chromium_src-9254f60db6f9233782805c37daa762ea50c27058.tar.gz
chromium_src-9254f60db6f9233782805c37daa762ea50c27058.tar.bz2
Ppapi: Autogenerate thunk for PPB_MouseLock
BUG= Review URL: https://chromiumcodereview.appspot.com/14714002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197650 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ppapi/api/ppb_mouse_lock.idl2
-rw-r--r--ppapi/thunk/ppb_mouse_lock_thunk.cc17
2 files changed, 13 insertions, 6 deletions
diff --git a/ppapi/api/ppb_mouse_lock.idl b/ppapi/api/ppb_mouse_lock.idl
index ca4605a..b0e9488 100644
--- a/ppapi/api/ppb_mouse_lock.idl
+++ b/ppapi/api/ppb_mouse_lock.idl
@@ -8,6 +8,8 @@
* locking the target of mouse events to a specific module instance.
*/
+[generate_thunk]
+
label Chrome {
M16 = 1.0
};
diff --git a/ppapi/thunk/ppb_mouse_lock_thunk.cc b/ppapi/thunk/ppb_mouse_lock_thunk.cc
index cf2530f..bd1a193 100644
--- a/ppapi/thunk/ppb_mouse_lock_thunk.cc
+++ b/ppapi/thunk/ppb_mouse_lock_thunk.cc
@@ -2,11 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// From ppb_mouse_lock.idl modified Thu Apr 18 10:43:11 2013.
+
+#include "ppapi/c/pp_completion_callback.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/ppb_mouse_lock.h"
#include "ppapi/shared_impl/tracked_callback.h"
#include "ppapi/thunk/enter.h"
#include "ppapi/thunk/ppb_instance_api.h"
+#include "ppapi/thunk/resource_creation_api.h"
#include "ppapi/thunk/thunk.h"
namespace ppapi {
@@ -14,7 +18,8 @@ namespace thunk {
namespace {
-int32_t LockMouse(PP_Instance instance, PP_CompletionCallback callback) {
+int32_t LockMouse(PP_Instance instance, struct PP_CompletionCallback callback) {
+ VLOG(4) << "PPB_MouseLock::LockMouse()";
EnterInstance enter(instance, callback);
if (enter.failed())
return enter.retval();
@@ -23,13 +28,13 @@ int32_t LockMouse(PP_Instance instance, PP_CompletionCallback callback) {
}
void UnlockMouse(PP_Instance instance) {
+ VLOG(4) << "PPB_MouseLock::UnlockMouse()";
EnterInstance enter(instance);
- if (enter.failed())
- return;
- enter.functions()->UnlockMouse(instance);
+ if (enter.succeeded())
+ enter.functions()->UnlockMouse(instance);
}
-const PPB_MouseLock g_ppb_mouse_lock_thunk = {
+const PPB_MouseLock_1_0 g_ppb_mouselock_thunk_1_0 = {
&LockMouse,
&UnlockMouse
};
@@ -37,7 +42,7 @@ const PPB_MouseLock g_ppb_mouse_lock_thunk = {
} // namespace
const PPB_MouseLock_1_0* GetPPB_MouseLock_1_0_Thunk() {
- return &g_ppb_mouse_lock_thunk;
+ return &g_ppb_mouselock_thunk_1_0;
}
} // namespace thunk