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 "ppapi/proxy/resource_creation_proxy.h" | 5 #include "ppapi/proxy/resource_creation_proxy.h" |
6 | 6 |
7 #include "ppapi/c/pp_errors.h" | 7 #include "ppapi/c/pp_errors.h" |
8 #include "ppapi/c/pp_size.h" | 8 #include "ppapi/c/pp_size.h" |
9 #include "ppapi/c/trusted/ppb_image_data_trusted.h" | 9 #include "ppapi/c/trusted/ppb_image_data_trusted.h" |
10 #include "ppapi/proxy/audio_input_resource.h" | 10 #include "ppapi/proxy/audio_input_resource.h" |
11 #include "ppapi/proxy/browser_font_resource_trusted.h" | 11 #include "ppapi/proxy/browser_font_resource_trusted.h" |
12 #include "ppapi/proxy/connection.h" | 12 #include "ppapi/proxy/connection.h" |
| 13 #include "ppapi/proxy/ext_crx_file_system_private_resource.h" |
13 #include "ppapi/proxy/file_chooser_resource.h" | 14 #include "ppapi/proxy/file_chooser_resource.h" |
14 #include "ppapi/proxy/file_io_resource.h" | 15 #include "ppapi/proxy/file_io_resource.h" |
15 #include "ppapi/proxy/file_system_resource.h" | 16 #include "ppapi/proxy/file_system_resource.h" |
16 #include "ppapi/proxy/flash_device_id_resource.h" | 17 #include "ppapi/proxy/flash_device_id_resource.h" |
17 #include "ppapi/proxy/flash_font_file_resource.h" | 18 #include "ppapi/proxy/flash_font_file_resource.h" |
18 #include "ppapi/proxy/flash_menu_resource.h" | 19 #include "ppapi/proxy/flash_menu_resource.h" |
19 #include "ppapi/proxy/graphics_2d_resource.h" | 20 #include "ppapi/proxy/graphics_2d_resource.h" |
20 #include "ppapi/proxy/host_resolver_private_resource.h" | 21 #include "ppapi/proxy/host_resolver_private_resource.h" |
21 #include "ppapi/proxy/plugin_dispatcher.h" | 22 #include "ppapi/proxy/plugin_dispatcher.h" |
22 #include "ppapi/proxy/plugin_globals.h" | 23 #include "ppapi/proxy/plugin_globals.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 return PPB_FileRef_Proxy::CreateProxyResource(instance, file_system, path); | 82 return PPB_FileRef_Proxy::CreateProxyResource(instance, file_system, path); |
82 } | 83 } |
83 | 84 |
84 PP_Resource ResourceCreationProxy::CreateFileSystem( | 85 PP_Resource ResourceCreationProxy::CreateFileSystem( |
85 PP_Instance instance, | 86 PP_Instance instance, |
86 PP_FileSystemType type) { | 87 PP_FileSystemType type) { |
87 return (new FileSystemResource(GetConnection(), instance, | 88 return (new FileSystemResource(GetConnection(), instance, |
88 type))->GetReference(); | 89 type))->GetReference(); |
89 } | 90 } |
90 | 91 |
| 92 PP_Resource ResourceCreationProxy::CreateIsolatedFileSystem( |
| 93 PP_Instance instance, |
| 94 const char* fsid) { |
| 95 FileSystemResource* fs = new FileSystemResource( |
| 96 GetConnection(), instance, PP_FILESYSTEMTYPE_ISOLATED); |
| 97 fs->InitIsolatedFileSystem(fsid); |
| 98 return fs->GetReference(); |
| 99 } |
| 100 |
91 PP_Resource ResourceCreationProxy::CreateIMEInputEvent( | 101 PP_Resource ResourceCreationProxy::CreateIMEInputEvent( |
92 PP_Instance instance, | 102 PP_Instance instance, |
93 PP_InputEvent_Type type, | 103 PP_InputEvent_Type type, |
94 PP_TimeTicks time_stamp, | 104 PP_TimeTicks time_stamp, |
95 struct PP_Var text, | 105 struct PP_Var text, |
96 uint32_t segment_number, | 106 uint32_t segment_number, |
97 const uint32_t* segment_offsets, | 107 const uint32_t* segment_offsets, |
98 int32_t target_segment, | 108 int32_t target_segment, |
99 uint32_t selection_start, | 109 uint32_t selection_start, |
100 uint32_t selection_end) { | 110 uint32_t selection_end) { |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { | 414 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { |
405 return false; | 415 return false; |
406 } | 416 } |
407 | 417 |
408 Connection ResourceCreationProxy::GetConnection() { | 418 Connection ResourceCreationProxy::GetConnection() { |
409 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); | 419 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); |
410 } | 420 } |
411 | 421 |
412 } // namespace proxy | 422 } // namespace proxy |
413 } // namespace ppapi | 423 } // namespace ppapi |
OLD | NEW |