OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #include "ppapi/c/ppb_mouse_cursor.h" |
| 6 #include "ppapi/thunk/thunk.h" |
| 7 #include "ppapi/thunk/enter.h" |
| 8 #include "ppapi/thunk/ppb_instance_api.h" |
| 9 |
| 10 namespace ppapi { |
| 11 namespace thunk { |
| 12 |
| 13 namespace { |
| 14 |
| 15 PP_Bool SetCursor(PP_Instance instance, |
| 16 PP_MouseCursor_Type type, |
| 17 PP_Resource image, |
| 18 const PP_Point* hot_spot) { |
| 19 EnterInstance enter(instance); |
| 20 if (enter.failed()) |
| 21 return PP_FALSE; |
| 22 return enter.functions()->SetCursor(instance, type, image, hot_spot); |
| 23 } |
| 24 |
| 25 const PPB_MouseCursor_1_0 g_ppb_mouse_cursor_thunk = { |
| 26 &SetCursor |
| 27 }; |
| 28 |
| 29 } // namespace |
| 30 |
| 31 const PPB_MouseCursor_1_0* GetPPB_MouseCursor_1_0_Thunk() { |
| 32 return &g_ppb_mouse_cursor_thunk; |
| 33 } |
| 34 |
| 35 } // namespace thunk |
| 36 } // namespace ppapi |
OLD | NEW |