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

Side by Side Diff: content/browser/ppapi_plugin_process_host.cc

Issue 10815073: Refactoring of new IPC-only pepper implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months 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/ppapi_plugin_process_host.h" 5 #include "content/browser/ppapi_plugin_process_host.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 PpapiPluginProcessHost::PpapiPluginProcessHost( 116 PpapiPluginProcessHost::PpapiPluginProcessHost(
117 const content::PepperPluginInfo& info, 117 const content::PepperPluginInfo& info,
118 const FilePath& profile_data_directory, 118 const FilePath& profile_data_directory,
119 net::HostResolver* host_resolver) 119 net::HostResolver* host_resolver)
120 : network_observer_(new PluginNetworkObserver(this)), 120 : network_observer_(new PluginNetworkObserver(this)),
121 profile_data_directory_(profile_data_directory), 121 profile_data_directory_(profile_data_directory),
122 is_broker_(false) { 122 is_broker_(false) {
123 process_.reset(new BrowserChildProcessHostImpl( 123 process_.reset(new BrowserChildProcessHostImpl(
124 content::PROCESS_TYPE_PPAPI_PLUGIN, this)); 124 content::PROCESS_TYPE_PPAPI_PLUGIN, this));
125 125
126 filter_ = new PepperMessageFilter( 126 filter_ = new PepperMessageFilter(PepperMessageFilter::PLUGIN,
127 PepperMessageFilter::PLUGIN, host_resolver, 127 host_resolver);
128 ppapi::PpapiPermissions(info.permissions)); 128
129 ppapi::PpapiPermissions permissions(info.permissions);
130 host_impl_.reset(new content::BrowserPpapiHostImpl(this, permissions));
129 131
130 file_filter_ = new PepperTrustedFileMessageFilter( 132 file_filter_ = new PepperTrustedFileMessageFilter(
131 process_->GetData().id, info.name, profile_data_directory); 133 process_->GetData().id, info.name, profile_data_directory);
132 134
133 process_->GetHost()->AddFilter(filter_.get()); 135 process_->GetHost()->AddFilter(filter_.get());
134 process_->GetHost()->AddFilter(file_filter_.get()); 136 process_->GetHost()->AddFilter(file_filter_.get());
135 } 137 }
136 138
137 PpapiPluginProcessHost::PpapiPluginProcessHost() 139 PpapiPluginProcessHost::PpapiPluginProcessHost()
138 : is_broker_(true) { 140 : is_broker_(true) {
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 if (sent_requests_.empty()) 300 if (sent_requests_.empty())
299 return; 301 return;
300 302
301 // All requests should be processed FIFO, so the next item in the 303 // All requests should be processed FIFO, so the next item in the
302 // sent_requests_ queue should be the one that the plugin just created. 304 // sent_requests_ queue should be the one that the plugin just created.
303 Client* client = sent_requests_.front(); 305 Client* client = sent_requests_.front();
304 sent_requests_.pop(); 306 sent_requests_.pop();
305 307
306 client->OnPpapiChannelOpened(channel_handle, process_->GetData().id); 308 client->OnPpapiChannelOpened(channel_handle, process_->GetData().id);
307 } 309 }
OLDNEW
« no previous file with comments | « content/browser/ppapi_plugin_process_host.h ('k') | content/browser/renderer_host/pepper/browser_ppapi_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698