Chromium Code Reviews| Index: public/web/WebPlugin.h |
| diff --git a/public/web/WebPlugin.h b/public/web/WebPlugin.h |
| index a99c3ee217b53642dc33c5c876f58a212d95e6af..ad95f5c1e224c32f65a8fd250f3af7ea9e25cc74 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 |
| @@ -41,6 +42,12 @@ |
| struct NPObject; |
| struct _NPP; |
| +namespace v8 { |
| +template <typename T> class Local; |
| +class Isolate; |
| +class Object; |
| +} |
| + |
| namespace blink { |
| class WebDataSource; |
| @@ -66,9 +73,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 bool getScriptableObject(v8::Isolate*, v8::Local<v8::Object>*) { return false; } |
|
abarth-chromium
2014/07/29 17:34:22
Why not just return a v8::Handle? Can't we use th
Krzysztof Olczyk
2014/07/30 08:40:31
Done.
|
| + |
| // 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. |