| 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 "content/renderer/pepper/plugin_module.h" | 5 #include "content/renderer/pepper/plugin_module.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 ++i) | 274 ++i) |
| 275 live_vars[i] = vars[i]; | 275 live_vars[i] = vars[i]; |
| 276 return vars.size(); | 276 return vars.size(); |
| 277 } | 277 } |
| 278 | 278 |
| 279 void SetMinimumArrayBufferSizeForShmem(PP_Instance /*instance*/, | 279 void SetMinimumArrayBufferSizeForShmem(PP_Instance /*instance*/, |
| 280 uint32_t /*threshold*/) { | 280 uint32_t /*threshold*/) { |
| 281 // Does nothing. Not needed in-process. | 281 // Does nothing. Not needed in-process. |
| 282 } | 282 } |
| 283 | 283 |
| 284 void RunV8GC(PP_Instance instance) { |
| 285 content::PepperPluginInstance::Get(instance)->GetIsolate()-> |
| 286 RequestGarbageCollectionForTesting(v8::Isolate::kFullGarbageCollection); |
| 287 } |
| 288 |
| 284 const PPB_Testing_Private testing_interface = { | 289 const PPB_Testing_Private testing_interface = { |
| 285 &ReadImageData, &RunMessageLoop, | 290 &ReadImageData, &RunMessageLoop, |
| 286 &QuitMessageLoop, &GetLiveObjectsForInstance, | 291 &QuitMessageLoop, &GetLiveObjectsForInstance, |
| 287 &IsOutOfProcess, &SimulateInputEvent, | 292 &IsOutOfProcess, &SimulateInputEvent, |
| 288 &GetDocumentURL, &GetLiveVars, | 293 &GetDocumentURL, &GetLiveVars, |
| 289 &SetMinimumArrayBufferSizeForShmem}; | 294 &SetMinimumArrayBufferSizeForShmem,&RunV8GC}; |
| 290 | 295 |
| 291 // GetInterface ---------------------------------------------------------------- | 296 // GetInterface ---------------------------------------------------------------- |
| 292 | 297 |
| 293 const void* InternalGetInterface(const char* name) { | 298 const void* InternalGetInterface(const char* name) { |
| 294 // Allow custom interface factories first stab at the GetInterface call. | 299 // Allow custom interface factories first stab at the GetInterface call. |
| 295 const void* custom_interface = | 300 const void* custom_interface = |
| 296 GetContentClient()->renderer()->CreatePPAPIInterface(name); | 301 GetContentClient()->renderer()->CreatePPAPIInterface(name); |
| 297 if (custom_interface) | 302 if (custom_interface) |
| 298 return custom_interface; | 303 return custom_interface; |
| 299 | 304 |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 channel_handle, | 718 channel_handle, |
| 714 peer_pid, | 719 peer_pid, |
| 715 plugin_child_id, | 720 plugin_child_id, |
| 716 false)) // is_external = false | 721 false)) // is_external = false |
| 717 return scoped_refptr<PluginModule>(); | 722 return scoped_refptr<PluginModule>(); |
| 718 | 723 |
| 719 return module; | 724 return module; |
| 720 } | 725 } |
| 721 | 726 |
| 722 } // namespace content | 727 } // namespace content |
| OLD | NEW |