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 #include "ppapi/proxy/ppb_instance_proxy.h" | 5 #include "ppapi/proxy/ppb_instance_proxy.h" |
6 | 6 |
7 #include "ppapi/c/pp_errors.h" | 7 #include "ppapi/c/pp_errors.h" |
8 #include "ppapi/c/pp_var.h" | 8 #include "ppapi/c/pp_var.h" |
9 #include "ppapi/c/ppb_instance.h" | 9 #include "ppapi/c/ppb_instance.h" |
10 #include "ppapi/c/ppb_messaging.h" | 10 #include "ppapi/c/ppb_messaging.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 } | 45 } |
46 | 46 |
47 PPB_Instance_Proxy::~PPB_Instance_Proxy() { | 47 PPB_Instance_Proxy::~PPB_Instance_Proxy() { |
48 } | 48 } |
49 | 49 |
50 // static | 50 // static |
51 const InterfaceProxy::Info* PPB_Instance_Proxy::GetInfoPrivate() { | 51 const InterfaceProxy::Info* PPB_Instance_Proxy::GetInfoPrivate() { |
52 static const Info info = { | 52 static const Info info = { |
53 ppapi::thunk::GetPPB_Instance_Private_Thunk(), | 53 ppapi::thunk::GetPPB_Instance_Private_Thunk(), |
54 PPB_INSTANCE_PRIVATE_INTERFACE, | 54 PPB_INSTANCE_PRIVATE_INTERFACE, |
55 INTERFACE_ID_NONE, // 1_0 is the canonical one. | 55 API_ID_NONE, // 1_0 is the canonical one. |
56 false, | 56 false, |
57 &CreateInstanceProxy, | 57 &CreateInstanceProxy, |
58 }; | 58 }; |
59 return &info; | 59 return &info; |
60 } | 60 } |
61 | 61 |
62 bool PPB_Instance_Proxy::OnMessageReceived(const IPC::Message& msg) { | 62 bool PPB_Instance_Proxy::OnMessageReceived(const IPC::Message& msg) { |
63 // Prevent the dispatcher from going away during a call to ExecuteScript. | 63 // Prevent the dispatcher from going away during a call to ExecuteScript. |
64 // This must happen OUTSIDE of ExecuteScript since the SerializedVars use | 64 // This must happen OUTSIDE of ExecuteScript since the SerializedVars use |
65 // the dispatcher upon return of the function (converting the | 65 // the dispatcher upon return of the function (converting the |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 123 |
124 PP_Bool PPB_Instance_Proxy::BindGraphics(PP_Instance instance, | 124 PP_Bool PPB_Instance_Proxy::BindGraphics(PP_Instance instance, |
125 PP_Resource device) { | 125 PP_Resource device) { |
126 Resource* object = | 126 Resource* object = |
127 PpapiGlobals::Get()->GetResourceTracker()->GetResource(device); | 127 PpapiGlobals::Get()->GetResourceTracker()->GetResource(device); |
128 if (!object || object->pp_instance() != instance) | 128 if (!object || object->pp_instance() != instance) |
129 return PP_FALSE; | 129 return PP_FALSE; |
130 | 130 |
131 PP_Bool result = PP_FALSE; | 131 PP_Bool result = PP_FALSE; |
132 dispatcher()->Send(new PpapiHostMsg_PPBInstance_BindGraphics( | 132 dispatcher()->Send(new PpapiHostMsg_PPBInstance_BindGraphics( |
133 INTERFACE_ID_PPB_INSTANCE, instance, object->host_resource(), | 133 API_ID_PPB_INSTANCE, instance, object->host_resource(), |
134 &result)); | 134 &result)); |
135 return result; | 135 return result; |
136 } | 136 } |
137 | 137 |
138 PP_Bool PPB_Instance_Proxy::IsFullFrame(PP_Instance instance) { | 138 PP_Bool PPB_Instance_Proxy::IsFullFrame(PP_Instance instance) { |
139 PP_Bool result = PP_FALSE; | 139 PP_Bool result = PP_FALSE; |
140 dispatcher()->Send(new PpapiHostMsg_PPBInstance_IsFullFrame( | 140 dispatcher()->Send(new PpapiHostMsg_PPBInstance_IsFullFrame( |
141 INTERFACE_ID_PPB_INSTANCE, instance, &result)); | 141 API_ID_PPB_INSTANCE, instance, &result)); |
142 return result; | 142 return result; |
143 } | 143 } |
144 | 144 |
145 PP_Var PPB_Instance_Proxy::GetWindowObject(PP_Instance instance) { | 145 PP_Var PPB_Instance_Proxy::GetWindowObject(PP_Instance instance) { |
146 ReceiveSerializedVarReturnValue result; | 146 ReceiveSerializedVarReturnValue result; |
147 dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetWindowObject( | 147 dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetWindowObject( |
148 INTERFACE_ID_PPB_INSTANCE, instance, &result)); | 148 API_ID_PPB_INSTANCE, instance, &result)); |
149 return result.Return(dispatcher()); | 149 return result.Return(dispatcher()); |
150 } | 150 } |
151 | 151 |
152 PP_Var PPB_Instance_Proxy::GetOwnerElementObject(PP_Instance instance) { | 152 PP_Var PPB_Instance_Proxy::GetOwnerElementObject(PP_Instance instance) { |
153 ReceiveSerializedVarReturnValue result; | 153 ReceiveSerializedVarReturnValue result; |
154 dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetOwnerElementObject( | 154 dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetOwnerElementObject( |
155 INTERFACE_ID_PPB_INSTANCE, instance, &result)); | 155 API_ID_PPB_INSTANCE, instance, &result)); |
156 return result.Return(dispatcher()); | 156 return result.Return(dispatcher()); |
157 } | 157 } |
158 | 158 |
159 PP_Var PPB_Instance_Proxy::ExecuteScript(PP_Instance instance, | 159 PP_Var PPB_Instance_Proxy::ExecuteScript(PP_Instance instance, |
160 PP_Var script, | 160 PP_Var script, |
161 PP_Var* exception) { | 161 PP_Var* exception) { |
162 ReceiveSerializedException se(dispatcher(), exception); | 162 ReceiveSerializedException se(dispatcher(), exception); |
163 if (se.IsThrown()) | 163 if (se.IsThrown()) |
164 return PP_MakeUndefined(); | 164 return PP_MakeUndefined(); |
165 | 165 |
166 ReceiveSerializedVarReturnValue result; | 166 ReceiveSerializedVarReturnValue result; |
167 dispatcher()->Send(new PpapiHostMsg_PPBInstance_ExecuteScript( | 167 dispatcher()->Send(new PpapiHostMsg_PPBInstance_ExecuteScript( |
168 INTERFACE_ID_PPB_INSTANCE, instance, | 168 API_ID_PPB_INSTANCE, instance, |
169 SerializedVarSendInput(dispatcher(), script), &se, &result)); | 169 SerializedVarSendInput(dispatcher(), script), &se, &result)); |
170 return result.Return(dispatcher()); | 170 return result.Return(dispatcher()); |
171 } | 171 } |
172 | 172 |
173 PP_Var PPB_Instance_Proxy::GetDefaultCharSet(PP_Instance instance) { | 173 PP_Var PPB_Instance_Proxy::GetDefaultCharSet(PP_Instance instance) { |
174 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); | 174 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); |
175 if (!dispatcher) | 175 if (!dispatcher) |
176 return PP_MakeUndefined(); | 176 return PP_MakeUndefined(); |
177 | 177 |
178 ReceiveSerializedVarReturnValue result; | 178 ReceiveSerializedVarReturnValue result; |
179 dispatcher->Send(new PpapiHostMsg_PPBInstance_GetDefaultCharSet( | 179 dispatcher->Send(new PpapiHostMsg_PPBInstance_GetDefaultCharSet( |
180 INTERFACE_ID_PPB_INSTANCE, instance, &result)); | 180 API_ID_PPB_INSTANCE, instance, &result)); |
181 return result.Return(dispatcher); | 181 return result.Return(dispatcher); |
182 } | 182 } |
183 | 183 |
184 void PPB_Instance_Proxy::Log(PP_Instance instance, | 184 void PPB_Instance_Proxy::Log(PP_Instance instance, |
185 int log_level, | 185 int log_level, |
186 PP_Var value) { | 186 PP_Var value) { |
187 dispatcher()->Send(new PpapiHostMsg_PPBInstance_Log( | 187 dispatcher()->Send(new PpapiHostMsg_PPBInstance_Log( |
188 INTERFACE_ID_PPB_INSTANCE, instance, static_cast<int>(log_level), | 188 API_ID_PPB_INSTANCE, instance, static_cast<int>(log_level), |
189 SerializedVarSendInput(dispatcher(), value))); | 189 SerializedVarSendInput(dispatcher(), value))); |
190 } | 190 } |
191 | 191 |
192 void PPB_Instance_Proxy::LogWithSource(PP_Instance instance, | 192 void PPB_Instance_Proxy::LogWithSource(PP_Instance instance, |
193 int log_level, | 193 int log_level, |
194 PP_Var source, | 194 PP_Var source, |
195 PP_Var value) { | 195 PP_Var value) { |
196 dispatcher()->Send(new PpapiHostMsg_PPBInstance_LogWithSource( | 196 dispatcher()->Send(new PpapiHostMsg_PPBInstance_LogWithSource( |
197 INTERFACE_ID_PPB_INSTANCE, instance, static_cast<int>(log_level), | 197 API_ID_PPB_INSTANCE, instance, static_cast<int>(log_level), |
198 SerializedVarSendInput(dispatcher(), source), | 198 SerializedVarSendInput(dispatcher(), source), |
199 SerializedVarSendInput(dispatcher(), value))); | 199 SerializedVarSendInput(dispatcher(), value))); |
200 } | 200 } |
201 | 201 |
202 void PPB_Instance_Proxy::NumberOfFindResultsChanged(PP_Instance instance, | 202 void PPB_Instance_Proxy::NumberOfFindResultsChanged(PP_Instance instance, |
203 int32_t total, | 203 int32_t total, |
204 PP_Bool final_result) { | 204 PP_Bool final_result) { |
205 NOTIMPLEMENTED(); // Not proxied yet. | 205 NOTIMPLEMENTED(); // Not proxied yet. |
206 } | 206 } |
207 | 207 |
(...skipping 15 matching lines...) Expand all Loading... |
223 GetInstanceData(instance); | 223 GetInstanceData(instance); |
224 if (!data) | 224 if (!data) |
225 return PP_FALSE; | 225 return PP_FALSE; |
226 return data->flash_fullscreen; | 226 return data->flash_fullscreen; |
227 } | 227 } |
228 | 228 |
229 PP_Bool PPB_Instance_Proxy::SetFullscreen(PP_Instance instance, | 229 PP_Bool PPB_Instance_Proxy::SetFullscreen(PP_Instance instance, |
230 PP_Bool fullscreen) { | 230 PP_Bool fullscreen) { |
231 PP_Bool result = PP_FALSE; | 231 PP_Bool result = PP_FALSE; |
232 dispatcher()->Send(new PpapiHostMsg_PPBInstance_SetFullscreen( | 232 dispatcher()->Send(new PpapiHostMsg_PPBInstance_SetFullscreen( |
233 INTERFACE_ID_PPB_INSTANCE, instance, fullscreen, &result)); | 233 API_ID_PPB_INSTANCE, instance, fullscreen, &result)); |
234 return result; | 234 return result; |
235 } | 235 } |
236 | 236 |
237 PP_Bool PPB_Instance_Proxy::FlashSetFullscreen(PP_Instance instance, | 237 PP_Bool PPB_Instance_Proxy::FlashSetFullscreen(PP_Instance instance, |
238 PP_Bool fullscreen) { | 238 PP_Bool fullscreen) { |
239 PP_Bool result = PP_FALSE; | 239 PP_Bool result = PP_FALSE; |
240 dispatcher()->Send(new PpapiHostMsg_PPBInstance_FlashSetFullscreen( | 240 dispatcher()->Send(new PpapiHostMsg_PPBInstance_FlashSetFullscreen( |
241 INTERFACE_ID_PPB_INSTANCE, instance, fullscreen, &result)); | 241 API_ID_PPB_INSTANCE, instance, fullscreen, &result)); |
242 return result; | 242 return result; |
243 } | 243 } |
244 | 244 |
245 PP_Bool PPB_Instance_Proxy::GetScreenSize(PP_Instance instance, | 245 PP_Bool PPB_Instance_Proxy::GetScreenSize(PP_Instance instance, |
246 PP_Size* size) { | 246 PP_Size* size) { |
247 PP_Bool result = PP_FALSE; | 247 PP_Bool result = PP_FALSE; |
248 dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetScreenSize( | 248 dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetScreenSize( |
249 INTERFACE_ID_PPB_INSTANCE, instance, &result, size)); | 249 API_ID_PPB_INSTANCE, instance, &result, size)); |
250 return result; | 250 return result; |
251 } | 251 } |
252 | 252 |
253 PP_Bool PPB_Instance_Proxy::FlashGetScreenSize(PP_Instance instance, | 253 PP_Bool PPB_Instance_Proxy::FlashGetScreenSize(PP_Instance instance, |
254 PP_Size* size) { | 254 PP_Size* size) { |
255 PP_Bool result = PP_FALSE; | 255 PP_Bool result = PP_FALSE; |
256 dispatcher()->Send(new PpapiHostMsg_PPBInstance_FlashGetScreenSize( | 256 dispatcher()->Send(new PpapiHostMsg_PPBInstance_FlashGetScreenSize( |
257 INTERFACE_ID_PPB_INSTANCE, instance, &result, size)); | 257 API_ID_PPB_INSTANCE, instance, &result, size)); |
258 return result; | 258 return result; |
259 } | 259 } |
260 | 260 |
261 int32_t PPB_Instance_Proxy::RequestInputEvents(PP_Instance instance, | 261 int32_t PPB_Instance_Proxy::RequestInputEvents(PP_Instance instance, |
262 uint32_t event_classes) { | 262 uint32_t event_classes) { |
263 dispatcher()->Send(new PpapiHostMsg_PPBInstance_RequestInputEvents( | 263 dispatcher()->Send(new PpapiHostMsg_PPBInstance_RequestInputEvents( |
264 INTERFACE_ID_PPB_INSTANCE, instance, false, event_classes)); | 264 API_ID_PPB_INSTANCE, instance, false, event_classes)); |
265 | 265 |
266 // We always register for the classes we can handle, this function validates | 266 // We always register for the classes we can handle, this function validates |
267 // the flags so we can notify it if anything was invalid, without requiring | 267 // the flags so we can notify it if anything was invalid, without requiring |
268 // a sync reply. | 268 // a sync reply. |
269 return ValidateRequestInputEvents(false, event_classes); | 269 return ValidateRequestInputEvents(false, event_classes); |
270 } | 270 } |
271 | 271 |
272 int32_t PPB_Instance_Proxy::RequestFilteringInputEvents( | 272 int32_t PPB_Instance_Proxy::RequestFilteringInputEvents( |
273 PP_Instance instance, | 273 PP_Instance instance, |
274 uint32_t event_classes) { | 274 uint32_t event_classes) { |
275 dispatcher()->Send(new PpapiHostMsg_PPBInstance_RequestInputEvents( | 275 dispatcher()->Send(new PpapiHostMsg_PPBInstance_RequestInputEvents( |
276 INTERFACE_ID_PPB_INSTANCE, instance, true, event_classes)); | 276 API_ID_PPB_INSTANCE, instance, true, event_classes)); |
277 | 277 |
278 // We always register for the classes we can handle, this function validates | 278 // We always register for the classes we can handle, this function validates |
279 // the flags so we can notify it if anything was invalid, without requiring | 279 // the flags so we can notify it if anything was invalid, without requiring |
280 // a sync reply. | 280 // a sync reply. |
281 return ValidateRequestInputEvents(true, event_classes); | 281 return ValidateRequestInputEvents(true, event_classes); |
282 } | 282 } |
283 | 283 |
284 void PPB_Instance_Proxy::ClearInputEventRequest(PP_Instance instance, | 284 void PPB_Instance_Proxy::ClearInputEventRequest(PP_Instance instance, |
285 uint32_t event_classes) { | 285 uint32_t event_classes) { |
286 dispatcher()->Send(new PpapiHostMsg_PPBInstance_ClearInputEvents( | 286 dispatcher()->Send(new PpapiHostMsg_PPBInstance_ClearInputEvents( |
287 INTERFACE_ID_PPB_INSTANCE, instance, event_classes)); | 287 API_ID_PPB_INSTANCE, instance, event_classes)); |
288 } | 288 } |
289 | 289 |
290 void PPB_Instance_Proxy::ZoomChanged(PP_Instance instance, | 290 void PPB_Instance_Proxy::ZoomChanged(PP_Instance instance, |
291 double factor) { | 291 double factor) { |
292 // Not proxied yet. | 292 // Not proxied yet. |
293 NOTIMPLEMENTED(); | 293 NOTIMPLEMENTED(); |
294 } | 294 } |
295 | 295 |
296 void PPB_Instance_Proxy::ZoomLimitsChanged(PP_Instance instance, | 296 void PPB_Instance_Proxy::ZoomLimitsChanged(PP_Instance instance, |
297 double minimum_factor, | 297 double minimum_factor, |
298 double maximium_factor) { | 298 double maximium_factor) { |
299 // Not proxied yet. | 299 // Not proxied yet. |
300 NOTIMPLEMENTED(); | 300 NOTIMPLEMENTED(); |
301 } | 301 } |
302 | 302 |
303 PP_Var PPB_Instance_Proxy::ResolveRelativeToDocument( | 303 PP_Var PPB_Instance_Proxy::ResolveRelativeToDocument( |
304 PP_Instance instance, | 304 PP_Instance instance, |
305 PP_Var relative, | 305 PP_Var relative, |
306 PP_URLComponents_Dev* components) { | 306 PP_URLComponents_Dev* components) { |
307 ReceiveSerializedVarReturnValue result; | 307 ReceiveSerializedVarReturnValue result; |
308 dispatcher()->Send(new PpapiHostMsg_PPBInstance_ResolveRelativeToDocument( | 308 dispatcher()->Send(new PpapiHostMsg_PPBInstance_ResolveRelativeToDocument( |
309 INTERFACE_ID_PPB_INSTANCE, instance, | 309 API_ID_PPB_INSTANCE, instance, |
310 SerializedVarSendInput(dispatcher(), relative), | 310 SerializedVarSendInput(dispatcher(), relative), |
311 &result)); | 311 &result)); |
312 return URLUtilImpl::ConvertComponentsAndReturnURL(result.Return(dispatcher()), | 312 return URLUtilImpl::ConvertComponentsAndReturnURL(result.Return(dispatcher()), |
313 components); | 313 components); |
314 } | 314 } |
315 | 315 |
316 PP_Bool PPB_Instance_Proxy::DocumentCanRequest(PP_Instance instance, | 316 PP_Bool PPB_Instance_Proxy::DocumentCanRequest(PP_Instance instance, |
317 PP_Var url) { | 317 PP_Var url) { |
318 PP_Bool result = PP_FALSE; | 318 PP_Bool result = PP_FALSE; |
319 dispatcher()->Send(new PpapiHostMsg_PPBInstance_DocumentCanRequest( | 319 dispatcher()->Send(new PpapiHostMsg_PPBInstance_DocumentCanRequest( |
320 INTERFACE_ID_PPB_INSTANCE, instance, | 320 API_ID_PPB_INSTANCE, instance, |
321 SerializedVarSendInput(dispatcher(), url), | 321 SerializedVarSendInput(dispatcher(), url), |
322 &result)); | 322 &result)); |
323 return result; | 323 return result; |
324 } | 324 } |
325 | 325 |
326 PP_Bool PPB_Instance_Proxy::DocumentCanAccessDocument(PP_Instance instance, | 326 PP_Bool PPB_Instance_Proxy::DocumentCanAccessDocument(PP_Instance instance, |
327 PP_Instance target) { | 327 PP_Instance target) { |
328 PP_Bool result = PP_FALSE; | 328 PP_Bool result = PP_FALSE; |
329 dispatcher()->Send(new PpapiHostMsg_PPBInstance_DocumentCanAccessDocument( | 329 dispatcher()->Send(new PpapiHostMsg_PPBInstance_DocumentCanAccessDocument( |
330 INTERFACE_ID_PPB_INSTANCE, instance, target, &result)); | 330 API_ID_PPB_INSTANCE, instance, target, &result)); |
331 return result; | 331 return result; |
332 } | 332 } |
333 | 333 |
334 PP_Var PPB_Instance_Proxy::GetDocumentURL(PP_Instance instance, | 334 PP_Var PPB_Instance_Proxy::GetDocumentURL(PP_Instance instance, |
335 PP_URLComponents_Dev* components) { | 335 PP_URLComponents_Dev* components) { |
336 ReceiveSerializedVarReturnValue result; | 336 ReceiveSerializedVarReturnValue result; |
337 dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetDocumentURL( | 337 dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetDocumentURL( |
338 INTERFACE_ID_PPB_INSTANCE, instance, &result)); | 338 API_ID_PPB_INSTANCE, instance, &result)); |
339 return URLUtilImpl::ConvertComponentsAndReturnURL(result.Return(dispatcher()), | 339 return URLUtilImpl::ConvertComponentsAndReturnURL(result.Return(dispatcher()), |
340 components); | 340 components); |
341 } | 341 } |
342 | 342 |
343 PP_Var PPB_Instance_Proxy::GetPluginInstanceURL( | 343 PP_Var PPB_Instance_Proxy::GetPluginInstanceURL( |
344 PP_Instance instance, | 344 PP_Instance instance, |
345 PP_URLComponents_Dev* components) { | 345 PP_URLComponents_Dev* components) { |
346 ReceiveSerializedVarReturnValue result; | 346 ReceiveSerializedVarReturnValue result; |
347 dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetPluginInstanceURL( | 347 dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetPluginInstanceURL( |
348 INTERFACE_ID_PPB_INSTANCE, instance, &result)); | 348 API_ID_PPB_INSTANCE, instance, &result)); |
349 return URLUtilImpl::ConvertComponentsAndReturnURL(result.Return(dispatcher()), | 349 return URLUtilImpl::ConvertComponentsAndReturnURL(result.Return(dispatcher()), |
350 components); | 350 components); |
351 } | 351 } |
352 | 352 |
353 void PPB_Instance_Proxy::PostMessage(PP_Instance instance, | 353 void PPB_Instance_Proxy::PostMessage(PP_Instance instance, |
354 PP_Var message) { | 354 PP_Var message) { |
355 dispatcher()->Send(new PpapiHostMsg_PPBInstance_PostMessage( | 355 dispatcher()->Send(new PpapiHostMsg_PPBInstance_PostMessage( |
356 INTERFACE_ID_PPB_INSTANCE, | 356 API_ID_PPB_INSTANCE, |
357 instance, SerializedVarSendInput(dispatcher(), message))); | 357 instance, SerializedVarSendInput(dispatcher(), message))); |
358 } | 358 } |
359 | 359 |
360 int32_t PPB_Instance_Proxy::LockMouse(PP_Instance instance, | 360 int32_t PPB_Instance_Proxy::LockMouse(PP_Instance instance, |
361 PP_CompletionCallback callback) { | 361 PP_CompletionCallback callback) { |
362 if (!callback.func) | 362 if (!callback.func) |
363 return PP_ERROR_BADARGUMENT; | 363 return PP_ERROR_BADARGUMENT; |
364 | 364 |
365 dispatcher()->Send(new PpapiHostMsg_PPBInstance_LockMouse( | 365 dispatcher()->Send(new PpapiHostMsg_PPBInstance_LockMouse( |
366 INTERFACE_ID_PPB_INSTANCE, instance, SendCallback(callback))); | 366 API_ID_PPB_INSTANCE, instance, SendCallback(callback))); |
367 return PP_OK_COMPLETIONPENDING; | 367 return PP_OK_COMPLETIONPENDING; |
368 } | 368 } |
369 | 369 |
370 void PPB_Instance_Proxy::UnlockMouse(PP_Instance instance) { | 370 void PPB_Instance_Proxy::UnlockMouse(PP_Instance instance) { |
371 dispatcher()->Send(new PpapiHostMsg_PPBInstance_UnlockMouse( | 371 dispatcher()->Send(new PpapiHostMsg_PPBInstance_UnlockMouse( |
372 INTERFACE_ID_PPB_INSTANCE, instance)); | 372 API_ID_PPB_INSTANCE, instance)); |
373 } | 373 } |
374 | 374 |
375 void PPB_Instance_Proxy::OnMsgGetWindowObject( | 375 void PPB_Instance_Proxy::OnMsgGetWindowObject( |
376 PP_Instance instance, | 376 PP_Instance instance, |
377 SerializedVarReturnValue result) { | 377 SerializedVarReturnValue result) { |
378 EnterInstanceNoLock enter(instance, false); | 378 EnterInstanceNoLock enter(instance, false); |
379 if (enter.succeeded()) | 379 if (enter.succeeded()) |
380 result.Return(dispatcher(), enter.functions()->GetWindowObject(instance)); | 380 result.Return(dispatcher(), enter.functions()->GetWindowObject(instance)); |
381 } | 381 } |
382 | 382 |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 SerializedVarReturnValue result) { | 575 SerializedVarReturnValue result) { |
576 EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, true); | 576 EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, true); |
577 if (enter.succeeded()) { | 577 if (enter.succeeded()) { |
578 result.Return(dispatcher(), | 578 result.Return(dispatcher(), |
579 enter.functions()->GetPluginInstanceURL(instance, NULL)); | 579 enter.functions()->GetPluginInstanceURL(instance, NULL)); |
580 } | 580 } |
581 } | 581 } |
582 | 582 |
583 } // namespace proxy | 583 } // namespace proxy |
584 } // namespace ppapi | 584 } // namespace ppapi |
OLD | NEW |