summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webplugin_delegate.h
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-12 19:49:04 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-12 19:49:04 +0000
commitb94d3327ed86b1345ceca7806ae1e050055e252b (patch)
treea5fce8db5729299807c8ac0d3bf37e721b535392 /webkit/glue/webplugin_delegate.h
parent35b7041fbb49843f868c34ed3b5200d7653a6f5d (diff)
downloadchromium_src-b94d3327ed86b1345ceca7806ae1e050055e252b.zip
chromium_src-b94d3327ed86b1345ceca7806ae1e050055e252b.tar.gz
chromium_src-b94d3327ed86b1345ceca7806ae1e050055e252b.tar.bz2
Lots of small nits to help to split off webkit.dll.
- Stop directly referencing WebPluginDelegateImpl. - Make the password manager to not allocation the data on heap. - Remove some unneeded includes. Review URL: http://codereview.chromium.org/20208 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9692 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webplugin_delegate.h')
-rw-r--r--webkit/glue/webplugin_delegate.h49
1 files changed, 45 insertions, 4 deletions
diff --git a/webkit/glue/webplugin_delegate.h b/webkit/glue/webplugin_delegate.h
index 122503f0..b1a17cf 100644
--- a/webkit/glue/webplugin_delegate.h
+++ b/webkit/glue/webplugin_delegate.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_WEBPLUGIN_DELEGATE_H__
-#define WEBKIT_GLUE_WEBPLUGIN_DELEGATE_H__
+#ifndef WEBKIT_GLUE_WEBPLUGIN_DELEGATE_H_
+#define WEBKIT_GLUE_WEBPLUGIN_DELEGATE_H_
#include <string>
#include <vector>
@@ -27,9 +27,26 @@ class WebPluginResourceClient;
// This is the interface that a plugin implementation needs to provide.
class WebPluginDelegate {
public:
+#if defined(OS_WIN)
+ enum PluginQuirks {
+ PLUGIN_QUIRK_SETWINDOW_TWICE = 1 << 0,
+ PLUGIN_QUIRK_THROTTLE_WM_USER_PLUS_ONE = 1 << 1,
+ PLUGIN_QUIRK_DONT_CALL_WND_PROC_RECURSIVELY = 1 << 2,
+ PLUGIN_QUIRK_DONT_ALLOW_MULTIPLE_INSTANCES = 1 << 3,
+ PLUGIN_QUIRK_DIE_AFTER_UNLOAD = 1 << 4,
+ PLUGIN_QUIRK_PATCH_TRACKPOPUP_MENU = 1 << 5,
+ PLUGIN_QUIRK_PATCH_SETCURSOR = 1 << 6,
+ PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS = 1 << 7,
+ };
+#endif
+
WebPluginDelegate() {}
virtual ~WebPluginDelegate() {}
+ static WebPluginDelegate* Create(const FilePath& filename,
+ const std::string& mime_type,
+ gfx::NativeView containing_view);
+
// Initializes the plugin implementation with the given (UTF8) arguments.
// Note that the lifetime of WebPlugin must be longer than this delegate.
// If this function returns false the plugin isn't started and shouldn't be
@@ -120,9 +137,33 @@ class WebPluginDelegate {
// Notifies the delegate about a Get/Post URL request getting routed.
virtual void URLRequestRouted(const std::string&url, bool notify_needed,
void* notify_data) = 0;
+
+ virtual bool IsWindowless() const {
+ NOTREACHED();
+ return false;
+ }
+
+ virtual const gfx::Rect& GetRect() const {
+ NOTREACHED();
+ static gfx::Rect dummy;
+ return dummy;
+ }
+
+ virtual const gfx::Rect& GetClipRect() const {
+ NOTREACHED();
+ return GetRect();
+ }
+
+#if defined(OS_WIN)
+ // Returns a combinaison of PluginQuirks.
+ virtual int GetQuirks() const {
+ NOTREACHED();
+ return 0;
+ }
+#endif
+
private:
DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegate);
};
-#endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_DELEGATE_H__
-
+#endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_DELEGATE_H_