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

Side by Side Diff: ppapi/thunk/ppb_cursor_control_thunk.cc

Issue 238923007: PPAPI: Format ppapi/thunk using clang-format. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use Popen instead, force carriage returns in thunks Created 6 years, 8 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ppapi/c/dev/ppb_cursor_control_dev.h" 5 #include "ppapi/c/dev/ppb_cursor_control_dev.h"
6 #include "ppapi/thunk/thunk.h" 6 #include "ppapi/thunk/thunk.h"
7 #include "ppapi/thunk/enter.h" 7 #include "ppapi/thunk/enter.h"
8 #include "ppapi/thunk/ppb_instance_api.h" 8 #include "ppapi/thunk/ppb_instance_api.h"
9 9
10 // This interface is only for temporary backwards compat and currently just 10 // This interface is only for temporary backwards compat and currently just
11 // forwards to the stable interfaces that implement these features. 11 // forwards to the stable interfaces that implement these features.
12 12
13 namespace ppapi { 13 namespace ppapi {
14 namespace thunk { 14 namespace thunk {
15 15
16 namespace { 16 namespace {
17 17
18 PP_Bool SetCursor(PP_Instance instance, 18 PP_Bool SetCursor(PP_Instance instance,
19 PP_CursorType_Dev type, 19 PP_CursorType_Dev type,
20 PP_Resource custom_image, 20 PP_Resource custom_image,
21 const PP_Point* hot_spot) { 21 const PP_Point* hot_spot) {
22 EnterInstance enter(instance); 22 EnterInstance enter(instance);
23 if (enter.failed()) 23 if (enter.failed())
24 return PP_FALSE; 24 return PP_FALSE;
25 return enter.functions()->SetCursor(instance, 25 return enter.functions()->SetCursor(
26 static_cast<PP_MouseCursor_Type>(type), custom_image, hot_spot); 26 instance, static_cast<PP_MouseCursor_Type>(type), custom_image, hot_spot);
27 } 27 }
28 28
29 PP_Bool LockCursor(PP_Instance instance) { 29 PP_Bool LockCursor(PP_Instance instance) { return PP_FALSE; }
30 return PP_FALSE;
31 }
32 30
33 PP_Bool UnlockCursor(PP_Instance instance) { 31 PP_Bool UnlockCursor(PP_Instance instance) { return PP_FALSE; }
34 return PP_FALSE;
35 }
36 32
37 PP_Bool HasCursorLock(PP_Instance instance) { 33 PP_Bool HasCursorLock(PP_Instance instance) { return PP_FALSE; }
38 return PP_FALSE;
39 }
40 34
41 PP_Bool CanLockCursor(PP_Instance instance) { 35 PP_Bool CanLockCursor(PP_Instance instance) { return PP_FALSE; }
42 return PP_FALSE;
43 }
44 36
45 const PPB_CursorControl_Dev g_ppb_cursor_control_thunk = { 37 const PPB_CursorControl_Dev g_ppb_cursor_control_thunk = {
46 &SetCursor, 38 &SetCursor, &LockCursor, &UnlockCursor, &HasCursorLock, &CanLockCursor};
47 &LockCursor,
48 &UnlockCursor,
49 &HasCursorLock,
50 &CanLockCursor
51 };
52 39
53 } // namespace 40 } // namespace
54 41
55 const PPB_CursorControl_Dev_0_4* GetPPB_CursorControl_Dev_0_4_Thunk() { 42 const PPB_CursorControl_Dev_0_4* GetPPB_CursorControl_Dev_0_4_Thunk() {
56 return &g_ppb_cursor_control_thunk; 43 return &g_ppb_cursor_control_thunk;
57 } 44 }
58 45
59 } // namespace thunk 46 } // namespace thunk
60 } // namespace ppapi 47 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698