From 6117b82da99a439a5e2c02acfc320291d1c3abc2 Mon Sep 17 00:00:00 2001 From: "yzshen@chromium.org" Date: Sat, 7 Jan 2012 00:51:01 +0000 Subject: Introduce PPB_ResourceArray_Dev. TEST=test_resource_array.{h,cc} BUG=None Review URL: http://codereview.chromium.org/9111008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116789 0039d316-1c4b-4281-b951-d872f2087c98 --- ppapi/proxy/interface_list.cc | 1 + ppapi/proxy/resource_creation_proxy.cc | 12 +++++++++++- ppapi/proxy/resource_creation_proxy.h | 5 ++++- 3 files changed, 16 insertions(+), 2 deletions(-) (limited to 'ppapi/proxy') diff --git a/ppapi/proxy/interface_list.cc b/ppapi/proxy/interface_list.cc index 746935f..b7eec94 100644 --- a/ppapi/proxy/interface_list.cc +++ b/ppapi/proxy/interface_list.cc @@ -16,6 +16,7 @@ #include "ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h" #include "ppapi/c/dev/ppb_ime_input_event_dev.h" #include "ppapi/c/dev/ppb_memory_dev.h" +#include "ppapi/c/dev/ppb_resource_array_dev.h" #include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/dev/ppb_text_input_dev.h" #include "ppapi/c/dev/ppb_url_util_dev.h" diff --git a/ppapi/proxy/resource_creation_proxy.cc b/ppapi/proxy/resource_creation_proxy.cc index e758035..02f2723 100644 --- a/ppapi/proxy/resource_creation_proxy.cc +++ b/ppapi/proxy/resource_creation_proxy.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -35,6 +35,7 @@ #include "ppapi/shared_impl/ppb_audio_config_shared.h" #include "ppapi/shared_impl/ppb_font_shared.h" #include "ppapi/shared_impl/ppb_input_event_shared.h" +#include "ppapi/shared_impl/ppb_resource_array_shared.h" #include "ppapi/shared_impl/ppb_url_request_info_shared.h" #include "ppapi/shared_impl/var.h" #include "ppapi/thunk/enter.h" @@ -246,6 +247,15 @@ PP_Resource ResourceCreationProxy::CreateGraphics3DRaw( return 0; } +PP_Resource ResourceCreationProxy::CreateResourceArray( + PP_Instance instance, + const PP_Resource elements[], + uint32_t size) { + PPB_ResourceArray_Shared* object = new PPB_ResourceArray_Shared( + PPB_ResourceArray_Shared::InitAsProxy(), instance, elements, size); + return object->GetReference(); +} + PP_Resource ResourceCreationProxy::CreateScrollbar(PP_Instance instance, PP_Bool vertical) { NOTIMPLEMENTED(); // Not proxied yet. diff --git a/ppapi/proxy/resource_creation_proxy.h b/ppapi/proxy/resource_creation_proxy.h index da269e9..6fed5e9 100644 --- a/ppapi/proxy/resource_creation_proxy.h +++ b/ppapi/proxy/resource_creation_proxy.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -100,6 +100,9 @@ class ResourceCreationProxy : public InterfaceProxy, const PP_Point* mouse_position, int32_t click_count, const PP_Point* mouse_movement) OVERRIDE; + virtual PP_Resource CreateResourceArray(PP_Instance instance, + const PP_Resource elements[], + uint32_t size) OVERRIDE; virtual PP_Resource CreateScrollbar(PP_Instance instance, PP_Bool vertical) OVERRIDE; virtual PP_Resource CreateTCPSocketPrivate(PP_Instance instance) OVERRIDE; -- cgit v1.1