Chromium Code Reviews| Index: content/browser/renderer_host/pepper/content_browser_pepper_host_factory.cc |
| diff --git a/content/browser/renderer_host/pepper/content_browser_pepper_host_factory.cc b/content/browser/renderer_host/pepper/content_browser_pepper_host_factory.cc |
| index 75e3ac464e13eae8981e59ebbd69e8180a51b54e..ffbc32032b1d47be3b24e65fcf16eb7e113d3da3 100644 |
| --- a/content/browser/renderer_host/pepper/content_browser_pepper_host_factory.cc |
| +++ b/content/browser/renderer_host/pepper/content_browser_pepper_host_factory.cc |
| @@ -10,6 +10,7 @@ |
| #include "content/browser/renderer_host/pepper/pepper_gamepad_host.h" |
| #include "content/browser/renderer_host/pepper/pepper_print_settings_manager.h" |
| #include "content/browser/renderer_host/pepper/pepper_printing_host.h" |
| +#include "content/browser/renderer_host/pepper/pepper_udp_socket_private_host.h" |
| #include "ppapi/host/message_filter_host.h" |
| #include "ppapi/host/ppapi_host.h" |
| #include "ppapi/host/resource_host.h" |
| @@ -62,11 +63,22 @@ scoped_ptr<ResourceHost> ContentBrowserPepperHostFactory::CreateResourceHost( |
| } |
| // Private interfaces. |
| - if (GetPermissions().HasPermission(ppapi::PERMISSION_PRIVATE)) { |
| + // |
| + // Permissions for UDPSocketPrivate interface will be checked at the |
| + // time of the instance's methods calls (because permission check |
| + // for UDPSocketPrivate can be performed only on the UI |
| + // thread). Currently this interface is available only for |
| + // whitelisted apps which may not have access to the other private |
| + // interfaces. |
| + if (GetPermissions().HasPermission(ppapi::PERMISSION_PRIVATE) || |
| + message.type() == PpapiHostMsg_UDPSocketPrivate_Create::ID) { |
|
raymes
2013/01/15 20:58:11
I still think this could be a little clearer. Can
ygorshenin1
2013/01/16 08:13:50
Done.
|
| switch (message.type()) { |
| case PpapiHostMsg_BrowserFontSingleton_Create::ID: |
| return scoped_ptr<ResourceHost>(new PepperBrowserFontSingletonHost( |
| host_, instance, params.pp_resource())); |
| + case PpapiHostMsg_UDPSocketPrivate_Create::ID: |
| + return scoped_ptr<ResourceHost>(new PepperUDPSocketPrivateHost( |
| + host_, instance, params.pp_resource())); |
| } |
| } |