summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins/plugin_instance.h
diff options
context:
space:
mode:
authorstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-29 20:49:41 +0000
committerstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-29 20:49:41 +0000
commit7c64a2f4b4aa2b755a67b6625d3a508039e2fad4 (patch)
tree9619a45a2736ca7bce7a27d2e3ce3daea91cd43f /webkit/glue/plugins/plugin_instance.h
parentbb20bfdc0036e870e87fd9067f1f7f310d7de3c6 (diff)
downloadchromium_src-7c64a2f4b4aa2b755a67b6625d3a508039e2fad4.zip
chromium_src-7c64a2f4b4aa2b755a67b6625d3a508039e2fad4.tar.gz
chromium_src-7c64a2f4b4aa2b755a67b6625d3a508039e2fad4.tar.bz2
Move Mac plugin event conversion into helper classes
Creates new helper classes for Carbon and Cocoa plugin event conversion, and abstracts away the difference via a common interface and a model-driven factory. The guts of the converters is just the old static methods, moved into the classes with a couple of minor changes: - Switched to using WebInputEvent::isMouseEventType/isKeyboardEventType, since our methods were essentially duplicates. - The newer key types, RawKeyDown and Char, are now explicitly unhandled, rather than logging warnings. BUG=none TEST=Plugin events (mouse, keyboard, scroll wheel) on the Mac should continue to work as before. Review URL: http://codereview.chromium.org/1566002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42993 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins/plugin_instance.h')
-rw-r--r--webkit/glue/plugins/plugin_instance.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/webkit/glue/plugins/plugin_instance.h b/webkit/glue/plugins/plugin_instance.h
index bd3a0d7..afb4b58 100644
--- a/webkit/glue/plugins/plugin_instance.h
+++ b/webkit/glue/plugins/plugin_instance.h
@@ -109,10 +109,10 @@ class PluginInstance : public base::RefCountedThreadSafe<PluginInstance> {
#if defined(OS_MACOSX)
// Get/Set the Mac NPAPI drawing and event models
- int drawing_model() { return drawing_model_; }
- void set_drawing_model(int value) { drawing_model_ = value; }
- int event_model() { return event_model_; }
- void set_event_model(int value) { event_model_ = value; }
+ NPDrawingModel drawing_model() { return drawing_model_; }
+ void set_drawing_model(NPDrawingModel value) { drawing_model_ = value; }
+ NPEventModel event_model() { return event_model_; }
+ void set_event_model(NPEventModel value) { event_model_ = value; }
// Updates the instance's tracking of the location of the plugin location
// relative to the upper left of the screen.
void set_plugin_origin(const gfx::Point& origin) { plugin_origin_ = origin; }
@@ -286,8 +286,8 @@ class PluginInstance : public base::RefCountedThreadSafe<PluginInstance> {
intptr_t get_notify_data_;
bool use_mozilla_user_agent_;
#if defined(OS_MACOSX)
- int drawing_model_;
- int event_model_;
+ NPDrawingModel drawing_model_;
+ NPEventModel event_model_;
gfx::Point plugin_origin_;
gfx::Rect containing_window_frame_;
NPCocoaEvent* currently_handled_event_; // weak