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

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

Issue 61063003: Keep NaCl plugins used in app background pages alive when active. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ref counted compile warning Created 7 years, 1 month 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 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "content/browser/browser_child_process_host_impl.h" 9 #include "content/browser/browser_child_process_host_impl.h"
10 #include "content/browser/ppapi_plugin_process_host.h" 10 #include "content/browser/ppapi_plugin_process_host.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 PendingHostCreator::~PendingHostCreator() { 82 PendingHostCreator::~PendingHostCreator() {
83 connection_->Send(new PpapiHostMsg_CreateResourceHostsFromHostReply( 83 connection_->Send(new PpapiHostMsg_CreateResourceHostsFromHostReply(
84 routing_id_, sequence_id_, pending_resource_host_ids_)); 84 routing_id_, sequence_id_, pending_resource_host_ids_));
85 } 85 }
86 86
87 } // namespace 87 } // namespace
88 88
89 PepperRendererConnection::PepperRendererConnection(int render_process_id) 89 PepperRendererConnection::PepperRendererConnection(int render_process_id)
90 : render_process_id_(render_process_id) { 90 : render_process_id_(render_process_id) {
91 // Only give the renderer permission for stable APIs. 91 // Only give the renderer permission for stable APIs.
92 in_process_host_.reset(new BrowserPpapiHostImpl(this, 92 in_process_host_ = new BrowserPpapiHostImpl(NULL,
93 ppapi::PpapiPermissions(), 93 this,
94 "", 94 ppapi::PpapiPermissions(),
95 base::FilePath(), 95 "",
96 base::FilePath(), 96 base::FilePath(),
97 true /* in_process */, 97 base::FilePath(),
98 false /* external_plugin */)); 98 true /* in_process */,
99 false /* external_plugin */);
99 } 100 }
100 101
101 PepperRendererConnection::~PepperRendererConnection() { 102 PepperRendererConnection::~PepperRendererConnection() {
102 } 103 }
103 104
104 BrowserPpapiHostImpl* PepperRendererConnection::GetHostForChildProcess( 105 BrowserPpapiHostImpl* PepperRendererConnection::GetHostForChildProcess(
105 int child_process_id) const { 106 int child_process_id) const {
106 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 107 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
107 108
108 // Find the plugin which this message refers to. Check NaCl plugins first. 109 // Find the plugin which this message refers to. Check NaCl plugins first.
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 data.render_process_id = render_process_id_; 232 data.render_process_id = render_process_id_;
232 in_process_host_->AddInstance(instance, data); 233 in_process_host_->AddInstance(instance, data);
233 } 234 }
234 235
235 void PepperRendererConnection::OnMsgDidDeleteInProcessInstance( 236 void PepperRendererConnection::OnMsgDidDeleteInProcessInstance(
236 PP_Instance instance) { 237 PP_Instance instance) {
237 in_process_host_->DeleteInstance(instance); 238 in_process_host_->DeleteInstance(instance);
238 } 239 }
239 240
240 } // namespace content 241 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698