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" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 switch (message.type()) { | 73 switch (message.type()) { |
74 case PpapiHostMsg_BrowserFontSingleton_Create::ID: | 74 case PpapiHostMsg_BrowserFontSingleton_Create::ID: |
75 return scoped_ptr<ResourceHost>(new PepperBrowserFontSingletonHost( | 75 return scoped_ptr<ResourceHost>(new PepperBrowserFontSingletonHost( |
76 host_, instance, params.pp_resource())); | 76 host_, instance, params.pp_resource())); |
77 } | 77 } |
78 } | 78 } |
79 | 79 |
80 // Permissions for the following interfaces will be checked at the | 80 // Permissions for the following interfaces will be checked at the |
81 // time of the corresponding instance's methods calls (because | 81 // time of the corresponding instance's methods calls (because |
82 // permission check can be performed only on the UI | 82 // permission check can be performed only on the UI |
83 // thread). Currently thise interfaces are available only for | 83 // thread). Currently these interfaces are available only for |
84 // whitelisted apps which may not have access to the other private | 84 // whitelisted apps which may not have access to the other private |
85 // interfaces. | 85 // interfaces. |
86 if (message.type() == PpapiHostMsg_HostResolverPrivate_Create::ID) { | 86 if (message.type() == PpapiHostMsg_HostResolverPrivate_Create::ID) { |
87 scoped_refptr<ResourceMessageFilter> host_resolver( | 87 scoped_refptr<ResourceMessageFilter> host_resolver( |
88 new PepperHostResolverPrivateMessageFilter(host_, instance)); | 88 new PepperHostResolverPrivateMessageFilter(host_, instance)); |
89 return scoped_ptr<ResourceHost>(new MessageFilterHost( | 89 return scoped_ptr<ResourceHost>(new MessageFilterHost( |
90 host_->GetPpapiHost(), instance, params.pp_resource(), host_resolver)); | 90 host_->GetPpapiHost(), instance, params.pp_resource(), host_resolver)); |
91 } | 91 } |
92 if (message.type() == PpapiHostMsg_UDPSocketPrivate_Create::ID) { | 92 if (message.type() == PpapiHostMsg_UDPSocketPrivate_Create::ID) { |
93 scoped_refptr<ResourceMessageFilter> udp_socket( | 93 scoped_refptr<ResourceMessageFilter> udp_socket( |
(...skipping 17 matching lines...) Expand all Loading... |
111 | 111 |
112 return scoped_ptr<ResourceHost>(); | 112 return scoped_ptr<ResourceHost>(); |
113 } | 113 } |
114 | 114 |
115 const ppapi::PpapiPermissions& | 115 const ppapi::PpapiPermissions& |
116 ContentBrowserPepperHostFactory::GetPermissions() const { | 116 ContentBrowserPepperHostFactory::GetPermissions() const { |
117 return host_->GetPpapiHost()->permissions(); | 117 return host_->GetPpapiHost()->permissions(); |
118 } | 118 } |
119 | 119 |
120 } // namespace content | 120 } // namespace content |
OLD | NEW |