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

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: Profile* => void* Created 7 years, 7 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 | « content/common/browser_plugin/browser_plugin_constants.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9ded3f98abce3db0def129da0396ab3dfabe919a..61c343b5db56011c0d671d323249480f739f103f 100644
--- a/content/renderer/browser_plugin/browser_plugin_bindings.cc
+++ b/content/renderer/browser_plugin/browser_plugin_bindings.cc
@@ -318,6 +318,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()
@@ -826,6 +846,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);
« no previous file with comments | « content/common/browser_plugin/browser_plugin_constants.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698