Index: content/renderer/pepper/content_renderer_pepper_host_factory.cc |
diff --git a/content/renderer/pepper/content_renderer_pepper_host_factory.cc b/content/renderer/pepper/content_renderer_pepper_host_factory.cc |
index 9d7fae63416eac0a78a9103e428f67e4b6c1ca13..1336be2b1d54aef0cf635e6ca161a91c322e68a0 100644 |
--- a/content/renderer/pepper/content_renderer_pepper_host_factory.cc |
+++ b/content/renderer/pepper/content_renderer_pepper_host_factory.cc |
@@ -15,6 +15,7 @@ |
#include "content/renderer/pepper/pepper_file_ref_renderer_host.h" |
#include "content/renderer/pepper/pepper_file_system_host.h" |
#include "content/renderer/pepper/pepper_graphics_2d_host.h" |
+#include "content/renderer/pepper/pepper_image_capture_host.h" |
#include "content/renderer/pepper/pepper_media_stream_video_track_host.h" |
#include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
#include "content/renderer/pepper/pepper_url_loader_host.h" |
@@ -200,6 +201,18 @@ scoped_ptr<ResourceHost> ContentRendererPepperHostFactory::CreateResourceHost( |
} |
} |
+ // Private interfaces. |
+ if (GetPermissions().HasPermission(ppapi::PERMISSION_PRIVATE)) { |
+ switch (message.type()) { |
+ case PpapiHostMsg_ImageCapture_Create::ID: { |
+ scoped_ptr<PepperImageCaptureHost> host( |
+ new PepperImageCaptureHost(host_, instance, resource)); |
+ return host->Init() ? scoped_ptr<ResourceHost>(host.Pass()) |
dcheng
2015/02/12 21:47:20
return host->Init() ? host : nullptr;
should work
Justin Chuang
2015/02/16 19:15:23
Actually no, it needs to upcast to ResourceHost in
dcheng
2015/02/16 19:24:22
return host->Init() ? host.Pass() : nullptr;
shou
Justin Chuang
2015/02/16 19:54:22
You're right. Pass() properly handles upcast. cl u
|
+ : scoped_ptr<ResourceHost>(); |
+ } |
+ } |
+ } |
+ |
return scoped_ptr<ResourceHost>(); |
} |