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..7f9cce3d4ef2721f1a7b35777e7240737d54352d 100644 |
| --- a/components/pdf/renderer/ppb_pdf_impl.cc |
| +++ b/components/pdf/renderer/ppb_pdf_impl.cc |
| @@ -329,6 +329,24 @@ void SetLinkUnderCursor(PP_Instance instance_id, const char* url) { |
| instance->SetLinkUnderCursor(url); |
| } |
| +#ifdef V8_USE_EXTERNAL_STARTUP_DATA |
| +void GetV8ExternalSnapshotData(PP_Instance instance_id, |
| + const char** natives_data_out, |
| + int* natives_size_out, |
| + const char** snapshot_data_out, |
| + int* snapshot_size_out) { |
| + content::PepperPluginInstance* instance = |
| + content::PepperPluginInstance::Get(instance_id); |
| + if (!instance) { |
| + *natives_data_out = *snapshot_data_out = NULL; |
| + *natives_size_out = *snapshot_size_out = 0; |
|
raymes
2014/11/10 03:29:06
nit: I don't know if this style is common. I'd rat
baixo1
2014/11/10 15:59:47
Done.
|
| + return; |
| + } |
| + instance->GetV8ExternalSnapshotData(natives_data_out, natives_size_out, |
| + snapshot_data_out, snapshot_size_out); |
| +} |
| +#endif |
| + |
| const PPB_PDF ppb_pdf = { // |
| &GetLocalizedString, // |
| &GetResourceImage, // |
| @@ -349,6 +367,9 @@ const PPB_PDF ppb_pdf = { // |
| &IsOutOfProcess, // |
| &SetSelectedText, // |
| &SetLinkUnderCursor, // |
| +#ifdef V8_USE_EXTERNAL_STARTUP_DATA |
|
rmcilroy
2014/11/07 23:46:00
I don't think you need the ifdef here - it's fine
raymes
2014/11/10 03:29:06
+1 We can get rid of the #ifdef above too and bury
baixo1
2014/11/10 15:59:47
Removed both this and the other one above (functio
|
| + &GetV8ExternalSnapshotData, // |
| +#endif |
| }; |
| } // namespace |