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

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

Issue 7740038: Use macros to define pepper interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: New patch Created 9 years, 3 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
« no previous file with comments | « ppapi/thunk/ppb_char_set_thunk.cc ('k') | ppapi/thunk/ppb_context_3d_thunk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 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/dev/ppb_console_dev.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 void Log(PP_Instance instance, PP_LogLevel_Dev level, struct PP_Var value) {
16 EnterInstance enter(instance);
17 if (enter.succeeded())
18 return enter.functions()->Log(instance, level, value);
19 }
20
21 void LogWithSource(PP_Instance instance,
22 PP_LogLevel_Dev level,
23 PP_Var source,
24 PP_Var value) {
25 EnterInstance enter(instance);
26 if (enter.succeeded())
27 return enter.functions()->LogWithSource(instance, level, source, value);
28 }
29
30 const PPB_Console_Dev g_ppb_console_thunk = {
31 &Log,
32 &LogWithSource
33 };
34
35 } // namespace
36
37 const PPB_Console_Dev* GetPPB_Console_Dev_Thunk() {
38 return &g_ppb_console_thunk;
39 }
40
41 } // namespace thunk
42 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_char_set_thunk.cc ('k') | ppapi/thunk/ppb_context_3d_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698