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

Unified Diff: content/renderer/browser_plugin/browser_plugin_bindings.cc

Issue 12189018: <webview>: Implement WebRequest API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Diff from latest patch Created 7 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: 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);

Powered by Google App Engine
This is Rietveld 408576698