Update V8 to version 4.7.57.
[chromium-blink-merge.git] / ppapi / thunk / ppb_cursor_control_thunk.cc
blob743b3e52aad932169f9b8f5c2d513bc078925ebe
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
3 // found in the LICENSE file.
5 #include "ppapi/c/dev/ppb_cursor_control_dev.h"
6 #include "ppapi/thunk/thunk.h"
7 #include "ppapi/thunk/enter.h"
8 #include "ppapi/thunk/ppb_instance_api.h"
10 // This interface is only for temporary backwards compat and currently just
11 // forwards to the stable interfaces that implement these features.
13 namespace ppapi {
14 namespace thunk {
16 namespace {
18 PP_Bool SetCursor(PP_Instance instance,
19 PP_CursorType_Dev type,
20 PP_Resource custom_image,
21 const PP_Point* hot_spot) {
22 EnterInstance enter(instance);
23 if (enter.failed())
24 return PP_FALSE;
25 return enter.functions()->SetCursor(instance,
26 static_cast<PP_MouseCursor_Type>(type), custom_image, hot_spot);
29 PP_Bool LockCursor(PP_Instance instance) {
30 return PP_FALSE;
33 PP_Bool UnlockCursor(PP_Instance instance) {
34 return PP_FALSE;
37 PP_Bool HasCursorLock(PP_Instance instance) {
38 return PP_FALSE;
41 PP_Bool CanLockCursor(PP_Instance instance) {
42 return PP_FALSE;
45 const PPB_CursorControl_Dev g_ppb_cursor_control_thunk = {
46 &SetCursor,
47 &LockCursor,
48 &UnlockCursor,
49 &HasCursorLock,
50 &CanLockCursor
53 } // namespace
55 const PPB_CursorControl_Dev_0_4* GetPPB_CursorControl_Dev_0_4_Thunk() {
56 return &g_ppb_cursor_control_thunk;
59 } // namespace thunk
60 } // namespace ppapi