| 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 "content/browser/renderer_host/pepper/content_browser_pepper_host_facto
ry.h" | 5 #include "content/browser/renderer_host/pepper/content_browser_pepper_host_facto
ry.h" |
| 6 | 6 |
| 7 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h" | 7 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h" |
| 8 #include "content/browser/renderer_host/pepper/pepper_browser_font_singleton_hos
t.h" | 8 #include "content/browser/renderer_host/pepper/pepper_browser_font_singleton_hos
t.h" |
| 9 #include "content/browser/renderer_host/pepper/pepper_flash_file_message_filter.
h" | 9 #include "content/browser/renderer_host/pepper/pepper_flash_file_message_filter.
h" |
| 10 #include "content/browser/renderer_host/pepper/pepper_gamepad_host.h" | 10 #include "content/browser/renderer_host/pepper/pepper_gamepad_host.h" |
| 11 #include "content/browser/renderer_host/pepper/pepper_host_resolver_private_mess
age_filter.h" | 11 #include "content/browser/renderer_host/pepper/pepper_host_resolver_private_mess
age_filter.h" |
| 12 #include "content/browser/renderer_host/pepper/pepper_print_settings_manager.h" | 12 #include "content/browser/renderer_host/pepper/pepper_print_settings_manager.h" |
| 13 #include "content/browser/renderer_host/pepper/pepper_printing_host.h" | 13 #include "content/browser/renderer_host/pepper/pepper_printing_host.h" |
| 14 #include "content/browser/renderer_host/pepper/pepper_truetype_font_list_host.h" |
| 14 #include "content/browser/renderer_host/pepper/pepper_udp_socket_private_message
_filter.h" | 15 #include "content/browser/renderer_host/pepper/pepper_udp_socket_private_message
_filter.h" |
| 15 #include "ppapi/host/message_filter_host.h" | 16 #include "ppapi/host/message_filter_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_messages.h" | 19 #include "ppapi/proxy/ppapi_messages.h" |
| 19 #include "ppapi/shared_impl/ppapi_permissions.h" | 20 #include "ppapi/shared_impl/ppapi_permissions.h" |
| 20 | 21 |
| 21 using ppapi::host::MessageFilterHost; | 22 using ppapi::host::MessageFilterHost; |
| 22 using ppapi::host::ResourceHost; | 23 using ppapi::host::ResourceHost; |
| 23 using ppapi::host::ResourceMessageFilter; | 24 using ppapi::host::ResourceMessageFilter; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 53 // Dev interfaces. | 54 // Dev interfaces. |
| 54 if (GetPermissions().HasPermission(ppapi::PERMISSION_DEV)) { | 55 if (GetPermissions().HasPermission(ppapi::PERMISSION_DEV)) { |
| 55 switch (message.type()) { | 56 switch (message.type()) { |
| 56 case PpapiHostMsg_Printing_Create::ID: { | 57 case PpapiHostMsg_Printing_Create::ID: { |
| 57 scoped_ptr<PepperPrintSettingsManager> manager( | 58 scoped_ptr<PepperPrintSettingsManager> manager( |
| 58 new PepperPrintSettingsManagerImpl()); | 59 new PepperPrintSettingsManagerImpl()); |
| 59 return scoped_ptr<ResourceHost>(new PepperPrintingHost( | 60 return scoped_ptr<ResourceHost>(new PepperPrintingHost( |
| 60 host_->GetPpapiHost(), instance, | 61 host_->GetPpapiHost(), instance, |
| 61 params.pp_resource(), manager.Pass())); | 62 params.pp_resource(), manager.Pass())); |
| 62 } | 63 } |
| 64 case PpapiHostMsg_TrueTypeFontSingleton_Create::ID: { |
| 65 return scoped_ptr<ResourceHost>(new PepperTrueTypeFontListHost( |
| 66 host_, instance, params.pp_resource())); |
| 67 } |
| 63 } | 68 } |
| 64 } | 69 } |
| 65 | 70 |
| 66 // Private interfaces. | 71 // Private interfaces. |
| 67 if (GetPermissions().HasPermission(ppapi::PERMISSION_PRIVATE)) { | 72 if (GetPermissions().HasPermission(ppapi::PERMISSION_PRIVATE)) { |
| 68 switch (message.type()) { | 73 switch (message.type()) { |
| 69 case PpapiHostMsg_BrowserFontSingleton_Create::ID: | 74 case PpapiHostMsg_BrowserFontSingleton_Create::ID: |
| 70 return scoped_ptr<ResourceHost>(new PepperBrowserFontSingletonHost( | 75 return scoped_ptr<ResourceHost>(new PepperBrowserFontSingletonHost( |
| 71 host_, instance, params.pp_resource())); | 76 host_, instance, params.pp_resource())); |
| 72 } | 77 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 111 |
| 107 return scoped_ptr<ResourceHost>(); | 112 return scoped_ptr<ResourceHost>(); |
| 108 } | 113 } |
| 109 | 114 |
| 110 const ppapi::PpapiPermissions& | 115 const ppapi::PpapiPermissions& |
| 111 ContentBrowserPepperHostFactory::GetPermissions() const { | 116 ContentBrowserPepperHostFactory::GetPermissions() const { |
| 112 return host_->GetPpapiHost()->permissions(); | 117 return host_->GetPpapiHost()->permissions(); |
| 113 } | 118 } |
| 114 | 119 |
| 115 } // namespace content | 120 } // namespace content |
| OLD | NEW |