Index: content/renderer/browser_plugin/browser_plugin_bindings.cc |
diff --git a/content/renderer/browser_plugin/browser_plugin_bindings.cc b/content/renderer/browser_plugin/browser_plugin_bindings.cc |
index 142adc96e2f5e5b69a36b0df0c01fcb7295cd43b..bea9354cd992084b5c220d69a0ac18f4334b0de4 100644 |
--- a/content/renderer/browser_plugin/browser_plugin_bindings.cc |
+++ b/content/renderer/browser_plugin/browser_plugin_bindings.cc |
@@ -285,6 +285,26 @@ class BrowserPluginBindingForward : public BrowserPluginMethodBinding { |
// Note: This is a method that is used internally by the <webview> shim only. |
// This should not be exposed to developers. |
+class BrowserPluginBindingGetInstanceID : public BrowserPluginMethodBinding { |
+ public: |
+ BrowserPluginBindingGetInstanceID() |
+ : BrowserPluginMethodBinding(browser_plugin::kMethodGetInstanceId, 0) { |
+ } |
+ |
+ virtual bool Invoke(BrowserPluginBindings* bindings, |
+ const NPVariant* args, |
+ NPVariant* result) OVERRIDE { |
+ int instance_id = bindings->instance()->instance_id(); |
+ INT32_TO_NPVARIANT(instance_id, *result); |
+ return true; |
+ } |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(BrowserPluginBindingGetInstanceID); |
+}; |
+ |
+// Note: This is a method that is used internally by the <webview> shim only. |
+// This should not be exposed to developers. |
class BrowserPluginBindingGetRouteID : public BrowserPluginMethodBinding { |
public: |
BrowserPluginBindingGetRouteID() |
@@ -752,6 +772,7 @@ BrowserPluginBindings::BrowserPluginBindings(BrowserPlugin* instance) |
method_bindings_.push_back(new BrowserPluginBindingCanGoBack); |
method_bindings_.push_back(new BrowserPluginBindingCanGoForward); |
method_bindings_.push_back(new BrowserPluginBindingForward); |
+ method_bindings_.push_back(new BrowserPluginBindingGetInstanceID); |
method_bindings_.push_back(new BrowserPluginBindingGetProcessID); |
method_bindings_.push_back(new BrowserPluginBindingGetRouteID); |
method_bindings_.push_back(new BrowserPluginBindingGo); |