Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2315)

Unified Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 705623002: Initialize V8 in PDFium from external files (in-renderer process only). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/pepper/pepper_plugin_instance_impl.cc
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
index 7cdda79ded3e579a64a7bb53c1a5044599e42790..02d8735c8973934f63f7407e2906db8b3bc27a4d 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
@@ -138,6 +138,10 @@
#include "skia/ext/platform_canvas.h"
#endif
+#if !defined(OS_ANDROID) && defined(V8_USE_EXTERNAL_STARTUP_DATA)
+#include "gin/public/isolate_holder.h"
+#endif
+
using base::StringPrintf;
using ppapi::InputEventData;
using ppapi::PpapiGlobals;
@@ -1407,6 +1411,24 @@ void PepperPluginInstanceImpl::PostMessageToJavaScript(PP_Var message) {
message_channel_->PostMessageToJavaScript(message);
}
+#if !defined(OS_ANDROID) && defined(V8_USE_EXTERNAL_STARTUP_DATA)
+const char* PepperPluginInstanceImpl::GetV8NativesData() const {
+ return gin::IsolateHolder::GetV8NativesData();
raymes 2014/11/04 22:18:13 Can we get away with not modifying pepper_plugin_i
baixo1 2014/11/07 21:35:34 I'm afraid not, Raymes. Correct me if I'm wrong,
raymes 2014/11/10 03:29:05 No, that shouldn't be true. ppb_pdf_impl and peppe
baixo1 2014/11/10 15:59:47 If this is the case, then we can call gin from ppb
raymes 2014/11/11 02:40:19 Yep that should be fine. Thanks!
+}
+
+const char* PepperPluginInstanceImpl::GetV8SnapshotData() const {
+ return gin::IsolateHolder::GetV8SnapshotData();
+}
+
+int PepperPluginInstanceImpl::GetV8NativesSize() const {
+ return gin::IsolateHolder::GetV8NativesSize();
+}
+
+int PepperPluginInstanceImpl::GetV8SnapshotSize() const {
+ return gin::IsolateHolder::GetV8SnapshotSize();
+}
+#endif // !defined(OS_ANDROID) && defined(V8_USE_EXTERNAL_STARTUP_DATA)
+
int32_t PepperPluginInstanceImpl::RegisterMessageHandler(
PP_Instance instance,
void* user_data,

Powered by Google App Engine
This is Rietveld 408576698