summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webplugin_delegate.h
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-02 17:10:59 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-02 17:10:59 +0000
commitf103ab7a3af66f93aa6b674598ee8c977917f5f2 (patch)
tree670587d6caf0d0fc0a864f7b8d6e7b8da8f11f6d /webkit/glue/webplugin_delegate.h
parentee2bd0350faae7e862af993b8884d6c9c48559a4 (diff)
downloadchromium_src-f103ab7a3af66f93aa6b674598ee8c977917f5f2.zip
chromium_src-f103ab7a3af66f93aa6b674598ee8c977917f5f2.tar.gz
chromium_src-f103ab7a3af66f93aa6b674598ee8c977917f5f2.tar.bz2
Eliminate remaining WebCore dependencies from webplugin_impl.cc
Introduces WebPluginPageDelegate to hold the methods that only existed on WebViewDelegate to allow WebPluginImpl to talk to the RenderView. This enables us to eliminate those methods from WebViewDelegate, which eliminates the last dependency on gfx/ native_widget_types.h in our WebKit interface! WebViewDelegate grows a CreatePlugin method that returns a WebKit::WebPlugin. It loses its CreatePluginDelegate method, which now lives on WebPluginPageDelegate. This change makes RenderView use WeakPtr when it hands itself to each WebPluginDelegateProxy and WebPluginImpl instance. This makes the memory management simpler. This change also moves various WebPlugin* interfaces defined in webkit/glue into the webkit_glue namespace. This was to help reduce confusion with similarly named types in the WebKit namespace. WebKit::WebPluginParams is added to contain the set of parameters used to construct a plugin. WebPluginContainer gets a couple more methods to allow us to avoid WebCore dependencies in WebPluginImpl. R=jam BUG=10036 TEST=none Review URL: http://codereview.chromium.org/181014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25184 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webplugin_delegate.h')
-rw-r--r--webkit/glue/webplugin_delegate.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/webkit/glue/webplugin_delegate.h b/webkit/glue/webplugin_delegate.h
index c1427cd..de83954 100644
--- a/webkit/glue/webplugin_delegate.h
+++ b/webkit/glue/webplugin_delegate.h
@@ -11,12 +11,9 @@
#include "base/string16.h"
#include "third_party/npapi/bindings/npapi.h"
-struct NPObject;
-
class FilePath;
class GURL;
-class WebPlugin;
-class WebPluginResourceClient;
+struct NPObject;
namespace WebKit {
class WebInputEvent;
@@ -27,6 +24,11 @@ namespace gfx {
class Rect;
}
+namespace webkit_glue {
+
+class WebPlugin;
+class WebPluginResourceClient;
+
// This is the interface that a plugin implementation needs to provide.
class WebPluginDelegate {
public:
@@ -43,7 +45,6 @@ class WebPluginDelegate {
PLUGIN_QUIRK_WINDOWLESS_INVALIDATE_AFTER_SET_WINDOW = 512, // Linux
};
- WebPluginDelegate() {}
virtual ~WebPluginDelegate() {}
static WebPluginDelegate* Create(const FilePath& filename,
@@ -59,8 +60,8 @@ class WebPluginDelegate {
// be passed from webkit. if false indicates that the plugin should download
// the data. This also controls whether the plugin is instantiated as a full
// page plugin (NP_FULL) or embedded (NP_EMBED).
- virtual bool Initialize(const GURL& url, char** argn, char** argv,
- int argc, WebPlugin* plugin, bool load_manually) = 0;
+ virtual bool Initialize(const GURL& url, char** argn, char** argv, int argc,
+ WebPlugin* plugin, bool load_manually) = 0;
// Called when the WebPlugin is being destroyed. This is a signal to the
// delegate that it should tear-down the plugin implementation and not call
@@ -138,17 +139,16 @@ class WebPluginDelegate {
intptr_t notify_data,
intptr_t stream) = 0;
- virtual bool IsWindowless() const;
+ virtual bool IsWindowless() const = 0;
- virtual const gfx::Rect& GetRect() const;
+ virtual gfx::Rect GetRect() const = 0;
- virtual const gfx::Rect& GetClipRect() const;
+ virtual gfx::Rect GetClipRect() const = 0;
// Returns a combination of PluginQuirks.
- virtual int GetQuirks() const;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(WebPluginDelegate);
+ virtual int GetQuirks() const = 0;
};
-#endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_DELEGATE_H_
+} // namespace webkit_glue
+
+#endif // WEBKIT_GLUE_WEBPLUGIN_DELEGATE_H_