Chromium Code Reviews| 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..5be2731843d1c5e45234ef801b53f82f5208562c |
| --- /dev/null |
| +++ b/content/public/renderer/browser_plugin/browser_plugin.h |
| @@ -0,0 +1,78 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
|
Charlie Reis
2013/02/28 02:12:03
2013 for new files.
Fady Samuel
2013/02/28 22:56:21
Done.
|
| +// 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; |
| + |
| +class CONTENT_EXPORT BrowserPlugin : public IPC::Sender { |
|
Charlie Reis
2013/02/28 02:12:03
Please add class-level documentation for this conc
Fady Samuel
2013/02/28 22:56:21
Done.
|
| + public: |
| + virtual ~BrowserPlugin() {} |
| + |
| + // 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; |
| + |
| + // Returns the embedding RenderView of the BrowserPlugin. |
| + virtual RenderView* GetRenderView() const = 0; |
|
Charlie Reis
2013/02/28 02:12:03
GetRenderView and GetContainer seem like a differe
Fady Samuel
2013/02/28 22:56:21
Done.
|
| + |
| + // Returns the container of the BrowserPlugin. |
| + virtual WebKit::WebPluginContainer* GetContainer() const = 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_ |