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 #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_time.h" | 8 #include "ppapi/c/pp_time.h" |
9 #include "ppapi/c/pp_var.h" | 9 #include "ppapi/c/pp_var.h" |
10 #include "ppapi/c/ppb_audio_config.h" | 10 #include "ppapi/c/ppb_audio_config.h" |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 void PPB_Instance_Proxy::OnHostMsgPostMessage( | 566 void PPB_Instance_Proxy::OnHostMsgPostMessage( |
567 PP_Instance instance, | 567 PP_Instance instance, |
568 SerializedVarReceiveInput message) { | 568 SerializedVarReceiveInput message) { |
569 EnterInstanceNoLock enter(instance, false); | 569 EnterInstanceNoLock enter(instance, false); |
570 if (enter.succeeded()) | 570 if (enter.succeeded()) |
571 enter.functions()->PostMessage(instance, message.Get(dispatcher())); | 571 enter.functions()->PostMessage(instance, message.Get(dispatcher())); |
572 } | 572 } |
573 | 573 |
574 void PPB_Instance_Proxy::OnHostMsgLockMouse(PP_Instance instance) { | 574 void PPB_Instance_Proxy::OnHostMsgLockMouse(PP_Instance instance) { |
575 EnterHostFunctionForceCallback<PPB_Instance_FunctionAPI> enter( | 575 EnterHostFunctionForceCallback<PPB_Instance_FunctionAPI> enter( |
576 instance, callback_factory_, | 576 instance, |
577 &PPB_Instance_Proxy::MouseLockCompleteInHost, instance); | 577 callback_factory_.NewCallback( |
| 578 &PPB_Instance_Proxy::MouseLockCompleteInHost, |
| 579 instance)); |
578 if (enter.succeeded()) | 580 if (enter.succeeded()) |
579 enter.SetResult(enter.functions()->LockMouse(instance, enter.callback())); | 581 enter.SetResult(enter.functions()->LockMouse(instance, enter.callback())); |
580 } | 582 } |
581 | 583 |
582 void PPB_Instance_Proxy::OnHostMsgUnlockMouse(PP_Instance instance) { | 584 void PPB_Instance_Proxy::OnHostMsgUnlockMouse(PP_Instance instance) { |
583 EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, true); | 585 EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, true); |
584 if (enter.succeeded()) | 586 if (enter.succeeded()) |
585 enter.functions()->UnlockMouse(instance); | 587 enter.functions()->UnlockMouse(instance); |
586 } | 588 } |
587 | 589 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 } | 652 } |
651 | 653 |
652 void PPB_Instance_Proxy::MouseLockCompleteInHost(int32_t result, | 654 void PPB_Instance_Proxy::MouseLockCompleteInHost(int32_t result, |
653 PP_Instance instance) { | 655 PP_Instance instance) { |
654 dispatcher()->Send(new PpapiMsg_PPBInstance_MouseLockComplete( | 656 dispatcher()->Send(new PpapiMsg_PPBInstance_MouseLockComplete( |
655 API_ID_PPB_INSTANCE, instance, result)); | 657 API_ID_PPB_INSTANCE, instance, result)); |
656 } | 658 } |
657 | 659 |
658 } // namespace proxy | 660 } // namespace proxy |
659 } // namespace ppapi | 661 } // namespace ppapi |
OLD | NEW |