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_singleton_ho st.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 } |
63 } | 64 case PpapiHostMsg_TrueTypeFontSingleton_Create::ID: |
65 return scoped_ptr<ResourceHost>(new PepperTrueTypeFontSingletonHost( | |
66 host_, instance, params.pp_resource())); | |
67 } | |
dmichael (off chromium)
2013/03/12 18:07:58
It looks like this brace is unmatched? Or indentat
bbudge
2013/03/13 01:26:50
Fixed indentation and added braces to 'case' to im
| |
64 } | 68 } |
65 | 69 |
66 // Private interfaces. | 70 // Private interfaces. |
67 if (GetPermissions().HasPermission(ppapi::PERMISSION_PRIVATE)) { | 71 if (GetPermissions().HasPermission(ppapi::PERMISSION_PRIVATE)) { |
68 switch (message.type()) { | 72 switch (message.type()) { |
69 case PpapiHostMsg_BrowserFontSingleton_Create::ID: | 73 case PpapiHostMsg_BrowserFontSingleton_Create::ID: |
70 return scoped_ptr<ResourceHost>(new PepperBrowserFontSingletonHost( | 74 return scoped_ptr<ResourceHost>(new PepperBrowserFontSingletonHost( |
71 host_, instance, params.pp_resource())); | 75 host_, instance, params.pp_resource())); |
72 } | 76 } |
73 } | 77 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
106 | 110 |
107 return scoped_ptr<ResourceHost>(); | 111 return scoped_ptr<ResourceHost>(); |
108 } | 112 } |
109 | 113 |
110 const ppapi::PpapiPermissions& | 114 const ppapi::PpapiPermissions& |
111 ContentBrowserPepperHostFactory::GetPermissions() const { | 115 ContentBrowserPepperHostFactory::GetPermissions() const { |
112 return host_->GetPpapiHost()->permissions(); | 116 return host_->GetPpapiHost()->permissions(); |
113 } | 117 } |
114 | 118 |
115 } // namespace content | 119 } // namespace content |
OLD | NEW |