| 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 2ac280beef49d2fc55b193e5ac1fff5b6b1b4c96..e4895a0793bf7b5aa84cbd8537bb59935c36981e 100644
|
| --- a/content/renderer/browser_plugin/browser_plugin_bindings.cc
|
| +++ b/content/renderer/browser_plugin/browser_plugin_bindings.cc
|
| @@ -369,6 +369,29 @@ class BrowserPluginBindingStop : public BrowserPluginMethodBinding {
|
| DISALLOW_COPY_AND_ASSIGN(BrowserPluginBindingStop);
|
| };
|
|
|
| +// Note: This is a method that is used internally by the <webview> shim only.
|
| +// This should not be exposed to developers.
|
| +class BrowserPluginBindingSetMediaPermission
|
| + : public BrowserPluginMethodBinding {
|
| + public:
|
| + BrowserPluginBindingSetMediaPermission()
|
| + : BrowserPluginMethodBinding(browser_plugin::kMethodSetMediaPermission,
|
| + 2) {
|
| + }
|
| +
|
| + virtual bool Invoke(BrowserPluginBindings* bindings,
|
| + const NPVariant* args,
|
| + NPVariant* result) OVERRIDE {
|
| + int request_id = Int32FromNPVariant(args[0]);
|
| + bool allow = NPVARIANT_TO_BOOLEAN(args[1]);
|
| + bindings->instance()->OnListenerCallMediaAccess(request_id, allow);
|
| + return true;
|
| + }
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(BrowserPluginBindingSetMediaPermission);
|
| +};
|
| +
|
| class BrowserPluginBindingTerminate : public BrowserPluginMethodBinding {
|
| public:
|
| BrowserPluginBindingTerminate()
|
| @@ -689,6 +712,7 @@ BrowserPluginBindings::BrowserPluginBindings(BrowserPlugin* instance)
|
| method_bindings_.push_back(new BrowserPluginBindingGetRouteID);
|
| method_bindings_.push_back(new BrowserPluginBindingGo);
|
| method_bindings_.push_back(new BrowserPluginBindingReload);
|
| + method_bindings_.push_back(new BrowserPluginBindingSetMediaPermission);
|
| method_bindings_.push_back(new BrowserPluginBindingStop);
|
| method_bindings_.push_back(new BrowserPluginBindingTerminate);
|
|
|
|
|