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

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

Issue 1014723007: Remove deprecated PPB_Messaging_1_1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert change to histograms.xml Created 5 years, 9 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
« no previous file with comments | « ppapi/proxy/ppb_instance_proxy.h ('k') | ppapi/thunk/interfaces_ppb_public_dev_channel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/numerics/safe_conversions.h" 8 #include "base/numerics/safe_conversions.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 return PP_ERROR_BADARGUMENT; 806 return PP_ERROR_BADARGUMENT;
807 807
808 int32_t result = PP_ERROR_FAILED; 808 int32_t result = PP_ERROR_FAILED;
809 scoped_ptr<MessageHandler> message_handler = MessageHandler::Create( 809 scoped_ptr<MessageHandler> message_handler = MessageHandler::Create(
810 instance, handler, user_data, message_loop, &result); 810 instance, handler, user_data, message_loop, &result);
811 if (message_handler) 811 if (message_handler)
812 data->message_handler = message_handler.Pass(); 812 data->message_handler = message_handler.Pass();
813 return result; 813 return result;
814 } 814 }
815 815
816 // TODO(dmichael): Remove this. crbug.com/414398
817 int32_t PPB_Instance_Proxy::RegisterMessageHandler_1_1_Deprecated(
818 PP_Instance instance,
819 void* user_data,
820 const PPP_MessageHandler_0_1_Deprecated* handler,
821 PP_Resource message_loop) {
822 InstanceData* data =
823 static_cast<PluginDispatcher*>(dispatcher())->GetInstanceData(instance);
824 if (!data)
825 return PP_ERROR_BADARGUMENT;
826
827 int32_t result = PP_ERROR_FAILED;
828 scoped_ptr<MessageHandler> message_handler = MessageHandler::CreateDeprecated(
829 instance, handler, user_data, message_loop, &result);
830 if (message_handler)
831 data->message_handler = message_handler.Pass();
832 return result;
833 }
834
835 void PPB_Instance_Proxy::UnregisterMessageHandler(PP_Instance instance) { 816 void PPB_Instance_Proxy::UnregisterMessageHandler(PP_Instance instance) {
836 InstanceData* data = 817 InstanceData* data =
837 static_cast<PluginDispatcher*>(dispatcher())->GetInstanceData(instance); 818 static_cast<PluginDispatcher*>(dispatcher())->GetInstanceData(instance);
838 if (!data) 819 if (!data)
839 return; 820 return;
840 data->message_handler.reset(); 821 data->message_handler.reset();
841 } 822 }
842 823
843 PP_Bool PPB_Instance_Proxy::SetCursor(PP_Instance instance, 824 PP_Bool PPB_Instance_Proxy::SetCursor(PP_Instance instance,
844 PP_MouseCursor_Type type, 825 PP_MouseCursor_Type type,
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 PP_Instance instance) { 1490 PP_Instance instance) {
1510 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> 1491 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())->
1511 GetInstanceData(instance); 1492 GetInstanceData(instance);
1512 if (!data) 1493 if (!data)
1513 return; // Instance was probably deleted. 1494 return; // Instance was probably deleted.
1514 data->should_do_request_surrounding_text = false; 1495 data->should_do_request_surrounding_text = false;
1515 } 1496 }
1516 1497
1517 } // namespace proxy 1498 } // namespace proxy
1518 } // namespace ppapi 1499 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_instance_proxy.h ('k') | ppapi/thunk/interfaces_ppb_public_dev_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698