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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp

Issue 2719333002: second stage
Patch Set: Need to get around resource loading without web/ Created 3 years, 10 months 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: third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
index e6a135ae65062e94ea6364f54f9fb68aa2bc1f6c..14d52bb8fd99db00deadb70b3f12a1b9bccae8a9 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
@@ -61,6 +61,7 @@
#include "core/loader/FrameLoaderClient.h"
#include "core/loader/NavigationScheduler.h"
#include "core/loader/ProgressTracker.h"
+#include "core/plugins/PluginClient.h"
#include "core/plugins/PluginView.h"
#include "platform/Histogram.h"
#include "platform/UserGestureIndicator.h"
@@ -221,6 +222,20 @@ PassRefPtr<SharedPersistent<v8::Object>> ScriptController::createPluginWrapper(
return SharedPersistent<v8::Object>::create(scriptableObject, isolate());
}
+PassRefPtr<SharedPersistent<v8::Object>> ScriptController::createPluginWrapper(
+ PluginClient* pluginClient) {
+ ASSERT(pluginClient);
+
+ v8::HandleScope handleScope(isolate());
+ v8::Local<v8::Object> scriptableObject =
+ pluginClient->scriptableObject(isolate());
+
+ if (scriptableObject.IsEmpty())
+ return nullptr;
+
+ return SharedPersistent<v8::Object>::create(scriptableObject, isolate());
+}
+
V8Extensions& ScriptController::registeredExtensions() {
DEFINE_STATIC_LOCAL(V8Extensions, extensions, ());
return extensions;
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScriptController.h ('k') | third_party/WebKit/Source/core/html/HTMLPlugInElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698