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

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

Issue 7806016: Revert 98826 - Add means for running some tests only o-o-p. Add messaging non-main thread test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/plugin_dispatcher.cc ('k') | ppapi/tests/pp_thread.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) 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_testing_proxy.h" 5 #include "ppapi/proxy/ppb_testing_proxy.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "ppapi/c/dev/ppb_testing_dev.h" 8 #include "ppapi/c/dev/ppb_testing_dev.h"
9 #include "ppapi/proxy/plugin_dispatcher.h" 9 #include "ppapi/proxy/plugin_dispatcher.h"
10 #include "ppapi/proxy/plugin_resource_tracker.h" 10 #include "ppapi/proxy/plugin_resource_tracker.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance_id); 56 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance_id);
57 if (!dispatcher) 57 if (!dispatcher)
58 return static_cast<uint32_t>(-1); 58 return static_cast<uint32_t>(-1);
59 59
60 uint32_t result = 0; 60 uint32_t result = 0;
61 dispatcher->Send(new PpapiHostMsg_PPBTesting_GetLiveObjectsForInstance( 61 dispatcher->Send(new PpapiHostMsg_PPBTesting_GetLiveObjectsForInstance(
62 INTERFACE_ID_PPB_TESTING, instance_id, &result)); 62 INTERFACE_ID_PPB_TESTING, instance_id, &result));
63 return result; 63 return result;
64 } 64 }
65 65
66 PP_Bool IsOutOfProcess() {
67 return PP_TRUE;
68 }
69
70 const PPB_Testing_Dev testing_interface = { 66 const PPB_Testing_Dev testing_interface = {
71 &ReadImageData, 67 &ReadImageData,
72 &RunMessageLoop, 68 &RunMessageLoop,
73 &QuitMessageLoop, 69 &QuitMessageLoop,
74 &GetLiveObjectsForInstance, 70 &GetLiveObjectsForInstance
75 &IsOutOfProcess
76 }; 71 };
77 72
78 InterfaceProxy* CreateTestingProxy(Dispatcher* dispatcher, 73 InterfaceProxy* CreateTestingProxy(Dispatcher* dispatcher,
79 const void* target_interface) { 74 const void* target_interface) {
80 return new PPB_Testing_Proxy(dispatcher, target_interface); 75 return new PPB_Testing_Proxy(dispatcher, target_interface);
81 } 76 }
82 77
83 } // namespace 78 } // namespace
84 79
85 PPB_Testing_Proxy::PPB_Testing_Proxy(Dispatcher* dispatcher, 80 PPB_Testing_Proxy::PPB_Testing_Proxy(Dispatcher* dispatcher,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 ppb_testing_target()->QuitMessageLoop(instance); 126 ppb_testing_target()->QuitMessageLoop(instance);
132 } 127 }
133 128
134 void PPB_Testing_Proxy::OnMsgGetLiveObjectsForInstance(PP_Instance instance, 129 void PPB_Testing_Proxy::OnMsgGetLiveObjectsForInstance(PP_Instance instance,
135 uint32_t* result) { 130 uint32_t* result) {
136 *result = ppb_testing_target()->GetLiveObjectsForInstance(instance); 131 *result = ppb_testing_target()->GetLiveObjectsForInstance(instance);
137 } 132 }
138 133
139 } // namespace proxy 134 } // namespace proxy
140 } // namespace ppapi 135 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/plugin_dispatcher.cc ('k') | ppapi/tests/pp_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698