OLD | NEW |
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 // From dev/ppb_console_dev.idl modified Mon Nov 19 09:22:44 2012. | 5 // From dev/ppb_console_dev.idl modified Mon Nov 19 09:22:44 2012. |
6 | 6 |
7 #include "ppapi/c/dev/ppb_console_dev.h" | |
8 #include "ppapi/c/pp_errors.h" | 7 #include "ppapi/c/pp_errors.h" |
| 8 #include "ppapi/c/ppb_console.h" |
9 #include "ppapi/shared_impl/tracked_callback.h" | 9 #include "ppapi/shared_impl/tracked_callback.h" |
10 #include "ppapi/thunk/enter.h" | 10 #include "ppapi/thunk/enter.h" |
11 #include "ppapi/thunk/ppb_instance_api.h" | 11 #include "ppapi/thunk/ppb_instance_api.h" |
12 #include "ppapi/thunk/resource_creation_api.h" | 12 #include "ppapi/thunk/resource_creation_api.h" |
13 #include "ppapi/thunk/thunk.h" | 13 #include "ppapi/thunk/thunk.h" |
14 | 14 |
15 namespace ppapi { | 15 namespace ppapi { |
16 namespace thunk { | 16 namespace thunk { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 void Log(PP_Instance instance, PP_LogLevel_Dev level, struct PP_Var value) { | 20 void Log(PP_Instance instance, PP_LogLevel level, struct PP_Var value) { |
21 EnterInstance enter(instance); | 21 EnterInstance enter(instance); |
22 if (enter.succeeded()) | 22 if (enter.succeeded()) |
23 enter.functions()->Log(instance, level, value); | 23 enter.functions()->Log(instance, level, value); |
24 } | 24 } |
25 | 25 |
26 void LogWithSource(PP_Instance instance, | 26 void LogWithSource(PP_Instance instance, |
27 PP_LogLevel_Dev level, | 27 PP_LogLevel level, |
28 struct PP_Var source, | 28 struct PP_Var source, |
29 struct PP_Var value) { | 29 struct PP_Var value) { |
30 EnterInstance enter(instance); | 30 EnterInstance enter(instance); |
31 if (enter.succeeded()) | 31 if (enter.succeeded()) |
32 enter.functions()->LogWithSource(instance, level, source, value); | 32 enter.functions()->LogWithSource(instance, level, source, value); |
33 } | 33 } |
34 | 34 |
35 const PPB_Console_Dev_0_1 g_ppb_console_dev_thunk_0_1 = { | 35 const PPB_Console_1_0 g_ppb_console_thunk_1_0 = { |
36 &Log, | 36 &Log, |
37 &LogWithSource, | 37 &LogWithSource, |
38 }; | 38 }; |
39 | 39 |
40 } // namespace | 40 } // namespace |
41 | 41 |
42 const PPB_Console_Dev_0_1* GetPPB_Console_Dev_0_1_Thunk() { | 42 const PPB_Console_1_0* GetPPB_Console_1_0_Thunk() { |
43 return &g_ppb_console_dev_thunk_0_1; | 43 return &g_ppb_console_thunk_1_0; |
44 } | 44 } |
45 | 45 |
46 } // namespace thunk | 46 } // namespace thunk |
47 } // namespace ppapi | 47 } // namespace ppapi |
OLD | NEW |