| 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_extensions_common_host.h" | 8 #include "chrome/renderer/pepper/pepper_extensions_common_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_pdf_host.h" |
| 13 #include "content/public/renderer/renderer_ppapi_host.h" | 14 #include "content/public/renderer/renderer_ppapi_host.h" |
| 14 #include "ppapi/host/ppapi_host.h" | 15 #include "ppapi/host/ppapi_host.h" |
| 15 #include "ppapi/host/resource_host.h" | 16 #include "ppapi/host/resource_host.h" |
| 16 #include "ppapi/proxy/ppapi_messages.h" | 17 #include "ppapi/proxy/ppapi_messages.h" |
| 17 #include "ppapi/proxy/ppapi_message_utils.h" | 18 #include "ppapi/proxy/ppapi_message_utils.h" |
| 18 #include "ppapi/shared_impl/ppapi_permissions.h" | 19 #include "ppapi/shared_impl/ppapi_permissions.h" |
| 19 | 20 |
| 20 using ppapi::host::ResourceHost; | 21 using ppapi::host::ResourceHost; |
| 21 | 22 |
| 22 namespace chrome { | 23 namespace chrome { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 if (ppapi::UnpackMessage<PpapiHostMsg_FlashFontFile_Create>( | 90 if (ppapi::UnpackMessage<PpapiHostMsg_FlashFontFile_Create>( |
| 90 message, &description, &charset)) { | 91 message, &description, &charset)) { |
| 91 return scoped_ptr<ResourceHost>(new PepperFlashFontFileHost( | 92 return scoped_ptr<ResourceHost>(new PepperFlashFontFileHost( |
| 92 host_, instance, params.pp_resource(), description, charset)); | 93 host_, instance, params.pp_resource(), description, charset)); |
| 93 } | 94 } |
| 94 break; | 95 break; |
| 95 } | 96 } |
| 96 } | 97 } |
| 97 } | 98 } |
| 98 | 99 |
| 100 if (host_->GetPpapiHost()->permissions().HasPermission( |
| 101 ppapi::PERMISSION_PRIVATE)) { |
| 102 switch (message.type()) { |
| 103 case PpapiHostMsg_PDF_Create::ID: { |
| 104 return scoped_ptr<ResourceHost>(new PepperPDFHost( |
| 105 host_, instance, params.pp_resource())); |
| 106 } |
| 107 } |
| 108 } |
| 109 |
| 99 return scoped_ptr<ResourceHost>(); | 110 return scoped_ptr<ResourceHost>(); |
| 100 } | 111 } |
| 101 | 112 |
| 102 } // namespace chrome | 113 } // namespace chrome |
| OLD | NEW |