OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_time.h" | 10 #include "ppapi/c/pp_time.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 PP_Var relative, | 108 PP_Var relative, |
109 PP_URLComponents_Dev* components) OVERRIDE; | 109 PP_URLComponents_Dev* components) OVERRIDE; |
110 virtual PP_Bool DocumentCanRequest(PP_Instance instance, PP_Var url) OVERRIDE; | 110 virtual PP_Bool DocumentCanRequest(PP_Instance instance, PP_Var url) OVERRIDE; |
111 virtual PP_Bool DocumentCanAccessDocument(PP_Instance instance, | 111 virtual PP_Bool DocumentCanAccessDocument(PP_Instance instance, |
112 PP_Instance target) OVERRIDE; | 112 PP_Instance target) OVERRIDE; |
113 virtual PP_Var GetDocumentURL(PP_Instance instance, | 113 virtual PP_Var GetDocumentURL(PP_Instance instance, |
114 PP_URLComponents_Dev* components) OVERRIDE; | 114 PP_URLComponents_Dev* components) OVERRIDE; |
115 virtual PP_Var GetPluginInstanceURL( | 115 virtual PP_Var GetPluginInstanceURL( |
116 PP_Instance instance, | 116 PP_Instance instance, |
117 PP_URLComponents_Dev* components) OVERRIDE; | 117 PP_URLComponents_Dev* components) OVERRIDE; |
| 118 virtual void NeedKey(PP_Instance instance, |
| 119 PP_Var key_system, |
| 120 PP_Var session_id, |
| 121 PP_Var init_data) OVERRIDE; |
| 122 virtual void KeyAdded(PP_Instance instance, |
| 123 PP_Var key_system, |
| 124 PP_Var session_id) OVERRIDE; |
| 125 virtual void KeyMessage(PP_Instance instance, |
| 126 PP_Var key_system, |
| 127 PP_Var session_id, |
| 128 PP_Resource message, |
| 129 PP_Var default_url) OVERRIDE; |
| 130 virtual void KeyError(PP_Instance instance, |
| 131 PP_Var key_system, |
| 132 PP_Var session_id, |
| 133 int32_t media_error, |
| 134 int32_t system_code) OVERRIDE; |
| 135 virtual void DeliverBlock(PP_Instance instance, |
| 136 PP_Resource decrypted_block, |
| 137 int32_t request_id) OVERRIDE; |
| 138 virtual void DeliverFrame(PP_Instance instance, |
| 139 PP_Resource decrypted_frame, |
| 140 int32_t request_id) OVERRIDE; |
| 141 virtual void DeliverSamples(PP_Instance instance, |
| 142 PP_Resource decrypted_samples, |
| 143 int32_t request_id) OVERRIDE; |
118 #endif // !defined(OS_NACL) | 144 #endif // !defined(OS_NACL) |
119 | 145 |
120 static const ApiID kApiID = API_ID_PPB_INSTANCE; | 146 static const ApiID kApiID = API_ID_PPB_INSTANCE; |
121 | 147 |
122 private: | 148 private: |
123 // Plugin -> Host message handlers. | 149 // Plugin -> Host message handlers. |
124 void OnHostMsgGetWindowObject(PP_Instance instance, | 150 void OnHostMsgGetWindowObject(PP_Instance instance, |
125 SerializedVarReturnValue result); | 151 SerializedVarReturnValue result); |
126 void OnHostMsgGetOwnerElementObject(PP_Instance instance, | 152 void OnHostMsgGetOwnerElementObject(PP_Instance instance, |
127 SerializedVarReturnValue result); | 153 SerializedVarReturnValue result); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 void OnHostMsgSetTextInputType(PP_Instance instance, PP_TextInput_Type type); | 192 void OnHostMsgSetTextInputType(PP_Instance instance, PP_TextInput_Type type); |
167 void OnHostMsgUpdateCaretPosition(PP_Instance instance, | 193 void OnHostMsgUpdateCaretPosition(PP_Instance instance, |
168 const PP_Rect& caret, | 194 const PP_Rect& caret, |
169 const PP_Rect& bounding_box); | 195 const PP_Rect& bounding_box); |
170 void OnHostMsgCancelCompositionText(PP_Instance instance); | 196 void OnHostMsgCancelCompositionText(PP_Instance instance); |
171 void OnHostMsgUpdateSurroundingText( | 197 void OnHostMsgUpdateSurroundingText( |
172 PP_Instance instance, | 198 PP_Instance instance, |
173 const std::string& text, | 199 const std::string& text, |
174 uint32_t caret, | 200 uint32_t caret, |
175 uint32_t anchor); | 201 uint32_t anchor); |
| 202 |
176 #if !defined(OS_NACL) | 203 #if !defined(OS_NACL) |
177 void OnHostMsgResolveRelativeToDocument(PP_Instance instance, | 204 void OnHostMsgResolveRelativeToDocument(PP_Instance instance, |
178 SerializedVarReceiveInput relative, | 205 SerializedVarReceiveInput relative, |
179 SerializedVarReturnValue result); | 206 SerializedVarReturnValue result); |
180 void OnHostMsgDocumentCanRequest(PP_Instance instance, | 207 void OnHostMsgDocumentCanRequest(PP_Instance instance, |
181 SerializedVarReceiveInput url, | 208 SerializedVarReceiveInput url, |
182 PP_Bool* result); | 209 PP_Bool* result); |
183 void OnHostMsgDocumentCanAccessDocument(PP_Instance active, | 210 void OnHostMsgDocumentCanAccessDocument(PP_Instance active, |
184 PP_Instance target, | 211 PP_Instance target, |
185 PP_Bool* result); | 212 PP_Bool* result); |
186 void OnHostMsgGetDocumentURL(PP_Instance instance, | 213 void OnHostMsgGetDocumentURL(PP_Instance instance, |
187 SerializedVarReturnValue result); | 214 SerializedVarReturnValue result); |
188 void OnHostMsgGetPluginInstanceURL(PP_Instance instance, | 215 void OnHostMsgGetPluginInstanceURL(PP_Instance instance, |
189 SerializedVarReturnValue result); | 216 SerializedVarReturnValue result); |
| 217 virtual void OnHostMsgNeedKey(PP_Instance instance, |
| 218 SerializedVarReceiveInput key_system, |
| 219 SerializedVarReceiveInput session_id, |
| 220 SerializedVarReceiveInput init_data); |
| 221 virtual void OnHostMsgKeyAdded(PP_Instance instance, |
| 222 SerializedVarReceiveInput key_system, |
| 223 SerializedVarReceiveInput session_id); |
| 224 virtual void OnHostMsgKeyMessage(PP_Instance instance, |
| 225 SerializedVarReceiveInput key_system, |
| 226 SerializedVarReceiveInput session_id, |
| 227 PP_Resource message, |
| 228 SerializedVarReceiveInput default_url); |
| 229 virtual void OnHostMsgKeyError(PP_Instance instance, |
| 230 SerializedVarReceiveInput key_system, |
| 231 SerializedVarReceiveInput session_id, |
| 232 int32_t media_error, |
| 233 int32_t system_code); |
| 234 virtual void OnHostMsgDeliverBlock(PP_Instance instance, |
| 235 PP_Resource decrypted_block, |
| 236 int32_t request_id); |
| 237 virtual void OnHostMsgDeliverFrame(PP_Instance instance, |
| 238 PP_Resource decrypted_frame, |
| 239 int32_t request_id); |
| 240 virtual void OnHostMsgDeliverSamples(PP_Instance instance, |
| 241 PP_Resource decrypted_samples, |
| 242 int32_t request_id); |
190 #endif // !defined(OS_NACL) | 243 #endif // !defined(OS_NACL) |
191 | 244 |
192 // Host -> Plugin message handlers. | 245 // Host -> Plugin message handlers. |
193 void OnPluginMsgMouseLockComplete(PP_Instance instance, int32_t result); | 246 void OnPluginMsgMouseLockComplete(PP_Instance instance, int32_t result); |
194 | 247 |
195 void MouseLockCompleteInHost(int32_t result, PP_Instance instance); | 248 void MouseLockCompleteInHost(int32_t result, PP_Instance instance); |
196 | 249 |
197 ProxyCompletionCallbackFactory<PPB_Instance_Proxy> callback_factory_; | 250 ProxyCompletionCallbackFactory<PPB_Instance_Proxy> callback_factory_; |
198 }; | 251 }; |
199 | 252 |
200 } // namespace proxy | 253 } // namespace proxy |
201 } // namespace ppapi | 254 } // namespace ppapi |
202 | 255 |
203 #endif // PPAPI_PROXY_PPB_INSTANCE_PROXY_H_ | 256 #endif // PPAPI_PROXY_PPB_INSTANCE_PROXY_H_ |
OLD | NEW |