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

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

Issue 11417010: Add support for generating thunk source from IDL. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « ppapi/api/dev/ppb_console_dev.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // From dev/ppb_console_dev.idl modified Mon Nov 19 09:17:58 2012.
6
5 #include "ppapi/c/dev/ppb_console_dev.h" 7 #include "ppapi/c/dev/ppb_console_dev.h"
8 #include "ppapi/c/pp_errors.h"
9 #include "ppapi/shared_impl/tracked_callback.h"
10 #include "ppapi/thunk/enter.h"
11 #include "ppapi/thunk/ppb_console_api.h"
12 #include "ppapi/thunk/ppb_instance_api.h"
13 #include "ppapi/thunk/resource_creation_api.h"
6 #include "ppapi/thunk/thunk.h" 14 #include "ppapi/thunk/thunk.h"
7 #include "ppapi/thunk/enter.h"
8 #include "ppapi/thunk/ppb_instance_api.h"
9 15
10 namespace ppapi { 16 namespace ppapi {
11 namespace thunk { 17 namespace thunk {
12 18
13 namespace { 19 namespace {
14 20
15 void Log(PP_Instance instance, PP_LogLevel_Dev level, struct PP_Var value) { 21 void Log(PP_Instance instance, PP_LogLevel_Dev level, struct PP_Var value) {
16 EnterInstance enter(instance); 22 EnterInstance enter(instance);
17 if (enter.succeeded()) 23 if (enter.succeeded())
18 return enter.functions()->Log(instance, level, value); 24 enter.functions()->Log(instance, level, value);
19 } 25 }
20 26
21 void LogWithSource(PP_Instance instance, 27 void LogWithSource(PP_Instance instance,
22 PP_LogLevel_Dev level, 28 PP_LogLevel_Dev level,
23 PP_Var source, 29 struct PP_Var source,
24 PP_Var value) { 30 struct PP_Var value) {
25 EnterInstance enter(instance); 31 EnterInstance enter(instance);
26 if (enter.succeeded()) 32 if (enter.succeeded())
27 return enter.functions()->LogWithSource(instance, level, source, value); 33 enter.functions()->LogWithSource(instance, level, source, value);
28 } 34 }
29 35
30 const PPB_Console_Dev g_ppb_console_thunk = { 36 const PPB_Console_Dev_0_1 g_ppb_console_dev_thunk_0_1 = {
31 &Log, 37 &Log,
32 &LogWithSource 38 &LogWithSource,
33 }; 39 };
34 40
35 } // namespace 41 } // namespace
36 42
37 const PPB_Console_Dev_0_1* GetPPB_Console_Dev_0_1_Thunk() { 43 const PPB_Console_Dev_0_1* GetPPB_Console_Dev_0_1_Thunk() {
38 return &g_ppb_console_thunk; 44 return &g_ppb_console_dev_thunk_0_1;
39 } 45 }
40 46
41 } // namespace thunk 47 } // namespace thunk
42 } // namespace ppapi 48 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/api/dev/ppb_console_dev.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698