summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-08 00:59:16 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-08 00:59:16 +0000
commitade384bc898c7a0f9be03a85a149a642c9145422 (patch)
tree1205bdf9a61b329b59ceabf0f4e6bac03afe8c79 /webkit
parent50af843f23d644ae7f2b5b9ffbd2d721a639907d (diff)
downloadchromium_src-ade384bc898c7a0f9be03a85a149a642c9145422.zip
chromium_src-ade384bc898c7a0f9be03a85a149a642c9145422.tar.gz
chromium_src-ade384bc898c7a0f9be03a85a149a642c9145422.tar.bz2
Some trivial style cleanup in the plugin delegate. There was one function
implemented in both the mac-specific file and the shared one, and several virtual functiongs that were never derived for anything. BUG=none TEST=none Review URL: http://codereview.chromium.org/267017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28359 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl.h26
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl_mac.mm4
-rw-r--r--webkit/glue/webplugin_delegate.h6
3 files changed, 16 insertions, 20 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl.h b/webkit/glue/plugins/webplugin_delegate_impl.h
index 6d53339..0413fb4ce 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl.h
+++ b/webkit/glue/plugins/webplugin_delegate_impl.h
@@ -59,27 +59,23 @@ class WebPluginDelegateImpl : public webkit_glue::WebPluginDelegate {
static bool IsDummyActivationWindow(gfx::NativeWindow window);
// WebPluginDelegate implementation
- virtual void PluginDestroyed();
virtual bool Initialize(const GURL& url,
const std::vector<std::string>& arg_names,
const std::vector<std::string>& arg_values,
webkit_glue::WebPlugin* plugin,
bool load_manually);
+ virtual void PluginDestroyed();
virtual void UpdateGeometry(const gfx::Rect& window_rect,
const gfx::Rect& clip_rect);
virtual void Paint(gfx::NativeDrawingContext context, const gfx::Rect& rect);
virtual void Print(gfx::NativeDrawingContext context);
-
- virtual void SetFocus(); // only called when windowless
- // only called when windowless
- // See NPAPI NPP_HandleEvent for more information.
+ virtual void SetFocus();
virtual bool HandleInputEvent(const WebKit::WebInputEvent& event,
WebKit::WebCursorInfo* cursor);
virtual NPObject* GetPluginScriptableObject();
virtual void DidFinishLoadWithReason(const GURL& url, NPReason reason,
intptr_t notify_data);
virtual int GetProcessId();
-
virtual void SendJavaScriptStream(const GURL& url,
const std::string& result,
bool success, bool notify_needed,
@@ -92,7 +88,6 @@ class WebPluginDelegateImpl : public webkit_glue::WebPluginDelegate {
virtual void DidReceiveManualData(const char* buffer, int length);
virtual void DidFinishManualLoading();
virtual void DidManualLoadFail();
- virtual FilePath GetPluginPath();
virtual void InstallMissingPlugin();
virtual webkit_glue::WebPluginResourceClient* CreateResourceClient(
int resource_id,
@@ -100,10 +95,14 @@ class WebPluginDelegateImpl : public webkit_glue::WebPluginDelegate {
bool notify_needed,
intptr_t notify_data,
intptr_t stream);
+ // End of WebPluginDelegate implementation.
- virtual bool IsWindowless() const { return windowless_ ; }
- virtual gfx::Rect GetRect() const { return window_rect_; }
- virtual gfx::Rect GetClipRect() const { return clip_rect_; }
+ bool IsWindowless() const { return windowless_ ; }
+ gfx::Rect GetRect() const { return window_rect_; }
+ gfx::Rect GetClipRect() const { return clip_rect_; }
+
+ // Returns the path for the library implementing this plugin.
+ FilePath GetPluginPath();
// Returns a combination of PluginQuirks.
int GetQuirks() const { return quirks_; }
@@ -111,11 +110,12 @@ class WebPluginDelegateImpl : public webkit_glue::WebPluginDelegate {
#if defined(OS_MACOSX)
// Informs the delegate that the context used for painting windowless plugins
// has changed.
- virtual void UpdateContext(gfx::NativeDrawingContext context);
+ void UpdateContext(gfx::NativeDrawingContext context);
#endif
private:
friend class DeleteTask<WebPluginDelegateImpl>;
+ friend class webkit_glue::WebPluginDelegate;
WebPluginDelegateImpl(gfx::PluginWindowHandle containing_view,
NPAPI::PluginInstance *instance);
@@ -333,9 +333,7 @@ class WebPluginDelegateImpl : public webkit_glue::WebPluginDelegate {
// Holds the current cursor set by the windowless plugin.
WebCursor current_windowless_cursor_;
- friend class webkit_glue::WebPluginDelegate;
-
- DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegateImpl);
+ DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl);
};
#endif // #ifndef WEBKIT_GLUE_PLUGIN_WEBPLUGIN_DELEGATE_IMPL_H_
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
index 8b60841..b85f195 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
+++ b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
@@ -255,10 +255,6 @@ void WebPluginDelegateImpl::DidManualLoadFail() {
instance()->DidManualLoadFail();
}
-FilePath WebPluginDelegateImpl::GetPluginPath() {
- return instance()->plugin_lib()->plugin_info().path;
-}
-
void WebPluginDelegateImpl::InstallMissingPlugin() {
NPEvent evt;
instance()->NPP_HandleEvent(&evt);
diff --git a/webkit/glue/webplugin_delegate.h b/webkit/glue/webplugin_delegate.h
index e56157b..db9df41 100644
--- a/webkit/glue/webplugin_delegate.h
+++ b/webkit/glue/webplugin_delegate.h
@@ -70,11 +70,13 @@ class WebPluginDelegate {
// Tells the plugin to print itself.
virtual void Print(gfx::NativeDrawingContext hdc) = 0;
- // Informs the plugin that it now has focus.
+ // Informs the plugin that it now has focus. This is only called in
+ // windowless mode.
virtual void SetFocus() = 0;
// For windowless plugins, gives them a user event like mouse/keyboard.
- // Returns whether the event was handled.
+ // Returns whether the event was handled. This is only called in windowsless
+ // mode. See NPAPI NPP_HandleEvent for more information.
virtual bool HandleInputEvent(const WebKit::WebInputEvent& event,
WebKit::WebCursorInfo* cursor) = 0;