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

Side by Side Diff: ppapi/thunk/ppb_mouse_cursor_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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698