summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-14 00:27:04 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-14 00:27:04 +0000
commit00d320a6e403c645dc00d47217028aef5f2792a0 (patch)
tree4cb1feea9a8c9819c95d1520db3ebd2dff69a3c6 /ppapi/proxy
parent2354c0fa1003d87661d20255211306ae4c9cf622 (diff)
downloadchromium_src-00d320a6e403c645dc00d47217028aef5f2792a0.zip
chromium_src-00d320a6e403c645dc00d47217028aef5f2792a0.tar.gz
chromium_src-00d320a6e403c645dc00d47217028aef5f2792a0.tar.bz2
Make a global enum to differentiate impl & proxy.
Use this in resource constructors and remove all the old weird structs that we used to tell which one to call. This removes some extra code we had to deal with this. Review URL: http://codereview.chromium.org/9391013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121781 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy')
-rw-r--r--ppapi/proxy/mock_resource.cc5
-rw-r--r--ppapi/proxy/ppb_audio_input_proxy.cc4
-rw-r--r--ppapi/proxy/ppb_audio_proxy.cc4
-rw-r--r--ppapi/proxy/ppb_broker_proxy.cc4
-rw-r--r--ppapi/proxy/ppb_buffer_proxy.cc4
-rw-r--r--ppapi/proxy/ppb_file_chooser_proxy.cc3
-rw-r--r--ppapi/proxy/ppb_file_ref_proxy.cc4
-rw-r--r--ppapi/proxy/ppb_file_system_proxy.cc2
-rw-r--r--ppapi/proxy/ppb_flash_menu_proxy.cc4
-rw-r--r--ppapi/proxy/ppb_flash_message_loop_proxy.cc2
-rw-r--r--ppapi/proxy/ppb_flash_net_connector_proxy.cc4
-rw-r--r--ppapi/proxy/ppb_graphics_2d_proxy.cc4
-rw-r--r--ppapi/proxy/ppb_image_data_proxy.cc2
-rw-r--r--ppapi/proxy/ppb_message_loop_proxy.cc2
-rw-r--r--ppapi/proxy/ppb_pdf_proxy.cc5
-rw-r--r--ppapi/proxy/ppb_testing_proxy.cc6
-rw-r--r--ppapi/proxy/ppb_url_loader_proxy.cc2
-rw-r--r--ppapi/proxy/ppb_url_response_info_proxy.cc4
-rw-r--r--ppapi/proxy/ppb_video_capture_proxy.cc4
-rw-r--r--ppapi/proxy/ppp_input_event_proxy.cc6
-rw-r--r--ppapi/proxy/ppp_instance_proxy.cc4
-rw-r--r--ppapi/proxy/ppp_instance_proxy_unittest.cc2
-rw-r--r--ppapi/proxy/resource_creation_proxy.cc20
23 files changed, 51 insertions, 50 deletions
diff --git a/ppapi/proxy/mock_resource.cc b/ppapi/proxy/mock_resource.cc
index 06b2292..9662bad 100644
--- a/ppapi/proxy/mock_resource.cc
+++ b/ppapi/proxy/mock_resource.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.
@@ -7,7 +7,8 @@
namespace ppapi {
namespace proxy {
-MockResource::MockResource(const HostResource& resource) : Resource(resource) {
+MockResource::MockResource(const HostResource& resource)
+ : Resource(OBJECT_IS_PROXY, resource) {
}
MockResource::~MockResource() {
diff --git a/ppapi/proxy/ppb_audio_input_proxy.cc b/ppapi/proxy/ppb_audio_input_proxy.cc
index 5126f7d..d689192 100644
--- a/ppapi/proxy/ppb_audio_input_proxy.cc
+++ b/ppapi/proxy/ppb_audio_input_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.
@@ -65,7 +65,7 @@ AudioInput::AudioInput(const HostResource& audio_input_id,
PP_Resource config_id,
PPB_AudioInput_Callback callback,
void* user_data)
- : Resource(audio_input_id),
+ : Resource(OBJECT_IS_PROXY, audio_input_id),
config_(config_id) {
SetCallback(callback, user_data);
PpapiGlobals::Get()->GetResourceTracker()->AddRefResource(config_);
diff --git a/ppapi/proxy/ppb_audio_proxy.cc b/ppapi/proxy/ppb_audio_proxy.cc
index 8e64c85..fe890ae 100644
--- a/ppapi/proxy/ppb_audio_proxy.cc
+++ b/ppapi/proxy/ppb_audio_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.
@@ -64,7 +64,7 @@ Audio::Audio(const HostResource& audio_id,
PP_Resource config_id,
PPB_Audio_Callback callback,
void* user_data)
- : Resource(audio_id),
+ : Resource(OBJECT_IS_PROXY, audio_id),
config_(config_id) {
SetCallback(callback, user_data);
PpapiGlobals::Get()->GetResourceTracker()->AddRefResource(config_);
diff --git a/ppapi/proxy/ppb_broker_proxy.cc b/ppapi/proxy/ppb_broker_proxy.cc
index 18065bb..b9549e0 100644
--- a/ppapi/proxy/ppb_broker_proxy.cc
+++ b/ppapi/proxy/ppb_broker_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.
@@ -54,7 +54,7 @@ class Broker : public PPB_Broker_API, public Resource {
};
Broker::Broker(const HostResource& resource)
- : Resource(resource),
+ : Resource(OBJECT_IS_PROXY, resource),
called_connect_(false),
socket_handle_(base::kInvalidPlatformFileValue) {
}
diff --git a/ppapi/proxy/ppb_buffer_proxy.cc b/ppapi/proxy/ppb_buffer_proxy.cc
index c7aba70..03a57d5 100644
--- a/ppapi/proxy/ppb_buffer_proxy.cc
+++ b/ppapi/proxy/ppb_buffer_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.
@@ -26,7 +26,7 @@ namespace proxy {
Buffer::Buffer(const HostResource& resource,
const base::SharedMemoryHandle& shm_handle,
uint32_t size)
- : Resource(resource),
+ : Resource(OBJECT_IS_PROXY, resource),
shm_(shm_handle, false),
size_(size),
mapped_data_(NULL),
diff --git a/ppapi/proxy/ppb_file_chooser_proxy.cc b/ppapi/proxy/ppb_file_chooser_proxy.cc
index c3914ef..fa8df55 100644
--- a/ppapi/proxy/ppb_file_chooser_proxy.cc
+++ b/ppapi/proxy/ppb_file_chooser_proxy.cc
@@ -73,7 +73,8 @@ class FileChooser : public Resource,
DISALLOW_COPY_AND_ASSIGN(FileChooser);
};
-FileChooser::FileChooser(const HostResource& resource) : Resource(resource) {
+FileChooser::FileChooser(const HostResource& resource)
+ : Resource(OBJECT_IS_PROXY, resource) {
}
FileChooser::~FileChooser() {
diff --git a/ppapi/proxy/ppb_file_ref_proxy.cc b/ppapi/proxy/ppb_file_ref_proxy.cc
index 7c12ea3..9298eb2 100644
--- a/ppapi/proxy/ppb_file_ref_proxy.cc
+++ b/ppapi/proxy/ppb_file_ref_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.
@@ -76,7 +76,7 @@ class FileRef : public PPB_FileRef_Shared {
};
FileRef::FileRef(const PPB_FileRef_CreateInfo& info)
- : PPB_FileRef_Shared(PPB_FileRef_Shared::InitAsProxy(), info),
+ : PPB_FileRef_Shared(OBJECT_IS_PROXY, info),
next_callback_id_(1) {
}
diff --git a/ppapi/proxy/ppb_file_system_proxy.cc b/ppapi/proxy/ppb_file_system_proxy.cc
index 48942ee..993c468 100644
--- a/ppapi/proxy/ppb_file_system_proxy.cc
+++ b/ppapi/proxy/ppb_file_system_proxy.cc
@@ -63,7 +63,7 @@ class FileSystem : public Resource, public PPB_FileSystem_API {
FileSystem::FileSystem(const HostResource& host_resource,
PP_FileSystemType type)
- : Resource(host_resource),
+ : Resource(OBJECT_IS_PROXY, host_resource),
type_(type),
called_open_(false) {
}
diff --git a/ppapi/proxy/ppb_flash_menu_proxy.cc b/ppapi/proxy/ppb_flash_menu_proxy.cc
index d2ef2a3..d7f5f16 100644
--- a/ppapi/proxy/ppb_flash_menu_proxy.cc
+++ b/ppapi/proxy/ppb_flash_menu_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.
@@ -43,7 +43,7 @@ class FlashMenu : public PPB_Flash_Menu_API, public Resource {
};
FlashMenu::FlashMenu(const HostResource& resource)
- : Resource(resource),
+ : Resource(OBJECT_IS_PROXY, resource),
selected_id_ptr_(NULL) {
}
diff --git a/ppapi/proxy/ppb_flash_message_loop_proxy.cc b/ppapi/proxy/ppb_flash_message_loop_proxy.cc
index a06e8c8..2124e5a 100644
--- a/ppapi/proxy/ppb_flash_message_loop_proxy.cc
+++ b/ppapi/proxy/ppb_flash_message_loop_proxy.cc
@@ -40,7 +40,7 @@ class FlashMessageLoop : public PPB_Flash_MessageLoop_API, public Resource {
};
FlashMessageLoop::FlashMessageLoop(const HostResource& resource)
- : Resource(resource) {
+ : Resource(OBJECT_IS_PROXY, resource) {
}
FlashMessageLoop::~FlashMessageLoop() {
diff --git a/ppapi/proxy/ppb_flash_net_connector_proxy.cc b/ppapi/proxy/ppb_flash_net_connector_proxy.cc
index feaba6a..0b7ba10 100644
--- a/ppapi/proxy/ppb_flash_net_connector_proxy.cc
+++ b/ppapi/proxy/ppb_flash_net_connector_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.
@@ -79,7 +79,7 @@ class FlashNetConnector : public PPB_Flash_NetConnector_API,
};
FlashNetConnector::FlashNetConnector(const HostResource& resource)
- : Resource(resource),
+ : Resource(OBJECT_IS_PROXY, resource),
socket_out_(NULL),
local_addr_out_(NULL),
remote_addr_out_(NULL) {
diff --git a/ppapi/proxy/ppb_graphics_2d_proxy.cc b/ppapi/proxy/ppb_graphics_2d_proxy.cc
index b719a6b..0cbd388 100644
--- a/ppapi/proxy/ppb_graphics_2d_proxy.cc
+++ b/ppapi/proxy/ppb_graphics_2d_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.
@@ -68,7 +68,7 @@ class Graphics2D : public Resource, public thunk::PPB_Graphics2D_API {
Graphics2D::Graphics2D(const HostResource& host_resource,
const PP_Size& size,
PP_Bool is_always_opaque)
- : Resource(host_resource),
+ : Resource(OBJECT_IS_PROXY, host_resource),
size_(size),
is_always_opaque_(is_always_opaque) {
}
diff --git a/ppapi/proxy/ppb_image_data_proxy.cc b/ppapi/proxy/ppb_image_data_proxy.cc
index bdbeb3f..b380be2 100644
--- a/ppapi/proxy/ppb_image_data_proxy.cc
+++ b/ppapi/proxy/ppb_image_data_proxy.cc
@@ -29,7 +29,7 @@ namespace proxy {
ImageData::ImageData(const HostResource& resource,
const PP_ImageDataDesc& desc,
ImageHandle handle)
- : Resource(resource),
+ : Resource(OBJECT_IS_PROXY, resource),
desc_(desc) {
#if defined(OS_WIN)
transport_dib_.reset(TransportDIB::CreateWithHandle(handle));
diff --git a/ppapi/proxy/ppb_message_loop_proxy.cc b/ppapi/proxy/ppb_message_loop_proxy.cc
index 927e42f..12a48bb 100644
--- a/ppapi/proxy/ppb_message_loop_proxy.cc
+++ b/ppapi/proxy/ppb_message_loop_proxy.cc
@@ -86,7 +86,7 @@ class MessageLoopResource : public Resource, public PPB_MessageLoop_API {
};
MessageLoopResource::MessageLoopResource(PP_Instance instance)
- : Resource(HostResource::MakeInstanceOnly(instance)),
+ : Resource(OBJECT_IS_PROXY, instance),
nested_invocations_(0),
destroyed_(false),
should_destroy_(false) {
diff --git a/ppapi/proxy/ppb_pdf_proxy.cc b/ppapi/proxy/ppb_pdf_proxy.cc
index 7866e41..aee308f 100644
--- a/ppapi/proxy/ppb_pdf_proxy.cc
+++ b/ppapi/proxy/ppb_pdf_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.
@@ -27,7 +27,8 @@ namespace proxy {
class PrivateFontFile : public Resource,
public PPB_PDFFont_API {
public:
- PrivateFontFile(const HostResource& resource) : Resource(resource) {
+ PrivateFontFile(const HostResource& resource)
+ : Resource(OBJECT_IS_PROXY, resource) {
}
virtual ~PrivateFontFile() {}
diff --git a/ppapi/proxy/ppb_testing_proxy.cc b/ppapi/proxy/ppb_testing_proxy.cc
index 32d5215..9c0a14b 100644
--- a/ppapi/proxy/ppb_testing_proxy.cc
+++ b/ppapi/proxy/ppb_testing_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.
@@ -189,9 +189,7 @@ void PPB_Testing_Proxy::OnMsgSimulateInputEvent(
PP_Instance instance,
const InputEventData& input_event) {
scoped_refptr<PPB_InputEvent_Shared> input_event_impl(
- new PPB_InputEvent_Shared(PPB_InputEvent_Shared::InitAsProxy(),
- instance,
- input_event));
+ new PPB_InputEvent_Shared(OBJECT_IS_PROXY, instance, input_event));
ppb_testing_impl_->SimulateInputEvent(instance,
input_event_impl->pp_resource());
}
diff --git a/ppapi/proxy/ppb_url_loader_proxy.cc b/ppapi/proxy/ppb_url_loader_proxy.cc
index c896050..5303e42 100644
--- a/ppapi/proxy/ppb_url_loader_proxy.cc
+++ b/ppapi/proxy/ppb_url_loader_proxy.cc
@@ -157,7 +157,7 @@ class URLLoader : public Resource, public PPB_URLLoader_API {
};
URLLoader::URLLoader(const HostResource& resource)
- : Resource(resource),
+ : Resource(OBJECT_IS_PROXY, resource),
bytes_sent_(-1),
total_bytes_to_be_sent_(-1),
bytes_received_(-1),
diff --git a/ppapi/proxy/ppb_url_response_info_proxy.cc b/ppapi/proxy/ppb_url_response_info_proxy.cc
index c9da1ef7..c2f0942 100644
--- a/ppapi/proxy/ppb_url_response_info_proxy.cc
+++ b/ppapi/proxy/ppb_url_response_info_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.
@@ -39,7 +39,7 @@ class URLResponseInfo : public Resource, public PPB_URLResponseInfo_API {
};
URLResponseInfo::URLResponseInfo(const HostResource& resource)
- : Resource(resource) {
+ : Resource(OBJECT_IS_PROXY, resource) {
}
URLResponseInfo::~URLResponseInfo() {
diff --git a/ppapi/proxy/ppb_video_capture_proxy.cc b/ppapi/proxy/ppb_video_capture_proxy.cc
index 3df4de8..af39587 100644
--- a/ppapi/proxy/ppb_video_capture_proxy.cc
+++ b/ppapi/proxy/ppb_video_capture_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.
@@ -249,7 +249,7 @@ class VideoCapture : public ppapi::thunk::PPB_VideoCapture_API,
};
VideoCapture::VideoCapture(const HostResource& resource)
- : Resource(resource),
+ : Resource(OBJECT_IS_PROXY, resource),
status_(PP_VIDEO_CAPTURE_STATUS_STOPPED) {
}
diff --git a/ppapi/proxy/ppp_input_event_proxy.cc b/ppapi/proxy/ppp_input_event_proxy.cc
index cfce397..be58b3ce 100644
--- a/ppapi/proxy/ppp_input_event_proxy.cc
+++ b/ppapi/proxy/ppp_input_event_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.
@@ -97,7 +97,7 @@ bool PPP_InputEvent_Proxy::OnMessageReceived(const IPC::Message& msg) {
void PPP_InputEvent_Proxy::OnMsgHandleInputEvent(PP_Instance instance,
const InputEventData& data) {
scoped_refptr<PPB_InputEvent_Shared> resource(new PPB_InputEvent_Shared(
- PPB_InputEvent_Shared::InitAsProxy(), instance, data));
+ OBJECT_IS_PROXY, instance, data));
ppp_input_event_impl_->HandleInputEvent(instance, resource->pp_resource());
}
@@ -106,7 +106,7 @@ void PPP_InputEvent_Proxy::OnMsgHandleFilteredInputEvent(
const InputEventData& data,
PP_Bool* result) {
scoped_refptr<PPB_InputEvent_Shared> resource(new PPB_InputEvent_Shared(
- PPB_InputEvent_Shared::InitAsProxy(), instance, data));
+ OBJECT_IS_PROXY, instance, data));
*result = ppp_input_event_impl_->HandleInputEvent(instance,
resource->pp_resource());
}
diff --git a/ppapi/proxy/ppp_instance_proxy.cc b/ppapi/proxy/ppp_instance_proxy.cc
index 8ad8ae4..083cc91 100644
--- a/ppapi/proxy/ppp_instance_proxy.cc
+++ b/ppapi/proxy/ppp_instance_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.
@@ -239,7 +239,7 @@ void PPP_Instance_Proxy::OnPluginMsgDidChangeView(
ScopedPPResource resource(
ScopedPPResource::PassRef(),
- (new PPB_View_Shared(PPB_View_Shared::InitAsProxy(),
+ (new PPB_View_Shared(OBJECT_IS_PROXY,
instance, new_data))->GetReference());
combined_interface_->DidChangeView(instance, resource,
diff --git a/ppapi/proxy/ppp_instance_proxy_unittest.cc b/ppapi/proxy/ppp_instance_proxy_unittest.cc
index 6e53023..199cc51 100644
--- a/ppapi/proxy/ppp_instance_proxy_unittest.cc
+++ b/ppapi/proxy/ppp_instance_proxy_unittest.cc
@@ -164,7 +164,7 @@ TEST_F(PPP_Instance_ProxyTest, PPPInstance1_0) {
ResetReceived();
ScopedPPResource view_resource(
ScopedPPResource::PassRef(),
- (new PPB_View_Shared(PPB_View_Shared::InitAsImpl(),
+ (new PPB_View_Shared(OBJECT_IS_IMPL,
expected_instance, data))->GetReference());
ppp_instance->DidChangeView(expected_instance, view_resource);
did_change_view_called.Wait();
diff --git a/ppapi/proxy/resource_creation_proxy.cc b/ppapi/proxy/resource_creation_proxy.cc
index c77e3c6..5d8cd4d 100644
--- a/ppapi/proxy/resource_creation_proxy.cc
+++ b/ppapi/proxy/resource_creation_proxy.cc
@@ -76,8 +76,8 @@ PP_Resource ResourceCreationProxy::CreateAudioConfig(
PP_Instance instance,
PP_AudioSampleRate sample_rate,
uint32_t sample_frame_count) {
- return PPB_AudioConfig_Shared::CreateAsProxy(
- instance, sample_rate, sample_frame_count);
+ return PPB_AudioConfig_Shared::Create(
+ OBJECT_IS_PROXY, instance, sample_rate, sample_frame_count);
}
PP_Resource ResourceCreationProxy::CreateAudioTrusted(PP_Instance instance) {
@@ -162,8 +162,8 @@ PP_Resource ResourceCreationProxy::CreateFontObject(
PluginDispatcher::GetForInstance(instance);
if (!dispatcher)
return 0;
- return PPB_Font_Shared::CreateAsProxy(instance, *description,
- dispatcher->preferences());
+ return PPB_Font_Shared::Create(OBJECT_IS_PROXY, instance, *description,
+ dispatcher->preferences());
}
PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance,
@@ -205,7 +205,7 @@ PP_Resource ResourceCreationProxy::CreateKeyboardInputEvent(
data.character_text = text_str->value();
}
- return (new PPB_InputEvent_Shared(PPB_InputEvent_Shared::InitAsProxy(),
+ return (new PPB_InputEvent_Shared(OBJECT_IS_PROXY,
instance, data))->GetReference();
}
@@ -234,7 +234,7 @@ PP_Resource ResourceCreationProxy::CreateMouseInputEvent(
data.mouse_click_count = click_count;
data.mouse_movement = *mouse_movement;
- return (new PPB_InputEvent_Shared(PPB_InputEvent_Shared::InitAsProxy(),
+ return (new PPB_InputEvent_Shared(OBJECT_IS_PROXY,
instance, data))->GetReference();
}
@@ -260,7 +260,7 @@ PP_Resource ResourceCreationProxy::CreateResourceArray(
const PP_Resource elements[],
uint32_t size) {
PPB_ResourceArray_Shared* object = new PPB_ResourceArray_Shared(
- PPB_ResourceArray_Shared::InitAsProxy(), instance, elements, size);
+ OBJECT_IS_PROXY, instance, elements, size);
return object->GetReference();
}
@@ -294,8 +294,8 @@ PP_Resource ResourceCreationProxy::CreateURLLoader(PP_Instance instance) {
PP_Resource ResourceCreationProxy::CreateURLRequestInfo(
PP_Instance instance,
const PPB_URLRequestInfo_Data& data) {
- return (new PPB_URLRequestInfo_Shared(
- HostResource::MakeInstanceOnly(instance), data))->GetReference();
+ return (new PPB_URLRequestInfo_Shared(OBJECT_IS_PROXY,
+ instance, data))->GetReference();
}
PP_Resource ResourceCreationProxy::CreateVideoCapture(PP_Instance instance) {
@@ -337,7 +337,7 @@ PP_Resource ResourceCreationProxy::CreateWheelInputEvent(
data.wheel_ticks = *wheel_ticks;
data.wheel_scroll_by_page = PP_ToBool(scroll_by_page);
- return (new PPB_InputEvent_Shared(PPB_InputEvent_Shared::InitAsProxy(),
+ return (new PPB_InputEvent_Shared(OBJECT_IS_PROXY,
instance, data))->GetReference();
}