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

Unified Diff: public/web/WebPlugin.h

Issue 230813002: Make it possible to have <object>'s scriptableObject as a v8 object instead of NPObject. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed broken layout tests. Created 6 years, 4 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
« no previous file with comments | « Source/web/WebPluginContainerImpl.cpp ('k') | public/web/WebPluginContainer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebPlugin.h
diff --git a/public/web/WebPlugin.h b/public/web/WebPlugin.h
index a99c3ee217b53642dc33c5c876f58a212d95e6af..2bfde2aa8863b46c9026ca87d90aa56f51cd8837 100644
--- a/public/web/WebPlugin.h
+++ b/public/web/WebPlugin.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2009, 2012 Google Inc. All rights reserved.
+ * Copyright (C) 2014 Opera Software ASA. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -37,6 +38,7 @@
#include "WebDragOperation.h"
#include "WebDragStatus.h"
#include "WebWidget.h"
+#include <v8.h>
struct NPObject;
struct _NPP;
@@ -66,9 +68,14 @@ public:
virtual WebPluginContainer* container() const { return 0; }
virtual void containerDidDetachFromParent() { }
- virtual NPObject* scriptableObject() = 0;
+ virtual NPObject* scriptableObject() { return 0; }
virtual struct _NPP* pluginNPP() { return 0; }
+ // The same as scriptableObject() but allows to expose scriptable interface
+ // through plain v8 object instead of NPObject.
+ // If you override this function, you must return nullptr in scriptableObject().
+ virtual v8::Local<v8::Object> v8ScriptableObject(v8::Isolate*) { return v8::Local<v8::Object>(); }
+
// Returns true if the form submission value is successfully obtained
// from the plugin. The value would be associated with the name attribute
// of the corresponding object element.
« no previous file with comments | « Source/web/WebPluginContainerImpl.cpp ('k') | public/web/WebPluginContainer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698