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-01-07 20:51:52 +0000
committerstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-07 20:51:52 +0000
commit9aff3e749be07838b251dcd675dbc39a4cadd6d2 (patch)
treea9480fa1f09e5c01997504a16249354b3e5adb6e /webkit/glue/plugins/plugin_instance.h
parentf4bff1e2cb4fc994a0f8453ae386222efa6f7b35 (diff)
downloadchromium_src-9aff3e749be07838b251dcd675dbc39a4cadd6d2.zip
chromium_src-9aff3e749be07838b251dcd675dbc39a4cadd6d2.tar.gz
chromium_src-9aff3e749be07838b251dcd675dbc39a4cadd6d2.tar.bz2
Partial implementation of NPN_ConvertPoint
Implements the plugin <-> screen coordinate conversions on the Mac. Window coordinate conversion is more difficult, and I'm not aware of any current need for it, so it remains unimplemented for now. BUG=29457 TEST=none Review URL: http://codereview.chromium.org/496001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35726 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins/plugin_instance.h')
-rw-r--r--webkit/glue/plugins/plugin_instance.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/webkit/glue/plugins/plugin_instance.h b/webkit/glue/plugins/plugin_instance.h
index ec94162..4d82bb7 100644
--- a/webkit/glue/plugins/plugin_instance.h
+++ b/webkit/glue/plugins/plugin_instance.h
@@ -17,6 +17,7 @@
#include "app/gfx/native_widget_types.h"
#include "base/basictypes.h"
#include "base/file_path.h"
+#include "base/gfx/point.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
#include "webkit/glue/plugins/nphostapi.h"
@@ -107,6 +108,9 @@ class PluginInstance : public base::RefCountedThreadSafe<PluginInstance> {
void set_drawing_model(int value) { drawing_model_ = value; }
int event_model() { return event_model_; }
void set_event_model(int 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(gfx::Point origin) { plugin_origin_ = origin; }
#endif
// Creates a stream for sending an URL. If notify_needed
@@ -157,6 +161,11 @@ class PluginInstance : public base::RefCountedThreadSafe<PluginInstance> {
void UnscheduleTimer(uint32 timer_id);
+ bool ConvertPoint(double source_x, double source_y,
+ NPCoordinateSpace source_space,
+ double* dest_x, double* dest_y,
+ NPCoordinateSpace dest_space);
+
//
// NPAPI methods for calling the Plugin Instance
//
@@ -247,6 +256,7 @@ class PluginInstance : public base::RefCountedThreadSafe<PluginInstance> {
#if defined(OS_MACOSX)
int drawing_model_;
int event_model_;
+ gfx::Point plugin_origin_;
#endif
MessageLoop* message_loop_;
scoped_refptr<PluginStreamUrl> plugin_data_stream_;