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

Side by Side Diff: ppapi/proxy/host_dispatcher.cc

Issue 11416214: PPAPI: Move PPB_Console out of dev. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 8 years 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/ppapi_sources.gypi ('k') | ppapi/proxy/interface_list.cc » ('j') | 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 #include "ppapi/proxy/host_dispatcher.h" 5 #include "ppapi/proxy/host_dispatcher.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "ppapi/c/private/ppb_proxy_private.h" 9 #include "ppapi/c/private/ppb_proxy_private.h"
10 #include "ppapi/c/ppb_var.h" 10 #include "ppapi/c/ppb_var.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 240
241 void HostDispatcher::OnInvalidMessageReceived() { 241 void HostDispatcher::OnInvalidMessageReceived() {
242 // TODO(brettw) bug 95345 kill the plugin when an invalid message is 242 // TODO(brettw) bug 95345 kill the plugin when an invalid message is
243 // received. 243 // received.
244 } 244 }
245 245
246 void HostDispatcher::OnHostMsgLogWithSource(PP_Instance instance, 246 void HostDispatcher::OnHostMsgLogWithSource(PP_Instance instance,
247 int int_log_level, 247 int int_log_level,
248 const std::string& source, 248 const std::string& source,
249 const std::string& value) { 249 const std::string& value) {
250 PP_LogLevel_Dev level = static_cast<PP_LogLevel_Dev>(int_log_level); 250 PP_LogLevel level = static_cast<PP_LogLevel>(int_log_level);
251 if (instance) { 251 if (instance) {
252 PpapiGlobals::Get()->LogWithSource(instance, level, source, value); 252 PpapiGlobals::Get()->LogWithSource(instance, level, source, value);
253 } else { 253 } else {
254 PpapiGlobals::Get()->BroadcastLogWithSource(pp_module_, level, 254 PpapiGlobals::Get()->BroadcastLogWithSource(pp_module_, level,
255 source, value); 255 source, value);
256 } 256 }
257 } 257 }
258 258
259 // ScopedModuleReference ------------------------------------------------------- 259 // ScopedModuleReference -------------------------------------------------------
260 260
261 ScopedModuleReference::ScopedModuleReference(Dispatcher* dispatcher) 261 ScopedModuleReference::ScopedModuleReference(Dispatcher* dispatcher)
262 : dispatcher_(NULL) { 262 : dispatcher_(NULL) {
263 if (!dispatcher->IsPlugin()) { 263 if (!dispatcher->IsPlugin()) {
264 dispatcher_ = static_cast<HostDispatcher*>(dispatcher); 264 dispatcher_ = static_cast<HostDispatcher*>(dispatcher);
265 dispatcher_->ppb_proxy()->AddRefModule(dispatcher_->pp_module()); 265 dispatcher_->ppb_proxy()->AddRefModule(dispatcher_->pp_module());
266 } 266 }
267 } 267 }
268 268
269 ScopedModuleReference::~ScopedModuleReference() { 269 ScopedModuleReference::~ScopedModuleReference() {
270 if (dispatcher_) 270 if (dispatcher_)
271 dispatcher_->ppb_proxy()->ReleaseModule(dispatcher_->pp_module()); 271 dispatcher_->ppb_proxy()->ReleaseModule(dispatcher_->pp_module());
272 } 272 }
273 273
274 } // namespace proxy 274 } // namespace proxy
275 } // namespace ppapi 275 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/ppapi_sources.gypi ('k') | ppapi/proxy/interface_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698