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

Unified Diff: content/renderer/pepper/renderer_ppapi_host_impl.cc

Issue 10909138: Convert the async device ID getter to a chrome resource host (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/pepper/renderer_ppapi_host_impl.cc
diff --git a/content/renderer/pepper/renderer_ppapi_host_impl.cc b/content/renderer/pepper/renderer_ppapi_host_impl.cc
index feafc2ed5eb61ff32ad1417f936057de6e691301..8447093be3bb1b3e6b80376faabd7243b27b74f3 100644
--- a/content/renderer/pepper/renderer_ppapi_host_impl.cc
+++ b/content/renderer/pepper/renderer_ppapi_host_impl.cc
@@ -23,11 +23,12 @@ RendererPpapiHostImpl::RendererPpapiHostImpl(
webkit::ppapi::PluginModule* module,
ppapi::proxy::HostDispatcher* dispatcher,
const ppapi::PpapiPermissions& permissions)
- : module_(module),
- host_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
+ : module_(module) {
// Hook the PpapiHost up to the dispatcher for out-of-process communication.
ppapi_host_.reset(
- new ppapi::host::PpapiHost(dispatcher, &host_factory_, permissions));
+ new ppapi::host::PpapiHost(dispatcher, permissions));
+ ppapi_host_->AddHostFactoryFilter(scoped_ptr<ppapi::host::HostFactory>(
+ new ContentRendererPepperHostFactory(this)));
dispatcher->AddFilter(ppapi_host_.get());
}
@@ -35,13 +36,13 @@ RendererPpapiHostImpl::RendererPpapiHostImpl(
RendererPpapiHostImpl::RendererPpapiHostImpl(
webkit::ppapi::PluginModule* module,
const ppapi::PpapiPermissions& permissions)
- : module_(module),
- host_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
+ : module_(module) {
// Hook the host up to the in-process router.
in_process_router_.reset(new PepperInProcessRouter(this));
ppapi_host_.reset(new ppapi::host::PpapiHost(
- in_process_router_->GetRendererToPluginSender(),
- &host_factory_, permissions));
+ in_process_router_->GetRendererToPluginSender(), permissions));
+ ppapi_host_->AddHostFactoryFilter(scoped_ptr<ppapi::host::HostFactory>(
+ new ContentRendererPepperHostFactory(this)));
}
RendererPpapiHostImpl::~RendererPpapiHostImpl() {

Powered by Google App Engine
This is Rietveld 408576698