OLD | NEW |
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/tracing/trace_message_filter.h" | 8 #include "content/browser/tracing/trace_message_filter.h" |
9 #include "content/common/pepper_renderer_instance_data.h" | 9 #include "content/common/pepper_renderer_instance_data.h" |
10 #include "content/public/browser/render_view_host.h" | 10 #include "content/public/browser/render_view_host.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 int render_view_id, | 23 int render_view_id, |
24 const base::FilePath& profile_directory) { | 24 const base::FilePath& profile_directory) { |
25 // The plugin name and path shouldn't be needed for external plugins. | 25 // The plugin name and path shouldn't be needed for external plugins. |
26 BrowserPpapiHostImpl* browser_ppapi_host = | 26 BrowserPpapiHostImpl* browser_ppapi_host = |
27 new BrowserPpapiHostImpl(sender, permissions, std::string(), | 27 new BrowserPpapiHostImpl(sender, permissions, std::string(), |
28 base::FilePath(), profile_directory, true); | 28 base::FilePath(), profile_directory, true); |
29 browser_ppapi_host->set_plugin_process_handle(plugin_child_process); | 29 browser_ppapi_host->set_plugin_process_handle(plugin_child_process); |
30 | 30 |
31 scoped_refptr<PepperMessageFilter> pepper_message_filter( | 31 scoped_refptr<PepperMessageFilter> pepper_message_filter( |
32 new PepperMessageFilter()); | 32 new PepperMessageFilter()); |
33 channel->AddFilter(pepper_message_filter); | 33 channel->AddFilter(pepper_message_filter->GetFilter()); |
34 channel->AddFilter(browser_ppapi_host->message_filter().get()); | 34 channel->AddFilter(browser_ppapi_host->message_filter()); |
35 channel->AddFilter(new TraceMessageFilter()); | 35 channel->AddFilter((new TraceMessageFilter())->GetFilter()); |
36 | 36 |
37 return browser_ppapi_host; | 37 return browser_ppapi_host; |
38 } | 38 } |
39 | 39 |
40 BrowserPpapiHostImpl::BrowserPpapiHostImpl( | 40 BrowserPpapiHostImpl::BrowserPpapiHostImpl( |
41 IPC::Sender* sender, | 41 IPC::Sender* sender, |
42 const ppapi::PpapiPermissions& permissions, | 42 const ppapi::PpapiPermissions& permissions, |
43 const std::string& plugin_name, | 43 const std::string& plugin_name, |
44 const base::FilePath& plugin_path, | 44 const base::FilePath& plugin_path, |
45 const base::FilePath& profile_data_directory, | 45 const base::FilePath& profile_data_directory, |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 */ | 154 */ |
155 return ppapi_host_->OnMessageReceived(msg); | 155 return ppapi_host_->OnMessageReceived(msg); |
156 } | 156 } |
157 | 157 |
158 void BrowserPpapiHostImpl::HostMessageFilter::OnHostDestroyed() { | 158 void BrowserPpapiHostImpl::HostMessageFilter::OnHostDestroyed() { |
159 DCHECK(ppapi_host_); | 159 DCHECK(ppapi_host_); |
160 ppapi_host_ = NULL; | 160 ppapi_host_ = NULL; |
161 } | 161 } |
162 | 162 |
163 } // namespace content | 163 } // namespace content |
OLD | NEW |