| 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 "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
| 10 #include "ppapi/c/pp_time.h" | 10 #include "ppapi/c/pp_time.h" |
| (...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 } | 733 } |
| 734 #endif // !defined(OS_NACL) | 734 #endif // !defined(OS_NACL) |
| 735 | 735 |
| 736 void PPB_Instance_Proxy::PostMessage(PP_Instance instance, | 736 void PPB_Instance_Proxy::PostMessage(PP_Instance instance, |
| 737 PP_Var message) { | 737 PP_Var message) { |
| 738 dispatcher()->Send(new PpapiHostMsg_PPBInstance_PostMessage( | 738 dispatcher()->Send(new PpapiHostMsg_PPBInstance_PostMessage( |
| 739 API_ID_PPB_INSTANCE, | 739 API_ID_PPB_INSTANCE, |
| 740 instance, SerializedVarSendInputShmem(dispatcher(), message, | 740 instance, SerializedVarSendInputShmem(dispatcher(), message, |
| 741 instance))); | 741 instance))); |
| 742 } | 742 } |
| 743 int32_t PPB_Instance_Proxy::RegisterMessageHandler( |
| 744 PP_Instance instance, |
| 745 void* user_data, |
| 746 const PPP_MessageHandler_0_1* handler, |
| 747 PP_Resource message_loop) { |
| 748 // Not yet implemented. See crbug.com/367896 |
| 749 return PP_ERROR_NOTSUPPORTED; |
| 750 } |
| 751 |
| 752 void PPB_Instance_Proxy::UnregisterMessageHandler(PP_Instance instance) { |
| 753 // Not yet implemented. See crbug.com/367896 |
| 754 } |
| 743 | 755 |
| 744 PP_Bool PPB_Instance_Proxy::SetCursor(PP_Instance instance, | 756 PP_Bool PPB_Instance_Proxy::SetCursor(PP_Instance instance, |
| 745 PP_MouseCursor_Type type, | 757 PP_MouseCursor_Type type, |
| 746 PP_Resource image, | 758 PP_Resource image, |
| 747 const PP_Point* hot_spot) { | 759 const PP_Point* hot_spot) { |
| 748 // Some of these parameters are important for security. This check is in the | 760 // Some of these parameters are important for security. This check is in the |
| 749 // plugin process just for the convenience of the caller (since we don't | 761 // plugin process just for the convenience of the caller (since we don't |
| 750 // bother returning errors from the other process with a sync message). The | 762 // bother returning errors from the other process with a sync message). The |
| 751 // parameters will be validated again in the renderer. | 763 // parameters will be validated again in the renderer. |
| 752 if (!ValidateSetCursorParams(type, image, hot_spot)) | 764 if (!ValidateSetCursorParams(type, image, hot_spot)) |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1349 PP_Instance instance) { | 1361 PP_Instance instance) { |
| 1350 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> | 1362 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> |
| 1351 GetInstanceData(instance); | 1363 GetInstanceData(instance); |
| 1352 if (!data) | 1364 if (!data) |
| 1353 return; // Instance was probably deleted. | 1365 return; // Instance was probably deleted. |
| 1354 data->should_do_request_surrounding_text = false; | 1366 data->should_do_request_surrounding_text = false; |
| 1355 } | 1367 } |
| 1356 | 1368 |
| 1357 } // namespace proxy | 1369 } // namespace proxy |
| 1358 } // namespace ppapi | 1370 } // namespace ppapi |
| OLD | NEW |