| Index: content/public/renderer/browser_plugin/browser_plugin.h
|
| diff --git a/content/public/renderer/browser_plugin/browser_plugin.h b/content/public/renderer/browser_plugin/browser_plugin.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2f572350b911714e34a4727e841546877c22f06b
|
| --- /dev/null
|
| +++ b/content/public/renderer/browser_plugin/browser_plugin.h
|
| @@ -0,0 +1,82 @@
|
| +// 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 CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_
|
| +#define CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_
|
| +
|
| +#include <map>
|
| +#include <string>
|
| +
|
| +#include "content/common/content_export.h"
|
| +#include "content/public/renderer/render_view.h"
|
| +#include "ipc/ipc_sender.h"
|
| +
|
| +namespace base {
|
| +class Value;
|
| +} // namespace base
|
| +
|
| +namespace WebKit {
|
| +class WebPluginContainer;
|
| +} // namespace WebKit
|
| +
|
| +namespace content {
|
| +
|
| +class BrowserPluginMethodBinding;
|
| +class BrowserPluginPropertyBinding;
|
| +
|
| +// A BrowserPlugin is a type of plugin that hosts out-of-process web content.
|
| +// This interface exposes BrowserPlugin to the content API so that the
|
| +// BrowserPlugin can be extended and customized with content-embedder-specific
|
| +// API.
|
| +class CONTENT_EXPORT BrowserPlugin : public IPC::Sender {
|
| + public:
|
| + virtual ~BrowserPlugin() {}
|
| +
|
| + // Returns the embedding RenderView of the BrowserPlugin.
|
| + virtual RenderView* GetRenderView() const = 0;
|
| +
|
| + // Returns the container of the BrowserPlugin.
|
| + virtual WebKit::WebPluginContainer* GetContainer() const = 0;
|
| +
|
| + // Adds a method binding to the BrowserPlugin. The BrowserPlugin takes
|
| + // ownership of the method binding. The method binding will be destroyed when
|
| + // the BrowserPlugin is destroyed, prior to cleaning up any
|
| + // BrowserPluginObservers.
|
| + virtual void AddMethodBinding(BrowserPluginMethodBinding* method_binding) = 0;
|
| +
|
| + // Adds a property binding to the BrowserPlugin. The BrowserPlugin takes
|
| + // ownership of the property binding. The binding will be destroyed when
|
| + // the BrowserPlugin is destroyed, prior to cleaning up any
|
| + // BrowserPluginObservers.
|
| + virtual void AddPropertyBinding(
|
| + BrowserPluginPropertyBinding* property_binding) = 0;
|
| +
|
| + // Triggers the event-listeners for |event_name|. Note that the function
|
| + // frees all the values in |props|.
|
| + virtual void TriggerEvent(
|
| + const std::string& event_name,
|
| + std::map<std::string, base::Value*>* props) = 0;
|
| +
|
| + // Updates the DOM attribute called |attribute_name| with the value
|
| + // |attribute_value|.
|
| + virtual void UpdateDOMAttribute(const std::string& attribute_name,
|
| + const std::string& attribue_value) = 0;
|
| +
|
| + // Removes the attribute |attribute_name| from the BrowserPlugin object.
|
| + virtual void RemoveDOMAttribute(const std::string& attribute_name) = 0;
|
| +
|
| + // Gets Browser Plugin's DOM Node attribute |attribute_name|'s value.
|
| + virtual std::string GetDOMAttributeValue(
|
| + const std::string& attribute_name) const = 0;
|
| +
|
| + // Checks if the attribute |attribute_name| exists in the DOM.
|
| + virtual bool HasDOMAttribute(const std::string& attribute_name) const = 0;
|
| +
|
| + // Indicates whether the BrowserPlugin has navigated within its lifetime.
|
| + virtual bool HasNavigated() const = 0;
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_
|
|
|