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

Unified Diff: ppapi/thunk/ppb_cursor_control_thunk.cc

Issue 9814015: Add new MouseCursor interface for setting the mouse cursor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
Index: ppapi/thunk/ppb_cursor_control_thunk.cc
diff --git a/ppapi/thunk/ppb_cursor_control_thunk.cc b/ppapi/thunk/ppb_cursor_control_thunk.cc
index b1b20772cc6bcd7bd423cdb5cfdcc8186fa94537..fe2238269fa8f402b95af6ea4ffebac66e7c4856 100644
--- a/ppapi/thunk/ppb_cursor_control_thunk.cc
+++ b/ppapi/thunk/ppb_cursor_control_thunk.cc
@@ -2,9 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "ppapi/c/dev/ppb_cursor_control_dev.h"
#include "ppapi/thunk/thunk.h"
#include "ppapi/thunk/enter.h"
-#include "ppapi/thunk/ppb_cursor_control_api.h"
+#include "ppapi/thunk/ppb_instance_api.h"
+
+// This interface is only for temporary backswards compat and currently just
dmichael (off chromium) 2012/03/27 15:48:44 backswards->backwards
+// forwards to the stable interfaces that implement these features.
namespace ppapi {
namespace thunk {
@@ -15,38 +19,27 @@ PP_Bool SetCursor(PP_Instance instance,
PP_CursorType_Dev type,
PP_Resource custom_image,
const PP_Point* hot_spot) {
- EnterFunction<PPB_CursorControl_FunctionAPI> enter(instance, true);
+ EnterInstance enter(instance);
if (enter.failed())
return PP_FALSE;
- return enter.functions()->SetCursor(instance, type, custom_image, hot_spot);
+ return enter.functions()->SetCursor(instance,
+ static_cast<PP_MouseCursor_Type>(type), custom_image, hot_spot);
}
PP_Bool LockCursor(PP_Instance instance) {
- EnterFunction<PPB_CursorControl_FunctionAPI> enter(instance, true);
- if (enter.failed())
- return PP_FALSE;
- return enter.functions()->LockCursor(instance);
+ return PP_FALSE;
}
PP_Bool UnlockCursor(PP_Instance instance) {
- EnterFunction<PPB_CursorControl_FunctionAPI> enter(instance, true);
- if (enter.failed())
- return PP_FALSE;
- return enter.functions()->UnlockCursor(instance);
+ return PP_FALSE;
}
PP_Bool HasCursorLock(PP_Instance instance) {
- EnterFunction<PPB_CursorControl_FunctionAPI> enter(instance, true);
- if (enter.failed())
- return PP_FALSE;
- return enter.functions()->HasCursorLock(instance);
+ return PP_FALSE;
}
PP_Bool CanLockCursor(PP_Instance instance) {
- EnterFunction<PPB_CursorControl_FunctionAPI> enter(instance, true);
- if (enter.failed())
- return PP_FALSE;
- return enter.functions()->CanLockCursor(instance);
+ return PP_FALSE;
}
const PPB_CursorControl_Dev g_ppb_cursor_control_thunk = {

Powered by Google App Engine
This is Rietveld 408576698