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/renderer/pepper/content_renderer_pepper_host_factory.h" | 5 #include "content/renderer/pepper/content_renderer_pepper_host_factory.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "content/renderer/pepper/pepper_audio_input_host.h" | 8 #include "content/renderer/pepper/pepper_audio_input_host.h" |
9 #include "content/renderer/pepper/pepper_file_chooser_host.h" | 9 #include "content/renderer/pepper/pepper_file_chooser_host.h" |
10 #include "content/renderer/pepper/pepper_flash_clipboard_host.h" | 10 #include "content/renderer/pepper/pepper_flash_clipboard_host.h" |
11 #include "content/renderer/pepper/pepper_flash_host.h" | 11 #include "content/renderer/pepper/pepper_flash_renderer_host.h" |
12 #include "content/renderer/pepper/pepper_video_capture_host.h" | 12 #include "content/renderer/pepper/pepper_video_capture_host.h" |
13 #include "content/renderer/pepper/pepper_websocket_host.h" | 13 #include "content/renderer/pepper/pepper_websocket_host.h" |
14 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" | 14 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" |
15 #include "ppapi/host/resource_host.h" | 15 #include "ppapi/host/resource_host.h" |
16 #include "ppapi/proxy/ppapi_messages.h" | 16 #include "ppapi/proxy/ppapi_messages.h" |
17 | 17 |
18 using ppapi::host::ResourceHost; | 18 using ppapi::host::ResourceHost; |
19 | 19 |
20 namespace content { | 20 namespace content { |
21 | 21 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 } | 63 } |
64 return scoped_ptr<ResourceHost>(host); | 64 return scoped_ptr<ResourceHost>(host); |
65 } | 65 } |
66 } | 66 } |
67 } | 67 } |
68 | 68 |
69 // Flash interfaces. | 69 // Flash interfaces. |
70 if (GetPermissions().HasPermission(ppapi::PERMISSION_FLASH)) { | 70 if (GetPermissions().HasPermission(ppapi::PERMISSION_FLASH)) { |
71 switch (message.type()) { | 71 switch (message.type()) { |
72 case PpapiHostMsg_Flash_Create::ID: | 72 case PpapiHostMsg_Flash_Create::ID: |
73 return scoped_ptr<ResourceHost>(new PepperFlashHost( | 73 return scoped_ptr<ResourceHost>(new PepperFlashRendererHost( |
74 host_, instance, params.pp_resource())); | 74 host_, instance, params.pp_resource())); |
75 case PpapiHostMsg_FlashClipboard_Create::ID: | 75 case PpapiHostMsg_FlashClipboard_Create::ID: |
76 return scoped_ptr<ResourceHost>(new PepperFlashClipboardHost( | 76 return scoped_ptr<ResourceHost>(new PepperFlashClipboardHost( |
77 host_, instance, params.pp_resource())); | 77 host_, instance, params.pp_resource())); |
78 } | 78 } |
79 } | 79 } |
80 | 80 |
81 return scoped_ptr<ResourceHost>(); | 81 return scoped_ptr<ResourceHost>(); |
82 } | 82 } |
83 | 83 |
84 const ppapi::PpapiPermissions& | 84 const ppapi::PpapiPermissions& |
85 ContentRendererPepperHostFactory::GetPermissions() const { | 85 ContentRendererPepperHostFactory::GetPermissions() const { |
86 return host_->GetPpapiHost()->permissions(); | 86 return host_->GetPpapiHost()->permissions(); |
87 } | 87 } |
88 | 88 |
89 } // namespace content | 89 } // namespace content |
OLD | NEW |