diff options
author | baixo <baixo@chromium.org> | 2014-11-13 04:41:04 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-13 12:42:01 +0000 |
commit | f28960dabfe03eff699df0e00f7edf7023ae46e8 (patch) | |
tree | f042640696b0749dc25acd0300daef6f2175eca7 /ppapi/cpp | |
parent | f881f652f007ea0480eb0a0fa72a8e5efa00c9ae (diff) | |
download | chromium_src-f28960dabfe03eff699df0e00f7edf7023ae46e8.zip chromium_src-f28960dabfe03eff699df0e00f7edf7023ae46e8.tar.gz chromium_src-f28960dabfe03eff699df0e00f7edf7023ae46e8.tar.bz2 |
Initialize V8 in PDFium from external files when plugin is running in the renderer process.
BUG=421063
Review URL: https://codereview.chromium.org/705623002
Cr-Commit-Position: refs/heads/master@{#304020}
Diffstat (limited to 'ppapi/cpp')
-rw-r--r-- | ppapi/cpp/private/pdf.cc | 16 | ||||
-rw-r--r-- | ppapi/cpp/private/pdf.h | 4 |
2 files changed, 20 insertions, 0 deletions
diff --git a/ppapi/cpp/private/pdf.cc b/ppapi/cpp/private/pdf.cc index ac5b941..52df60c 100644 --- a/ppapi/cpp/private/pdf.cc +++ b/ppapi/cpp/private/pdf.cc @@ -197,4 +197,20 @@ void PDF::SetLinkUnderCursor(const InstanceHandle& instance, const char* url) { get_interface<PPB_PDF>()->SetLinkUnderCursor(instance.pp_instance(), url); } +// static +void PDF::GetV8ExternalSnapshotData(const char** natives_data_out, + int* natives_size_out, + const char** snapshot_data_out, + int* snapshot_size_out) { + if (has_interface<PPB_PDF>()) { + get_interface<PPB_PDF>()->GetV8ExternalSnapshotData(natives_data_out, + natives_size_out, snapshot_data_out, snapshot_size_out); + return; + } + *natives_data_out = NULL; + *snapshot_data_out = NULL; + *natives_size_out = 0; + *snapshot_size_out = 0; +} + } // namespace pp diff --git a/ppapi/cpp/private/pdf.h b/ppapi/cpp/private/pdf.h index 586952c..09db41b 100644 --- a/ppapi/cpp/private/pdf.h +++ b/ppapi/cpp/private/pdf.h @@ -63,6 +63,10 @@ class PDF { const char* selected_text); static void SetLinkUnderCursor(const InstanceHandle& instance, const char* url); + static void GetV8ExternalSnapshotData(const char** natives_data_out, + int* natives_size_out, + const char** snapshot_data_out, + int* snapshot_size_out); }; } // namespace pp |