| Index: ppapi/proxy/ppb_instance_proxy.cc
|
| ===================================================================
|
| --- ppapi/proxy/ppb_instance_proxy.cc (revision 100753)
|
| +++ ppapi/proxy/ppb_instance_proxy.cc (working copy)
|
| @@ -32,22 +32,70 @@
|
|
|
| namespace {
|
|
|
| -typedef EnterFunctionNoLock<PPB_Instance_FunctionAPI> EnterInstanceNoLock;
|
| -
|
| -InterfaceProxy* CreateInstanceProxy(Dispatcher* dispatcher) {
|
| - return new PPB_Instance_Proxy(dispatcher);
|
| +InterfaceProxy* CreateInstanceProxy(Dispatcher* dispatcher,
|
| + const void* target_interface) {
|
| + return new PPB_Instance_Proxy(dispatcher, target_interface);
|
| }
|
|
|
| } // namespace
|
|
|
| -PPB_Instance_Proxy::PPB_Instance_Proxy(Dispatcher* dispatcher)
|
| - : InterfaceProxy(dispatcher) {
|
| +PPB_Instance_Proxy::PPB_Instance_Proxy(Dispatcher* dispatcher,
|
| + const void* target_interface)
|
| + : InterfaceProxy(dispatcher, target_interface) {
|
| }
|
|
|
| PPB_Instance_Proxy::~PPB_Instance_Proxy() {
|
| }
|
|
|
| // static
|
| +const InterfaceProxy::Info* PPB_Instance_Proxy::GetInfo0_5() {
|
| + static const Info info = {
|
| + ppapi::thunk::GetPPB_Instance_1_0_Thunk(),
|
| + PPB_INSTANCE_INTERFACE_0_5,
|
| + INTERFACE_ID_NONE, // 1_0 is the canonical one.
|
| + false,
|
| + &CreateInstanceProxy,
|
| + };
|
| + return &info;
|
| +}
|
| +
|
| +// static
|
| +const InterfaceProxy::Info* PPB_Instance_Proxy::GetInfo1_0() {
|
| + static const Info info = {
|
| + ppapi::thunk::GetPPB_Instance_1_0_Thunk(),
|
| + PPB_INSTANCE_INTERFACE_1_0,
|
| + INTERFACE_ID_PPB_INSTANCE,
|
| + false,
|
| + &CreateInstanceProxy,
|
| + };
|
| + return &info;
|
| +}
|
| +
|
| +// static
|
| +const InterfaceProxy::Info* PPB_Instance_Proxy::GetInfoMessaging() {
|
| + static const Info info = {
|
| + ppapi::thunk::GetPPB_Messaging_Thunk(),
|
| + PPB_MESSAGING_INTERFACE,
|
| + INTERFACE_ID_NONE, // 1_0 is the canonical one.
|
| + false,
|
| + &CreateInstanceProxy,
|
| + };
|
| + return &info;
|
| +}
|
| +
|
| +// static
|
| +const InterfaceProxy::Info* PPB_Instance_Proxy::GetInfoMouseLock() {
|
| + static const Info info = {
|
| + ppapi::thunk::GetPPB_MouseLock_Thunk(),
|
| + PPB_MOUSELOCK_DEV_INTERFACE,
|
| + INTERFACE_ID_NONE, // 1_0 is the canonical one.
|
| + false,
|
| + &CreateInstanceProxy,
|
| + };
|
| + return &info;
|
| +}
|
| +
|
| +// static
|
| const InterfaceProxy::Info* PPB_Instance_Proxy::GetInfoPrivate() {
|
| static const Info info = {
|
| ppapi::thunk::GetPPB_Instance_Private_Thunk(),
|
| @@ -90,10 +138,6 @@
|
| OnMsgIsFullFrame)
|
| IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_ExecuteScript,
|
| OnMsgExecuteScript)
|
| - IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_Log,
|
| - OnMsgLog)
|
| - IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_LogWithSource,
|
| - OnMsgLogWithSource)
|
| IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_PostMessage,
|
| OnMsgPostMessage)
|
| IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SetFullscreen,
|
| @@ -165,24 +209,6 @@
|
| return result.Return(dispatcher());
|
| }
|
|
|
| -void PPB_Instance_Proxy::Log(PP_Instance instance,
|
| - int log_level,
|
| - PP_Var value) {
|
| - dispatcher()->Send(new PpapiHostMsg_PPBInstance_Log(
|
| - INTERFACE_ID_PPB_INSTANCE, instance, static_cast<int>(log_level),
|
| - SerializedVarSendInput(dispatcher(), value)));
|
| -}
|
| -
|
| -void PPB_Instance_Proxy::LogWithSource(PP_Instance instance,
|
| - int log_level,
|
| - PP_Var source,
|
| - PP_Var value) {
|
| - dispatcher()->Send(new PpapiHostMsg_PPBInstance_LogWithSource(
|
| - INTERFACE_ID_PPB_INSTANCE, instance, static_cast<int>(log_level),
|
| - SerializedVarSendInput(dispatcher(), source),
|
| - SerializedVarSendInput(dispatcher(), value)));
|
| -}
|
| -
|
| PP_Bool PPB_Instance_Proxy::IsFullscreen(PP_Instance instance) {
|
| InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())->
|
| GetInstanceData(instance);
|
| @@ -279,7 +305,7 @@
|
| void PPB_Instance_Proxy::OnMsgGetWindowObject(
|
| PP_Instance instance,
|
| SerializedVarReturnValue result) {
|
| - EnterInstanceNoLock enter(instance, false);
|
| + EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false);
|
| if (enter.succeeded())
|
| result.Return(dispatcher(), enter.functions()->GetWindowObject(instance));
|
| }
|
| @@ -287,7 +313,7 @@
|
| void PPB_Instance_Proxy::OnMsgGetOwnerElementObject(
|
| PP_Instance instance,
|
| SerializedVarReturnValue result) {
|
| - EnterInstanceNoLock enter(instance, false);
|
| + EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false);
|
| if (enter.succeeded()) {
|
| result.Return(dispatcher(),
|
| enter.functions()->GetOwnerElementObject(instance));
|
| @@ -297,7 +323,7 @@
|
| void PPB_Instance_Proxy::OnMsgBindGraphics(PP_Instance instance,
|
| const HostResource& device,
|
| PP_Bool* result) {
|
| - EnterInstanceNoLock enter(instance, false);
|
| + EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false);
|
| if (enter.succeeded()) {
|
| *result = enter.functions()->BindGraphics(instance,
|
| device.host_resource());
|
| @@ -306,7 +332,7 @@
|
|
|
| void PPB_Instance_Proxy::OnMsgIsFullFrame(PP_Instance instance,
|
| PP_Bool* result) {
|
| - EnterInstanceNoLock enter(instance, false);
|
| + EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false);
|
| if (enter.succeeded())
|
| *result = enter.functions()->IsFullFrame(instance);
|
| }
|
| @@ -316,7 +342,7 @@
|
| SerializedVarReceiveInput script,
|
| SerializedVarOutParam out_exception,
|
| SerializedVarReturnValue result) {
|
| - EnterInstanceNoLock enter(instance, false);
|
| + EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false);
|
| if (enter.failed())
|
| return;
|
|
|
| @@ -331,30 +357,10 @@
|
| out_exception.OutParam(dispatcher())));
|
| }
|
|
|
| -void PPB_Instance_Proxy::OnMsgLog(PP_Instance instance,
|
| - int log_level,
|
| - SerializedVarReceiveInput value) {
|
| - EnterInstanceNoLock enter(instance, false);
|
| - if (enter.succeeded())
|
| - enter.functions()->Log(instance, log_level, value.Get(dispatcher()));
|
| -}
|
| -
|
| -void PPB_Instance_Proxy::OnMsgLogWithSource(PP_Instance instance,
|
| - int log_level,
|
| - SerializedVarReceiveInput source,
|
| - SerializedVarReceiveInput value) {
|
| - EnterInstanceNoLock enter(instance, false);
|
| - if (enter.succeeded()) {
|
| - enter.functions()->LogWithSource(instance, log_level,
|
| - source.Get(dispatcher()),
|
| - value.Get(dispatcher()));
|
| - }
|
| -}
|
| -
|
| void PPB_Instance_Proxy::OnMsgSetFullscreen(PP_Instance instance,
|
| PP_Bool fullscreen,
|
| PP_Bool* result) {
|
| - EnterInstanceNoLock enter(instance, false);
|
| + EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false);
|
| if (enter.succeeded())
|
| *result = enter.functions()->SetFullscreen(instance, fullscreen);
|
| }
|
| @@ -362,7 +368,7 @@
|
| void PPB_Instance_Proxy::OnMsgGetScreenSize(PP_Instance instance,
|
| PP_Bool* result,
|
| PP_Size* size) {
|
| - EnterInstanceNoLock enter(instance, false);
|
| + EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false);
|
| if (enter.succeeded())
|
| *result = enter.functions()->GetScreenSize(instance, size);
|
| }
|
| @@ -370,7 +376,7 @@
|
| void PPB_Instance_Proxy::OnMsgRequestInputEvents(PP_Instance instance,
|
| bool is_filtering,
|
| uint32_t event_classes) {
|
| - EnterInstanceNoLock enter(instance, false);
|
| + EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false);
|
| if (enter.succeeded()) {
|
| if (is_filtering)
|
| enter.functions()->RequestFilteringInputEvents(instance, event_classes);
|
| @@ -381,14 +387,14 @@
|
|
|
| void PPB_Instance_Proxy::OnMsgClearInputEvents(PP_Instance instance,
|
| uint32_t event_classes) {
|
| - EnterInstanceNoLock enter(instance, false);
|
| + EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false);
|
| if (enter.succeeded())
|
| enter.functions()->ClearInputEventRequest(instance, event_classes);
|
| }
|
|
|
| void PPB_Instance_Proxy::OnMsgPostMessage(PP_Instance instance,
|
| SerializedVarReceiveInput message) {
|
| - EnterInstanceNoLock enter(instance, false);
|
| + EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false);
|
| if (enter.succeeded())
|
| enter.functions()->PostMessage(instance, message.Get(dispatcher()));
|
| }
|
|
|