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 10 matching lines...) Expand all Loading... |
21 namespace content { | 21 namespace content { |
22 | 22 |
23 PepperRendererConnection::PepperRendererConnection(int render_process_id) | 23 PepperRendererConnection::PepperRendererConnection(int render_process_id) |
24 : render_process_id_(render_process_id) { | 24 : render_process_id_(render_process_id) { |
25 // Only give the renderer permission for stable APIs. | 25 // Only give the renderer permission for stable APIs. |
26 in_process_host_.reset(new BrowserPpapiHostImpl(this, | 26 in_process_host_.reset(new BrowserPpapiHostImpl(this, |
27 ppapi::PpapiPermissions(), | 27 ppapi::PpapiPermissions(), |
28 "", | 28 "", |
29 base::FilePath(), | 29 base::FilePath(), |
30 base::FilePath(), | 30 base::FilePath(), |
31 false, | 31 false)); |
32 NULL)); | |
33 } | 32 } |
34 | 33 |
35 PepperRendererConnection::~PepperRendererConnection() { | 34 PepperRendererConnection::~PepperRendererConnection() { |
36 } | 35 } |
37 | 36 |
38 BrowserPpapiHostImpl* PepperRendererConnection::GetHostForChildProcess( | 37 BrowserPpapiHostImpl* PepperRendererConnection::GetHostForChildProcess( |
39 int child_process_id) const { | 38 int child_process_id) const { |
40 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 39 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
41 | 40 |
42 // Find the plugin which this message refers to. Check NaCl plugins first. | 41 // Find the plugin which this message refers to. Check NaCl plugins first. |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 data.render_process_id = render_process_id_; | 167 data.render_process_id = render_process_id_; |
169 in_process_host_->AddInstance(instance, data); | 168 in_process_host_->AddInstance(instance, data); |
170 } | 169 } |
171 | 170 |
172 void PepperRendererConnection::OnMsgDidDeleteInProcessInstance( | 171 void PepperRendererConnection::OnMsgDidDeleteInProcessInstance( |
173 PP_Instance instance) { | 172 PP_Instance instance) { |
174 in_process_host_->DeleteInstance(instance); | 173 in_process_host_->DeleteInstance(instance); |
175 } | 174 } |
176 | 175 |
177 } // namespace content | 176 } // namespace content |
OLD | NEW |