Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "chrome/renderer/pepper/chrome_renderer_pepper_host_factory.h" | 5 #include "chrome/renderer/pepper/chrome_renderer_pepper_host_factory.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/renderer/pepper/pepper_flash_drm_renderer_host.h" | 8 #include "chrome/renderer/pepper/pepper_flash_drm_renderer_host.h" |
| 9 #include "chrome/renderer/pepper/pepper_flash_font_file_host.h" | 9 #include "chrome/renderer/pepper/pepper_flash_font_file_host.h" |
| 10 #include "chrome/renderer/pepper/pepper_flash_fullscreen_host.h" | 10 #include "chrome/renderer/pepper/pepper_flash_fullscreen_host.h" |
| 11 #include "chrome/renderer/pepper/pepper_flash_menu_host.h" | 11 #include "chrome/renderer/pepper/pepper_flash_menu_host.h" |
| 12 #include "chrome/renderer/pepper/pepper_flash_renderer_host.h" | 12 #include "chrome/renderer/pepper/pepper_flash_renderer_host.h" |
| 13 #include "chrome/renderer/pepper/pepper_printing_renderer_host.h" | |
| 13 #include "chrome/renderer/pepper/pepper_uma_host.h" | 14 #include "chrome/renderer/pepper/pepper_uma_host.h" |
| 14 #include "components/pdf/renderer/pepper_pdf_host.h" | 15 #include "components/pdf/renderer/pepper_pdf_host.h" |
| 15 #include "content/public/renderer/renderer_ppapi_host.h" | 16 #include "content/public/renderer/renderer_ppapi_host.h" |
| 16 #include "ppapi/host/ppapi_host.h" | 17 #include "ppapi/host/ppapi_host.h" |
| 17 #include "ppapi/host/resource_host.h" | 18 #include "ppapi/host/resource_host.h" |
| 18 #include "ppapi/proxy/ppapi_message_utils.h" | 19 #include "ppapi/proxy/ppapi_message_utils.h" |
| 19 #include "ppapi/proxy/ppapi_messages.h" | 20 #include "ppapi/proxy/ppapi_messages.h" |
| 20 #include "ppapi/shared_impl/ppapi_permissions.h" | 21 #include "ppapi/shared_impl/ppapi_permissions.h" |
| 21 | 22 |
| 22 using ppapi::host::ResourceHost; | 23 using ppapi::host::ResourceHost; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 88 if (host_->GetPpapiHost()->permissions().HasPermission( | 89 if (host_->GetPpapiHost()->permissions().HasPermission( |
| 89 ppapi::PERMISSION_PRIVATE)) { | 90 ppapi::PERMISSION_PRIVATE)) { |
| 90 switch (message.type()) { | 91 switch (message.type()) { |
| 91 case PpapiHostMsg_PDF_Create::ID: { | 92 case PpapiHostMsg_PDF_Create::ID: { |
| 92 return scoped_ptr<ResourceHost>( | 93 return scoped_ptr<ResourceHost>( |
| 93 new pdf::PepperPDFHost(host_, instance, params.pp_resource())); | 94 new pdf::PepperPDFHost(host_, instance, params.pp_resource())); |
| 94 } | 95 } |
| 95 } | 96 } |
| 96 } | 97 } |
| 97 | 98 |
| 99 if (host_->GetPpapiHost()->permissions().HasPermission( | |
| 100 ppapi::PERMISSION_PRIVATE)) { | |
| 101 switch (message.type()) { | |
| 102 case PpapiHostMsg_PrintHost_Create::ID: { | |
|
Vitaly Buka (NO REVIEWS)
2014/09/03 21:36:23
this should be "case" in switch on line 91
| |
| 103 return scoped_ptr<ResourceHost>(new PepperPrintingRendererHost( | |
| 104 host_, instance, params.pp_resource())); | |
| 105 } | |
| 106 } | |
| 107 } | |
| 108 | |
| 98 // Permissions for the following interfaces will be checked at the | 109 // Permissions for the following interfaces will be checked at the |
| 99 // time of the corresponding instance's method calls. Currently these | 110 // time of the corresponding instance's method calls. Currently these |
| 100 // interfaces are available only for whitelisted apps which may not have | 111 // interfaces are available only for whitelisted apps which may not have |
| 101 // access to the other private interfaces. | 112 // access to the other private interfaces. |
| 102 switch (message.type()) { | 113 switch (message.type()) { |
| 103 case PpapiHostMsg_UMA_Create::ID: { | 114 case PpapiHostMsg_UMA_Create::ID: { |
| 104 return scoped_ptr<ResourceHost>( | 115 return scoped_ptr<ResourceHost>( |
| 105 new PepperUMAHost(host_, instance, params.pp_resource())); | 116 new PepperUMAHost(host_, instance, params.pp_resource())); |
| 106 } | 117 } |
| 107 } | 118 } |
| 108 | 119 |
| 109 return scoped_ptr<ResourceHost>(); | 120 return scoped_ptr<ResourceHost>(); |
| 110 } | 121 } |
| OLD | NEW |