summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins
diff options
context:
space:
mode:
authordarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-08 21:49:30 +0000
committerdarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-08 21:49:30 +0000
commit7c51b0ee951bf8ed70d0ed6506567991c611d070 (patch)
tree0d559aad012f55a540a990143bd1d9264e240319 /webkit/glue/plugins
parent03ce3cd72a2bb330c774f47cea4ad346d5c26cad (diff)
downloadchromium_src-7c51b0ee951bf8ed70d0ed6506567991c611d070.zip
chromium_src-7c51b0ee951bf8ed70d0ed6506567991c611d070.tar.gz
chromium_src-7c51b0ee951bf8ed70d0ed6506567991c611d070.tar.bz2
Start using WebCursorInfo from the WebKit API. WebCursorInfo is a
lightweight struct containing a description of a cursor that the embedder should render. WebCursor still exists. Instead of WebCursor initializing from a PlatformCursor, it now initializes from a WebCursorInfo. TEST=none BUG=10039 R=jam Review URL: http://codereview.chromium.org/155172 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20194 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins')
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl.cc9
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl.h8
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl_gtk.cc4
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl_mac.mm3
4 files changed, 14 insertions, 10 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl.cc b/webkit/glue/plugins/webplugin_delegate_impl.cc
index d197fb11..996e272 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl.cc
+++ b/webkit/glue/plugins/webplugin_delegate_impl.cc
@@ -16,14 +16,15 @@
#include "webkit/api/public/WebInputEvent.h"
#include "webkit/default_plugin/plugin_impl.h"
#include "webkit/glue/glue_util.h"
-#include "webkit/glue/webplugin.h"
#include "webkit/glue/plugins/plugin_constants_win.h"
#include "webkit/glue/plugins/plugin_instance.h"
#include "webkit/glue/plugins/plugin_lib.h"
#include "webkit/glue/plugins/plugin_list.h"
#include "webkit/glue/plugins/plugin_stream_url.h"
#include "webkit/glue/webkit_glue.h"
+#include "webkit/glue/webplugin.h"
+using WebKit::WebCursorInfo;
using WebKit::WebKeyboardEvent;
using WebKit::WebInputEvent;
using WebKit::WebMouseEvent;
@@ -1106,9 +1107,9 @@ static bool NPEventFromWebInputEvent(const WebInputEvent& event,
}
bool WebPluginDelegateImpl::HandleInputEvent(const WebInputEvent& event,
- WebCursor* cursor) {
+ WebCursorInfo* cursor_info) {
DCHECK(windowless_) << "events should only be received in windowless mode";
- DCHECK(cursor != NULL);
+ DCHECK(cursor_info != NULL);
NPEvent np_event;
if (!NPEventFromWebInputEvent(event, &np_event)) {
@@ -1153,7 +1154,7 @@ bool WebPluginDelegateImpl::HandleInputEvent(const WebInputEvent& event,
// Snag a reference to the current cursor ASAP in case the plugin modified
// it. There is a nasty race condition here with the multiprocess browser
// as someone might be setting the cursor in the main process as well.
- *cursor = current_windowless_cursor_;
+ current_windowless_cursor_.GetCursorInfo(cursor_info);
}
if (pop_user_gesture) {
diff --git a/webkit/glue/plugins/webplugin_delegate_impl.h b/webkit/glue/plugins/webplugin_delegate_impl.h
index d3cbdbf..a6f0715 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl.h
+++ b/webkit/glue/plugins/webplugin_delegate_impl.h
@@ -16,16 +16,16 @@
#include "base/ref_counted.h"
#include "base/task.h"
#include "third_party/npapi/bindings/npapi.h"
-#include "webkit/glue/webplugin_delegate.h"
#include "webkit/glue/webcursor.h"
+#include "webkit/glue/webplugin_delegate.h"
#if defined(OS_LINUX)
typedef struct _GdkDrawable GdkPixmap;
#endif
namespace NPAPI {
- class PluginInstance;
-};
+class PluginInstance;
+}
// An implementation of WebPluginDelegate that proxies all calls to
// the plugin process.
@@ -56,7 +56,7 @@ class WebPluginDelegateImpl : public WebPluginDelegate {
// only called when windowless
// See NPAPI NPP_HandleEvent for more information.
virtual bool HandleInputEvent(const WebKit::WebInputEvent& event,
- WebCursor* cursor);
+ WebKit::WebCursorInfo* cursor);
virtual NPObject* GetPluginScriptableObject();
virtual void DidFinishLoadWithReason(NPReason reason);
virtual int GetProcessId();
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
index 87d8685..de4a60f 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
+++ b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
@@ -16,6 +16,7 @@
#include "base/process_util.h"
#include "base/stats_counters.h"
#include "base/string_util.h"
+#include "webkit/api/public/WebCursorInfo.h"
#include "webkit/api/public/WebInputEvent.h"
// #include "webkit/default_plugin/plugin_impl.h"
#include "webkit/glue/glue_util.h"
@@ -31,6 +32,7 @@
#include "third_party/npapi/bindings/npapi_x11.h"
#endif
+using WebKit::WebCursorInfo;
using WebKit::WebKeyboardEvent;
using WebKit::WebInputEvent;
using WebKit::WebMouseEvent;
@@ -794,7 +796,7 @@ static bool NPEventFromWebInputEvent(const WebInputEvent& event,
}
bool WebPluginDelegateImpl::HandleInputEvent(const WebInputEvent& event,
- WebCursor* cursor) {
+ WebCursorInfo* cursor_info) {
DCHECK(windowless_) << "events should only be received in windowless mode";
if (first_event_time_ < 0.0)
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
index 771c31a..414d635 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
+++ b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
@@ -24,6 +24,7 @@
#include "webkit/glue/plugins/plugin_stream_url.h"
#include "webkit/glue/webkit_glue.h"
+using WebKit::WebCursorInfo;
using WebKit::WebKeyboardEvent;
using WebKit::WebInputEvent;
using WebKit::WebMouseEvent;
@@ -400,7 +401,7 @@ void WebPluginDelegateImpl::SetFocus() {
}
bool WebPluginDelegateImpl::HandleInputEvent(const WebInputEvent& event,
- WebCursor* cursor) {
+ WebCursorInfo* cursor) {
DCHECK(windowless_) << "events should only be received in windowless mode";
DCHECK(cursor != NULL);
// TODO: convert event into a NPEvent, and call NPP_HandleEvent(np_event).