Chromium Code Reviews| Index: components/pdf/renderer/ppb_pdf_impl.cc |
| diff --git a/components/pdf/renderer/ppb_pdf_impl.cc b/components/pdf/renderer/ppb_pdf_impl.cc |
| index 7dda10a8de62b61613f8faa5180e43fbe3381150..b447fdda55006b3336469ff66b438f4e6ae42d99 100644 |
| --- a/components/pdf/renderer/ppb_pdf_impl.cc |
| +++ b/components/pdf/renderer/ppb_pdf_impl.cc |
| @@ -329,6 +329,40 @@ void SetLinkUnderCursor(PP_Instance instance_id, const char* url) { |
| instance->SetLinkUnderCursor(url); |
| } |
| +#if !defined(OS_ANDROID) && defined(V8_USE_EXTERNAL_STARTUP_DATA) |
| +const char* GetV8NativesData(PP_Instance instance_id) { |
|
rmcilroy
2014/11/04 21:58:12
Random drive-by comment: Could we just have a sing
raymes
2014/11/04 22:18:13
+1
baixo1
2014/11/07 21:35:34
Done.
|
| + content::PepperPluginInstance* instance = |
| + content::PepperPluginInstance::Get(instance_id); |
| + if (!instance) |
| + return NULL; |
| + return instance->GetV8NativesData(); |
| +} |
| + |
| +const char* GetV8SnapshotData(PP_Instance instance_id) { |
| + content::PepperPluginInstance* instance = |
| + content::PepperPluginInstance::Get(instance_id); |
| + if (!instance) |
| + return NULL; |
| + return instance->GetV8SnapshotData(); |
| +} |
| + |
| +int GetV8NativesSize(PP_Instance instance_id) { |
| + content::PepperPluginInstance* instance = |
| + content::PepperPluginInstance::Get(instance_id); |
| + if (!instance) |
| + return 0; |
| + return instance->GetV8NativesSize(); |
| +} |
| + |
| +int GetV8SnapshotSize(PP_Instance instance_id) { |
| + content::PepperPluginInstance* instance = |
| + content::PepperPluginInstance::Get(instance_id); |
| + if (!instance) |
| + return 0; |
| + return instance->GetV8SnapshotSize(); |
| +} |
| +#endif // !defined(OS_ANDROID) && defined(V8_USE_EXTERNAL_STARTUP_DATA) |
| + |
| const PPB_PDF ppb_pdf = { // |
| &GetLocalizedString, // |
| &GetResourceImage, // |
| @@ -349,6 +383,12 @@ const PPB_PDF ppb_pdf = { // |
| &IsOutOfProcess, // |
| &SetSelectedText, // |
| &SetLinkUnderCursor, // |
| +#if !defined(OS_ANDROID) && defined(V8_USE_EXTERNAL_STARTUP_DATA) |
| + &GetV8NativesData, // |
| + &GetV8SnapshotData, // |
| + &GetV8NativesSize, // |
| + &GetV8SnapshotSize, // |
| +#endif // !defined(OS_ANDROID) && defined(V8_USE_EXTERNAL_STARTUP_DATA) |
| }; |
| } // namespace |