Chromium Code Reviews| Index: content/public/renderer/browser_plugin_delegate.h |
| diff --git a/content/public/renderer/browser_plugin_delegate.h b/content/public/renderer/browser_plugin_delegate.h |
| index 583c43c4bcddcd6ed0a05654647805fdf5f19f0a..871c3ba7999fca1ccd44bdec8e68589dfb78a5f8 100644 |
| --- a/content/public/renderer/browser_plugin_delegate.h |
| +++ b/content/public/renderer/browser_plugin_delegate.h |
| @@ -5,8 +5,6 @@ |
| #ifndef CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_DELEGATE_H_ |
| #define CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_DELEGATE_H_ |
| -#include <string> |
| - |
| #include "content/common/content_export.h" |
| namespace gfx { |
| @@ -28,8 +26,6 @@ class RenderFrame; |
| // behavior of the plugin. |
| class CONTENT_EXPORT BrowserPluginDelegate { |
| public: |
| - virtual ~BrowserPluginDelegate() {} |
| - |
| // Called when the BrowserPlugin's geometry has been computed for the first |
| // time. |
| virtual void Ready() {} |
| @@ -47,8 +43,17 @@ class CONTENT_EXPORT BrowserPluginDelegate { |
| // Called when the plugin resizes. |
| virtual void DidResizeElement(const gfx::Size& new_size) {} |
| + // Called when the plugin is about to be destroyed. |
| + virtual void WillDestroy() {} |
|
Fady Samuel
2015/06/05 18:52:33
Rename this to ElementDestroyed.
lazyboy
2015/06/05 21:24:01
DidDestroyElement()
|
| + |
| // Return a scriptable object for the plugin. |
| virtual v8::Local<v8::Object> V8ScriptableObject(v8::Isolate* isolate); |
| + |
| + virtual void Destroy() = 0; |
|
Fady Samuel
2015/06/05 18:52:33
Let's not expose this to content.
lazyboy
2015/06/05 21:24:01
Done.
|
| + |
| + protected: |
| + // Use Destroy() to delete this delegate. |
| + virtual ~BrowserPluginDelegate() {} |
| }; |
| } // namespace content |