diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-13 04:00:33 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-13 04:00:33 +0000 |
commit | 37fe036a2c3e907a5790561e11292904426db144 (patch) | |
tree | 4b4c928830476c7450ffd5c69ca9f222ddbcfded /ppapi/proxy/ppb_var_deprecated_proxy.cc | |
parent | ad432d686c8529838448f6639130f1290db9d5a5 (diff) | |
download | chromium_src-37fe036a2c3e907a5790561e11292904426db144.zip chromium_src-37fe036a2c3e907a5790561e11292904426db144.tar.gz chromium_src-37fe036a2c3e907a5790561e11292904426db144.tar.bz2 |
Revert r100853, 100851. Win_shared build is broken.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100854 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/ppb_var_deprecated_proxy.cc')
-rw-r--r-- | ppapi/proxy/ppb_var_deprecated_proxy.cc | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/ppapi/proxy/ppb_var_deprecated_proxy.cc b/ppapi/proxy/ppb_var_deprecated_proxy.cc index 1850dc0f..396e50e 100644 --- a/ppapi/proxy/ppb_var_deprecated_proxy.cc +++ b/ppapi/proxy/ppb_var_deprecated_proxy.cc @@ -288,21 +288,18 @@ const PPB_Var_Deprecated var_deprecated_interface = { &CreateObject }; -InterfaceProxy* CreateVarDeprecatedProxy(Dispatcher* dispatcher) { - return new PPB_Var_Deprecated_Proxy(dispatcher ); +InterfaceProxy* CreateVarDeprecatedProxy(Dispatcher* dispatcher, + const void* target_interface) { + return new PPB_Var_Deprecated_Proxy(dispatcher, target_interface); } } // namespace PPB_Var_Deprecated_Proxy::PPB_Var_Deprecated_Proxy( - Dispatcher* dispatcher) - : InterfaceProxy(dispatcher), - task_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), - ppb_var_impl_(NULL) { - if (!dispatcher->IsPlugin()) { - ppb_var_impl_ = static_cast<const PPB_Var_Deprecated*>( - dispatcher->local_get_interface()(PPB_VAR_DEPRECATED_INTERFACE)); - } + Dispatcher* dispatcher, + const void* target_interface) + : InterfaceProxy(dispatcher, target_interface), + task_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { } PPB_Var_Deprecated_Proxy::~PPB_Var_Deprecated_Proxy() { @@ -363,7 +360,7 @@ void PPB_Var_Deprecated_Proxy::OnMsgAddRefObject(int64 object_id, PP_Var var; var.type = PP_VARTYPE_OBJECT; var.value.as_id = object_id; - ppb_var_impl_->AddRef(var); + ppb_var_target()->AddRef(var); } void PPB_Var_Deprecated_Proxy::OnMsgReleaseObject(int64 object_id) { @@ -396,7 +393,7 @@ void PPB_Var_Deprecated_Proxy::OnMsgHasProperty( SerializedVarOutParam exception, PP_Bool* result) { SetAllowPluginReentrancy(); - *result = PP_FromBool(ppb_var_impl_->HasProperty( + *result = PP_FromBool(ppb_var_target()->HasProperty( var.Get(dispatcher()), name.Get(dispatcher()), exception.OutParam(dispatcher()))); @@ -408,7 +405,7 @@ void PPB_Var_Deprecated_Proxy::OnMsgHasMethodDeprecated( SerializedVarOutParam exception, PP_Bool* result) { SetAllowPluginReentrancy(); - *result = PP_FromBool(ppb_var_impl_->HasMethod( + *result = PP_FromBool(ppb_var_target()->HasMethod( var.Get(dispatcher()), name.Get(dispatcher()), exception.OutParam(dispatcher()))); @@ -420,7 +417,7 @@ void PPB_Var_Deprecated_Proxy::OnMsgGetProperty( SerializedVarOutParam exception, SerializedVarReturnValue result) { SetAllowPluginReentrancy(); - result.Return(dispatcher(), ppb_var_impl_->GetProperty( + result.Return(dispatcher(), ppb_var_target()->GetProperty( var.Get(dispatcher()), name.Get(dispatcher()), exception.OutParam(dispatcher()))); } @@ -430,7 +427,7 @@ void PPB_Var_Deprecated_Proxy::OnMsgEnumerateProperties( SerializedVarVectorOutParam props, SerializedVarOutParam exception) { SetAllowPluginReentrancy(); - ppb_var_impl_->GetAllPropertyNames(var.Get(dispatcher()), + ppb_var_target()->GetAllPropertyNames(var.Get(dispatcher()), props.CountOutParam(), props.ArrayOutParam(dispatcher()), exception.OutParam(dispatcher())); } @@ -441,7 +438,7 @@ void PPB_Var_Deprecated_Proxy::OnMsgSetPropertyDeprecated( SerializedVarReceiveInput value, SerializedVarOutParam exception) { SetAllowPluginReentrancy(); - ppb_var_impl_->SetProperty(var.Get(dispatcher()), + ppb_var_target()->SetProperty(var.Get(dispatcher()), name.Get(dispatcher()), value.Get(dispatcher()), exception.OutParam(dispatcher())); @@ -453,7 +450,7 @@ void PPB_Var_Deprecated_Proxy::OnMsgDeleteProperty( SerializedVarOutParam exception, PP_Bool* result) { SetAllowPluginReentrancy(); - ppb_var_impl_->RemoveProperty(var.Get(dispatcher()), + ppb_var_target()->RemoveProperty(var.Get(dispatcher()), name.Get(dispatcher()), exception.OutParam(dispatcher())); // This deprecated function doesn't actually return a value, but we re-use @@ -470,7 +467,7 @@ void PPB_Var_Deprecated_Proxy::OnMsgCallDeprecated( SetAllowPluginReentrancy(); uint32_t arg_count = 0; PP_Var* args = arg_vector.Get(dispatcher(), &arg_count); - result.Return(dispatcher(), ppb_var_impl_->Call( + result.Return(dispatcher(), ppb_var_target()->Call( object.Get(dispatcher()), method_name.Get(dispatcher()), arg_count, args, @@ -485,7 +482,7 @@ void PPB_Var_Deprecated_Proxy::OnMsgConstruct( SetAllowPluginReentrancy(); uint32_t arg_count = 0; PP_Var* args = arg_vector.Get(dispatcher(), &arg_count); - result.Return(dispatcher(), ppb_var_impl_->Construct( + result.Return(dispatcher(), ppb_var_target()->Construct( var.Get(dispatcher()), arg_count, args, exception.OutParam(dispatcher()))); } @@ -505,7 +502,7 @@ void PPB_Var_Deprecated_Proxy::OnMsgCreateObjectDeprecated( SerializedVarReturnValue result) { SetAllowPluginReentrancy(); result.Return(dispatcher(), PPP_Class_Proxy::CreateProxiedObject( - ppb_var_impl_, dispatcher(), instance, ppp_class, class_data)); + ppb_var_target(), dispatcher(), instance, ppp_class, class_data)); } void PPB_Var_Deprecated_Proxy::SetAllowPluginReentrancy() { @@ -519,7 +516,7 @@ void PPB_Var_Deprecated_Proxy::DoReleaseObject(int64 object_id) { PP_Var var; var.type = PP_VARTYPE_OBJECT; var.value.as_id = object_id; - ppb_var_impl_->Release(var); + ppb_var_target()->Release(var); } } // namespace proxy |