summaryrefslogtreecommitdiffstats
path: root/content/browser/renderer_host/pepper
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser/renderer_host/pepper')
-rw-r--r--content/browser/renderer_host/pepper/content_browser_pepper_host_factory.cc21
1 files changed, 14 insertions, 7 deletions
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 eb325fd..b66ff88 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
@@ -34,17 +34,24 @@ scoped_ptr<ResourceHost> ContentBrowserPepperHostFactory::CreateResourceHost(
if (!host_->IsValidInstance(instance))
return scoped_ptr<ResourceHost>();
- // Public interfaces with no permissions required.
+ // Public interfaces.
switch (message.type()) {
case PpapiHostMsg_Gamepad_Create::ID:
return scoped_ptr<ResourceHost>(new PepperGamepadHost(
host_, instance, params.pp_resource()));
- case PpapiHostMsg_Printing_Create::ID: {
- scoped_ptr<PepperPrintSettingsManager> manager(
- new PepperPrintSettingsManagerImpl());
- return scoped_ptr<ResourceHost>(new PepperPrintingHost(
- host_->GetPpapiHost(), instance,
- params.pp_resource(), manager.Pass()));
+ }
+
+ // Dev interfaces.
+ if (host_->GetPpapiHost()->permissions().HasPermission(
+ ppapi::PERMISSION_DEV)) {
+ switch (message.type()) {
+ case PpapiHostMsg_Printing_Create::ID: {
+ scoped_ptr<PepperPrintSettingsManager> manager(
+ new PepperPrintSettingsManagerImpl());
+ return scoped_ptr<ResourceHost>(new PepperPrintingHost(
+ host_->GetPpapiHost(), instance,
+ params.pp_resource(), manager.Pass()));
+ }
}
}
return scoped_ptr<ResourceHost>();