OLD | NEW |
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 "webkit/plugins/ppapi/plugin_module.h" | 5 #include "webkit/plugins/ppapi/plugin_module.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 } | 193 } |
194 | 194 |
195 void QuitMessageLoop(PP_Instance instance) { | 195 void QuitMessageLoop(PP_Instance instance) { |
196 MessageLoop::current()->QuitNow(); | 196 MessageLoop::current()->QuitNow(); |
197 } | 197 } |
198 | 198 |
199 uint32_t GetLiveObjectsForInstance(PP_Instance instance_id) { | 199 uint32_t GetLiveObjectsForInstance(PP_Instance instance_id) { |
200 return ResourceTracker::Get()->GetLiveObjectsForInstance(instance_id); | 200 return ResourceTracker::Get()->GetLiveObjectsForInstance(instance_id); |
201 } | 201 } |
202 | 202 |
| 203 PP_Bool IsOutOfProcess() { |
| 204 return PP_FALSE; |
| 205 } |
| 206 |
203 const PPB_Testing_Dev testing_interface = { | 207 const PPB_Testing_Dev testing_interface = { |
204 &ReadImageData, | 208 &ReadImageData, |
205 &RunMessageLoop, | 209 &RunMessageLoop, |
206 &QuitMessageLoop, | 210 &QuitMessageLoop, |
207 &GetLiveObjectsForInstance | 211 &GetLiveObjectsForInstance, |
| 212 &IsOutOfProcess |
208 }; | 213 }; |
209 | 214 |
210 // GetInterface ---------------------------------------------------------------- | 215 // GetInterface ---------------------------------------------------------------- |
211 | 216 |
212 const void* GetInterface(const char* name) { | 217 const void* GetInterface(const char* name) { |
213 // All interfaces should be used on the main thread. | 218 // All interfaces should be used on the main thread. |
214 CHECK(IsMainThread()); | 219 CHECK(IsMainThread()); |
215 | 220 |
216 // Allow custom interface factories first stab at the GetInterface call. | 221 // Allow custom interface factories first stab at the GetInterface call. |
217 const void* custom_interface = | 222 const void* custom_interface = |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 int retval = entry_points.initialize_module(pp_module(), &GetInterface); | 594 int retval = entry_points.initialize_module(pp_module(), &GetInterface); |
590 if (retval != 0) { | 595 if (retval != 0) { |
591 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; | 596 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; |
592 return false; | 597 return false; |
593 } | 598 } |
594 return true; | 599 return true; |
595 } | 600 } |
596 | 601 |
597 } // namespace ppapi | 602 } // namespace ppapi |
598 } // namespace webkit | 603 } // namespace webkit |
OLD | NEW |