Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(476)

Side by Side Diff: ppapi/proxy/resource_creation_proxy.cc

Issue 11958033: Implement Pepper proxy for PPB_DirectoryReader (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/directory_reader_resource.h"
13 #include "ppapi/proxy/file_chooser_resource.h" 14 #include "ppapi/proxy/file_chooser_resource.h"
14 #include "ppapi/proxy/flash_device_id_resource.h" 15 #include "ppapi/proxy/flash_device_id_resource.h"
15 #include "ppapi/proxy/flash_font_file_resource.h" 16 #include "ppapi/proxy/flash_font_file_resource.h"
16 #include "ppapi/proxy/flash_menu_resource.h" 17 #include "ppapi/proxy/flash_menu_resource.h"
17 #include "ppapi/proxy/graphics_2d_resource.h" 18 #include "ppapi/proxy/graphics_2d_resource.h"
18 #include "ppapi/proxy/plugin_dispatcher.h" 19 #include "ppapi/proxy/plugin_dispatcher.h"
19 #include "ppapi/proxy/plugin_globals.h" 20 #include "ppapi/proxy/plugin_globals.h"
20 #include "ppapi/proxy/plugin_resource_tracker.h" 21 #include "ppapi/proxy/plugin_resource_tracker.h"
21 #include "ppapi/proxy/ppapi_messages.h" 22 #include "ppapi/proxy/ppapi_messages.h"
22 #include "ppapi/proxy/ppb_audio_proxy.h" 23 #include "ppapi/proxy/ppb_audio_proxy.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 *description, dispatcher->preferences()))->GetReference(); 311 *description, dispatcher->preferences()))->GetReference();
311 } 312 }
312 313
313 PP_Resource ResourceCreationProxy::CreateBuffer(PP_Instance instance, 314 PP_Resource ResourceCreationProxy::CreateBuffer(PP_Instance instance,
314 uint32_t size) { 315 uint32_t size) {
315 return PPB_Buffer_Proxy::CreateProxyResource(instance, size); 316 return PPB_Buffer_Proxy::CreateProxyResource(instance, size);
316 } 317 }
317 318
318 PP_Resource ResourceCreationProxy::CreateDirectoryReader( 319 PP_Resource ResourceCreationProxy::CreateDirectoryReader(
319 PP_Resource directory_ref) { 320 PP_Resource directory_ref) {
320 NOTIMPLEMENTED(); // Not proxied yet. 321 Resource* object =
321 return 0; 322 PpapiGlobals::Get()->GetResourceTracker()->GetResource(directory_ref);
323 return (new DirectoryReaderResource(
324 GetConnection(), object->pp_instance(), directory_ref))->GetReference();
322 } 325 }
323 326
324 PP_Resource ResourceCreationProxy::CreateFlashDeviceID(PP_Instance instance) { 327 PP_Resource ResourceCreationProxy::CreateFlashDeviceID(PP_Instance instance) {
325 return (new FlashDeviceIDResource(GetConnection(), instance))->GetReference(); 328 return (new FlashDeviceIDResource(GetConnection(), instance))->GetReference();
326 } 329 }
327 330
328 PP_Resource ResourceCreationProxy::CreateFlashFontFile( 331 PP_Resource ResourceCreationProxy::CreateFlashFontFile(
329 PP_Instance instance, 332 PP_Instance instance,
330 const PP_BrowserFont_Trusted_Description* description, 333 const PP_BrowserFont_Trusted_Description* description,
331 PP_PrivateFontCharset charset) { 334 PP_PrivateFontCharset charset) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { 386 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) {
384 return false; 387 return false;
385 } 388 }
386 389
387 Connection ResourceCreationProxy::GetConnection() { 390 Connection ResourceCreationProxy::GetConnection() {
388 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); 391 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher());
389 } 392 }
390 393
391 } // namespace proxy 394 } // namespace proxy
392 } // namespace ppapi 395 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698