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

Side by Side Diff: content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc

Issue 11411118: Add tracing support to NaCl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unify ppapi_trace_message_filter and child_trace_message_filter 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
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 "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h" 5 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
6 6
7 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" 7 #include "content/browser/renderer_host/pepper/pepper_message_filter.h"
8 #include "content/browser/trace_message_filter.h"
8 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
9 #include "content/public/browser/render_view_host.h" 10 #include "content/public/browser/render_view_host.h"
10 #include "ipc/ipc_message_macros.h" 11 #include "ipc/ipc_message_macros.h"
11 12
12 namespace content { 13 namespace content {
13 14
14 // static 15 // static
15 BrowserPpapiHost* BrowserPpapiHost::CreateExternalPluginProcess( 16 BrowserPpapiHost* BrowserPpapiHost::CreateExternalPluginProcess(
16 IPC::Sender* sender, 17 IPC::Sender* sender,
17 ppapi::PpapiPermissions permissions, 18 ppapi::PpapiPermissions permissions,
(...skipping 12 matching lines...) Expand all
30 new BrowserPpapiHostImpl(sender, permissions, plugin_name, 31 new BrowserPpapiHostImpl(sender, permissions, plugin_name,
31 profile_data_directory, plugin_child_process_id); 32 profile_data_directory, plugin_child_process_id);
32 browser_ppapi_host->set_plugin_process_handle(plugin_child_process); 33 browser_ppapi_host->set_plugin_process_handle(plugin_child_process);
33 34
34 channel->AddFilter( 35 channel->AddFilter(
35 new PepperMessageFilter(PepperMessageFilter::NACL, 36 new PepperMessageFilter(PepperMessageFilter::NACL,
36 permissions, 37 permissions,
37 host_resolver, 38 host_resolver,
38 render_process_id, 39 render_process_id,
39 render_view_id)); 40 render_view_id));
41 channel->AddFilter(new TraceMessageFilter());
40 channel->AddFilter(browser_ppapi_host->message_filter()); 42 channel->AddFilter(browser_ppapi_host->message_filter());
41 43
42 return browser_ppapi_host; 44 return browser_ppapi_host;
43 } 45 }
44 46
45 BrowserPpapiHostImpl::BrowserPpapiHostImpl( 47 BrowserPpapiHostImpl::BrowserPpapiHostImpl(
46 IPC::Sender* sender, 48 IPC::Sender* sender,
47 const ppapi::PpapiPermissions& permissions, 49 const ppapi::PpapiPermissions& permissions,
48 const std::string& plugin_name, 50 const std::string& plugin_name,
49 const FilePath& profile_data_directory, 51 const FilePath& profile_data_directory,
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 */ 143 */
142 return ppapi_host_->OnMessageReceived(msg); 144 return ppapi_host_->OnMessageReceived(msg);
143 } 145 }
144 146
145 void BrowserPpapiHostImpl::HostMessageFilter::OnHostDestroyed() { 147 void BrowserPpapiHostImpl::HostMessageFilter::OnHostDestroyed() {
146 DCHECK(ppapi_host_); 148 DCHECK(ppapi_host_);
147 ppapi_host_ = NULL; 149 ppapi_host_ = NULL;
148 } 150 }
149 151
150 } // namespace content 152 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698