OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/pepper_renderer_connection.h" | 5 #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h" |
6 | 6 |
7 #include "content/browser/browser_child_process_host_impl.h" | 7 #include "content/browser/browser_child_process_host_impl.h" |
8 #include "content/browser/ppapi_plugin_process_host.h" | 8 #include "content/browser/ppapi_plugin_process_host.h" |
9 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h" | 9 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h" |
10 #include "content/common/pepper_renderer_instance_data.h" | 10 #include "content/common/pepper_renderer_instance_data.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 namespace content { | 23 namespace content { |
24 | 24 |
25 PepperRendererConnection::PepperRendererConnection(int render_process_id) | 25 PepperRendererConnection::PepperRendererConnection(int render_process_id) |
26 : render_process_id_(render_process_id) { | 26 : render_process_id_(render_process_id) { |
27 // Only give the renderer permission for stable APIs. | 27 // Only give the renderer permission for stable APIs. |
28 in_process_host_.reset(new BrowserPpapiHostImpl(this, | 28 in_process_host_.reset(new BrowserPpapiHostImpl(this, |
29 ppapi::PpapiPermissions(), | 29 ppapi::PpapiPermissions(), |
30 "", | 30 "", |
31 base::FilePath(), | 31 base::FilePath(), |
32 base::FilePath(), | 32 base::FilePath(), |
33 false, | 33 false)); |
34 NULL)); | |
35 } | 34 } |
36 | 35 |
37 PepperRendererConnection::~PepperRendererConnection() { | 36 PepperRendererConnection::~PepperRendererConnection() { |
38 } | 37 } |
39 | 38 |
40 BrowserPpapiHostImpl* PepperRendererConnection::GetHostForChildProcess( | 39 BrowserPpapiHostImpl* PepperRendererConnection::GetHostForChildProcess( |
41 int child_process_id) const { | 40 int child_process_id) const { |
42 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 41 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
43 | 42 |
44 // Find the plugin which this message refers to. Check NaCl plugins first. | 43 // Find the plugin which this message refers to. Check NaCl plugins first. |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 data.render_process_id = render_process_id_; | 177 data.render_process_id = render_process_id_; |
179 in_process_host_->AddInstance(instance, data); | 178 in_process_host_->AddInstance(instance, data); |
180 } | 179 } |
181 | 180 |
182 void PepperRendererConnection::OnMsgDidDeleteInProcessInstance( | 181 void PepperRendererConnection::OnMsgDidDeleteInProcessInstance( |
183 PP_Instance instance) { | 182 PP_Instance instance) { |
184 in_process_host_->DeleteInstance(instance); | 183 in_process_host_->DeleteInstance(instance); |
185 } | 184 } |
186 | 185 |
187 } // namespace content | 186 } // namespace content |
OLD | NEW |