| Index: chrome/renderer/browser_plugin/chrome_webview_bindings.h
|
| diff --git a/chrome/renderer/browser_plugin/chrome_webview_bindings.h b/chrome/renderer/browser_plugin/chrome_webview_bindings.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..33e42d4a626a26f83cf05d5b106f38ee3b4c6035
|
| --- /dev/null
|
| +++ b/chrome/renderer/browser_plugin/chrome_webview_bindings.h
|
| @@ -0,0 +1,91 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_RENDERER_BROWSER_PLUGIN_CHROME_WEBVIEW_BINDINGS_H_
|
| +#define CHROME_RENDERER_BROWSER_PLUGIN_CHROME_WEBVIEW_BINDINGS_H_
|
| +
|
| +#include "base/compiler_specific.h"
|
| +#include "content/public/renderer/browser_plugin/browser_plugin_method_binding.h"
|
| +#include "content/public/renderer/browser_plugin/browser_plugin_property_binding.h"
|
| +
|
| +namespace chrome {
|
| +
|
| +class ChromeBrowserPluginObserver;
|
| +
|
| +class WebViewMethodBinding : public content::BrowserPluginMethodBinding {
|
| + public:
|
| + WebViewMethodBinding(ChromeBrowserPluginObserver* browser_plugin_observer,
|
| + const char name[], uint32 arg_count);
|
| + virtual ~WebViewMethodBinding();
|
| +
|
| + // TODO(fsamuel): This should be called webview_observer().
|
| + ChromeBrowserPluginObserver* browser_plugin_observer() const {
|
| + return browser_plugin_observer_;
|
| + }
|
| +
|
| + // BrowserPluginMethodBinding implementation.
|
| + virtual const std::string& GetName() const OVERRIDE;
|
| + virtual uint32 GetArgCount() const OVERRIDE;
|
| +
|
| + private:
|
| + ChromeBrowserPluginObserver* const browser_plugin_observer_;
|
| + const std::string name_;
|
| + const uint32 arg_count_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(WebViewMethodBinding);
|
| +};
|
| +
|
| +class WebViewPropertyBinding : public content::BrowserPluginPropertyBinding {
|
| + public:
|
| + explicit WebViewPropertyBinding(const char name[]);
|
| + virtual ~WebViewPropertyBinding();
|
| +
|
| + // BrowserPluginPropertyBinding implementation.
|
| + virtual const std::string& GetName() const OVERRIDE;
|
| +
|
| + private:
|
| + const std::string name_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(WebViewPropertyBinding);
|
| +};
|
| +
|
| +class WebViewMethodBindingBack : public WebViewMethodBinding {
|
| + public:
|
| + WebViewMethodBindingBack(
|
| + ChromeBrowserPluginObserver* browser_plugin_observer);
|
| + virtual ~WebViewMethodBindingBack();
|
| +
|
| + virtual bool Invoke(const NPVariant* args, NPVariant* result) OVERRIDE;
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(WebViewMethodBindingBack);
|
| +};
|
| +
|
| +class WebViewMethodBindingForward : public WebViewMethodBinding {
|
| + public:
|
| + WebViewMethodBindingForward(
|
| + ChromeBrowserPluginObserver* browser_plugin_observer);
|
| + virtual ~WebViewMethodBindingForward();
|
| +
|
| + virtual bool Invoke(const NPVariant* args, NPVariant* result) OVERRIDE;
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(WebViewMethodBindingForward);
|
| +};
|
| +
|
| +class WebViewMethodBindingGo : public WebViewMethodBinding {
|
| + public:
|
| + WebViewMethodBindingGo(
|
| + ChromeBrowserPluginObserver* browser_plugin_observer);
|
| + virtual ~WebViewMethodBindingGo();
|
| +
|
| + virtual bool Invoke(const NPVariant* args, NPVariant* result) OVERRIDE;
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(WebViewMethodBindingGo);
|
| +};
|
| +
|
| +} // namespace chrome
|
| +
|
| +#endif // CHROME_RENDERER_BROWSER_PLUGIN_CHROME_WEBVIEW_BINDINGS_H_
|
|
|