Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(359)

Side by Side Diff: ppapi/proxy/ppb_instance_proxy.cc

Issue 564573002: PPAPI: Make PPP_MessageHandler work in PNaCl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "media/base/limits.h" 9 #include "media/base/limits.h"
10 #include "ppapi/c/pp_errors.h" 10 #include "ppapi/c/pp_errors.h"
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 PP_Var message) { 831 PP_Var message) {
832 dispatcher()->Send(new PpapiHostMsg_PPBInstance_PostMessage( 832 dispatcher()->Send(new PpapiHostMsg_PPBInstance_PostMessage(
833 API_ID_PPB_INSTANCE, 833 API_ID_PPB_INSTANCE,
834 instance, SerializedVarSendInputShmem(dispatcher(), message, 834 instance, SerializedVarSendInputShmem(dispatcher(), message,
835 instance))); 835 instance)));
836 } 836 }
837 837
838 int32_t PPB_Instance_Proxy::RegisterMessageHandler( 838 int32_t PPB_Instance_Proxy::RegisterMessageHandler(
839 PP_Instance instance, 839 PP_Instance instance,
840 void* user_data, 840 void* user_data,
841 const PPP_MessageHandler_0_1* handler, 841 const PPP_MessageHandler_0_2* handler,
842 PP_Resource message_loop) { 842 PP_Resource message_loop) {
843 InstanceData* data = 843 InstanceData* data =
844 static_cast<PluginDispatcher*>(dispatcher())->GetInstanceData(instance); 844 static_cast<PluginDispatcher*>(dispatcher())->GetInstanceData(instance);
845 if (!data) 845 if (!data)
846 return PP_ERROR_BADARGUMENT; 846 return PP_ERROR_BADARGUMENT;
847 847
848 int32_t result = PP_ERROR_FAILED; 848 int32_t result = PP_ERROR_FAILED;
849 scoped_ptr<MessageHandler> message_handler = MessageHandler::Create( 849 scoped_ptr<MessageHandler> message_handler = MessageHandler::Create(
850 instance, handler, user_data, message_loop, &result); 850 instance, handler, user_data, message_loop, &result);
851 if (message_handler) 851 if (message_handler)
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 PP_Instance instance) { 1569 PP_Instance instance) {
1570 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> 1570 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())->
1571 GetInstanceData(instance); 1571 GetInstanceData(instance);
1572 if (!data) 1572 if (!data)
1573 return; // Instance was probably deleted. 1573 return; // Instance was probably deleted.
1574 data->should_do_request_surrounding_text = false; 1574 data->should_do_request_surrounding_text = false;
1575 } 1575 }
1576 1576
1577 } // namespace proxy 1577 } // namespace proxy
1578 } // namespace ppapi 1578 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698