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 "content/renderer/pepper/pepper_file_chooser_host.h" |
7 #include "ppapi/host/resource_host.h" | 8 #include "ppapi/host/resource_host.h" |
8 #include "ppapi/proxy/ppapi_messages.h" | 9 #include "ppapi/proxy/ppapi_messages.h" |
9 | 10 |
10 using ppapi::host::ResourceHost; | 11 using ppapi::host::ResourceHost; |
11 | 12 |
12 namespace content { | 13 namespace content { |
13 | 14 |
14 ContentRendererPepperHostFactory::ContentRendererPepperHostFactory( | 15 ContentRendererPepperHostFactory::ContentRendererPepperHostFactory( |
15 RenderViewImpl* render_view) | 16 RenderViewImpl* render_view) |
16 : render_view_(render_view) { | 17 : render_view_(render_view) { |
17 } | 18 } |
18 | 19 |
19 ContentRendererPepperHostFactory::~ContentRendererPepperHostFactory() { | 20 ContentRendererPepperHostFactory::~ContentRendererPepperHostFactory() { |
20 } | 21 } |
21 | 22 |
22 scoped_ptr<ResourceHost> ContentRendererPepperHostFactory::CreateResourceHost( | 23 scoped_ptr<ResourceHost> ContentRendererPepperHostFactory::CreateResourceHost( |
23 ppapi::host::PpapiHost* host, | 24 ppapi::host::PpapiHost* host, |
24 const ppapi::proxy::ResourceMessageCallParams& params, | 25 const ppapi::proxy::ResourceMessageCallParams& params, |
25 PP_Instance instance, | 26 PP_Instance instance, |
26 const IPC::Message& message) { | 27 const IPC::Message& message) { |
| 28 switch (message.type()) { |
| 29 case PpapiHostMsg_FileChooser_Create::ID: |
| 30 return scoped_ptr<ResourceHost>(new PepperFileChooserHost( |
| 31 host, instance, params.pp_resource(), render_view_)); |
| 32 } |
27 return scoped_ptr<ResourceHost>(); | 33 return scoped_ptr<ResourceHost>(); |
28 } | 34 } |
29 | 35 |
30 } // namespace content | 36 } // namespace content |
OLD | NEW |