summaryrefslogtreecommitdiffstats
path: root/ppapi/cpp
diff options
context:
space:
mode:
authorbaixo <baixo@chromium.org>2014-11-13 04:41:04 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-13 12:42:01 +0000
commitf28960dabfe03eff699df0e00f7edf7023ae46e8 (patch)
treef042640696b0749dc25acd0300daef6f2175eca7 /ppapi/cpp
parentf881f652f007ea0480eb0a0fa72a8e5efa00c9ae (diff)
downloadchromium_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.cc16
-rw-r--r--ppapi/cpp/private/pdf.h4
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