| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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/proxy/ppb_console_proxy.h" | 5 #include "ppapi/proxy/ppb_console_proxy.h" |
| 6 | 6 |
| 7 #include "ppapi/c/dev/ppb_console_dev.h" | 7 #include "ppapi/c/dev/ppb_console_dev.h" |
| 8 #include "ppapi/proxy/plugin_dispatcher.h" | 8 #include "ppapi/proxy/plugin_dispatcher.h" |
| 9 #include "ppapi/proxy/ppapi_messages.h" | 9 #include "ppapi/proxy/ppapi_messages.h" |
| 10 | 10 |
| 11 namespace pp { | 11 namespace ppapi { |
| 12 namespace proxy { | 12 namespace proxy { |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 void Log(PP_Instance instance, PP_LogLevel_Dev level, PP_Var value) { | 16 void Log(PP_Instance instance, PP_LogLevel_Dev level, PP_Var value) { |
| 17 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); | 17 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); |
| 18 if (!dispatcher) | 18 if (!dispatcher) |
| 19 return; | 19 return; |
| 20 dispatcher->Send(new PpapiHostMsg_PPBConsole_Log( | 20 dispatcher->Send(new PpapiHostMsg_PPBConsole_Log( |
| 21 INTERFACE_ID_PPB_CONSOLE, instance, static_cast<int>(level), | 21 INTERFACE_ID_PPB_CONSOLE, instance, static_cast<int>(level), |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 SerializedVarReceiveInput source, | 92 SerializedVarReceiveInput source, |
| 93 SerializedVarReceiveInput value) { | 93 SerializedVarReceiveInput value) { |
| 94 ppb_console_target()->LogWithSource( | 94 ppb_console_target()->LogWithSource( |
| 95 instance, | 95 instance, |
| 96 static_cast<PP_LogLevel_Dev>(log_level), | 96 static_cast<PP_LogLevel_Dev>(log_level), |
| 97 source.Get(dispatcher()), | 97 source.Get(dispatcher()), |
| 98 value.Get(dispatcher())); | 98 value.Get(dispatcher())); |
| 99 } | 99 } |
| 100 | 100 |
| 101 } // namespace proxy | 101 } // namespace proxy |
| 102 } // namespace pp | 102 } // namespace ppapi |
| 103 | 103 |
| OLD | NEW |