| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef PPAPI_PROXY_PPB_INSTANCE_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPB_INSTANCE_PROXY_H_ |
| 6 #define PPAPI_PROXY_PPB_INSTANCE_PROXY_H_ | 6 #define PPAPI_PROXY_PPB_INSTANCE_PROXY_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_instance.h" | 8 #include "ppapi/c/pp_instance.h" |
| 9 #include "ppapi/c/pp_resource.h" | 9 #include "ppapi/c/pp_resource.h" |
| 10 #include "ppapi/c/pp_var.h" | 10 #include "ppapi/c/pp_var.h" |
| 11 #include "ppapi/cpp/completion_callback.h" |
| 11 #include "ppapi/proxy/interface_proxy.h" | 12 #include "ppapi/proxy/interface_proxy.h" |
| 13 #include "ppapi/proxy/proxy_non_thread_safe_ref_count.h" |
| 12 #include "ppapi/shared_impl/function_group_base.h" | 14 #include "ppapi/shared_impl/function_group_base.h" |
| 13 #include "ppapi/shared_impl/host_resource.h" | 15 #include "ppapi/shared_impl/host_resource.h" |
| 14 #include "ppapi/shared_impl/instance_impl.h" | 16 #include "ppapi/shared_impl/instance_impl.h" |
| 15 #include "ppapi/thunk/ppb_instance_api.h" | 17 #include "ppapi/thunk/ppb_instance_api.h" |
| 16 | 18 |
| 17 namespace ppapi { | 19 namespace ppapi { |
| 18 namespace proxy { | 20 namespace proxy { |
| 19 | 21 |
| 20 class SerializedVarReceiveInput; | 22 class SerializedVarReceiveInput; |
| 21 class SerializedVarOutParam; | 23 class SerializedVarOutParam; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 PP_Instance instance, | 94 PP_Instance instance, |
| 93 PP_URLComponents_Dev* components) OVERRIDE; | 95 PP_URLComponents_Dev* components) OVERRIDE; |
| 94 virtual void PostMessage(PP_Instance instance, PP_Var message) OVERRIDE; | 96 virtual void PostMessage(PP_Instance instance, PP_Var message) OVERRIDE; |
| 95 virtual int32_t LockMouse(PP_Instance instance, | 97 virtual int32_t LockMouse(PP_Instance instance, |
| 96 PP_CompletionCallback callback) OVERRIDE; | 98 PP_CompletionCallback callback) OVERRIDE; |
| 97 virtual void UnlockMouse(PP_Instance instance) OVERRIDE; | 99 virtual void UnlockMouse(PP_Instance instance) OVERRIDE; |
| 98 | 100 |
| 99 static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_INSTANCE; | 101 static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_INSTANCE; |
| 100 | 102 |
| 101 private: | 103 private: |
| 102 // Message handlers. | 104 // Plugin -> Host message handlers. |
| 103 void OnMsgGetWindowObject(PP_Instance instance, | 105 void OnMsgGetWindowObject(PP_Instance instance, |
| 104 SerializedVarReturnValue result); | 106 SerializedVarReturnValue result); |
| 105 void OnMsgGetOwnerElementObject(PP_Instance instance, | 107 void OnMsgGetOwnerElementObject(PP_Instance instance, |
| 106 SerializedVarReturnValue result); | 108 SerializedVarReturnValue result); |
| 107 void OnMsgBindGraphics(PP_Instance instance, | 109 void OnMsgBindGraphics(PP_Instance instance, |
| 108 const ppapi::HostResource& device, | 110 const ppapi::HostResource& device, |
| 109 PP_Bool* result); | 111 PP_Bool* result); |
| 110 void OnMsgIsFullFrame(PP_Instance instance, PP_Bool* result); | 112 void OnMsgIsFullFrame(PP_Instance instance, PP_Bool* result); |
| 111 void OnMsgExecuteScript(PP_Instance instance, | 113 void OnMsgExecuteScript(PP_Instance instance, |
| 112 SerializedVarReceiveInput script, | 114 SerializedVarReceiveInput script, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 133 void OnMsgFlashGetScreenSize(PP_Instance instance, | 135 void OnMsgFlashGetScreenSize(PP_Instance instance, |
| 134 PP_Bool* result, | 136 PP_Bool* result, |
| 135 PP_Size* size); | 137 PP_Size* size); |
| 136 void OnMsgRequestInputEvents(PP_Instance instance, | 138 void OnMsgRequestInputEvents(PP_Instance instance, |
| 137 bool is_filtering, | 139 bool is_filtering, |
| 138 uint32_t event_classes); | 140 uint32_t event_classes); |
| 139 void OnMsgClearInputEvents(PP_Instance instance, | 141 void OnMsgClearInputEvents(PP_Instance instance, |
| 140 uint32_t event_classes); | 142 uint32_t event_classes); |
| 141 void OnMsgPostMessage(PP_Instance instance, | 143 void OnMsgPostMessage(PP_Instance instance, |
| 142 SerializedVarReceiveInput message); | 144 SerializedVarReceiveInput message); |
| 143 void OnMsgLockMouse(PP_Instance instance, | 145 void OnMsgLockMouse(PP_Instance instance); |
| 144 uint32_t serialized_callback); | |
| 145 void OnMsgUnlockMouse(PP_Instance instance); | 146 void OnMsgUnlockMouse(PP_Instance instance); |
| 146 void OnMsgResolveRelativeToDocument(PP_Instance instance, | 147 void OnMsgResolveRelativeToDocument(PP_Instance instance, |
| 147 SerializedVarReceiveInput relative, | 148 SerializedVarReceiveInput relative, |
| 148 SerializedVarReturnValue result); | 149 SerializedVarReturnValue result); |
| 149 void OnMsgDocumentCanRequest(PP_Instance instance, | 150 void OnMsgDocumentCanRequest(PP_Instance instance, |
| 150 SerializedVarReceiveInput url, | 151 SerializedVarReceiveInput url, |
| 151 PP_Bool* result); | 152 PP_Bool* result); |
| 152 void OnMsgDocumentCanAccessDocument(PP_Instance active, | 153 void OnMsgDocumentCanAccessDocument(PP_Instance active, |
| 153 PP_Instance target, | 154 PP_Instance target, |
| 154 PP_Bool* result); | 155 PP_Bool* result); |
| 155 void OnMsgGetDocumentURL(PP_Instance instance, | 156 void OnMsgGetDocumentURL(PP_Instance instance, |
| 156 SerializedVarReturnValue result); | 157 SerializedVarReturnValue result); |
| 157 void OnMsgGetPluginInstanceURL(PP_Instance instance, | 158 void OnMsgGetPluginInstanceURL(PP_Instance instance, |
| 158 SerializedVarReturnValue result); | 159 SerializedVarReturnValue result); |
| 160 |
| 161 // Host -> Plugin message handlers. |
| 162 void OnMsgMouseLockComplete(PP_Instance instance, int32_t result); |
| 163 |
| 164 void MouseLockCompleteInHost(int32_t result, PP_Instance instance); |
| 165 |
| 166 pp::CompletionCallbackFactory<PPB_Instance_Proxy, |
| 167 ProxyNonThreadSafeRefCount> callback_factory_; |
| 159 }; | 168 }; |
| 160 | 169 |
| 161 } // namespace proxy | 170 } // namespace proxy |
| 162 } // namespace ppapi | 171 } // namespace ppapi |
| 163 | 172 |
| 164 #endif // PPAPI_PROXY_PPB_INSTANCE_PROXY_H_ | 173 #endif // PPAPI_PROXY_PPB_INSTANCE_PROXY_H_ |
| OLD | NEW |