summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webplugin_impl.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-06 00:36:52 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-06 00:36:52 +0000
commit4c870b4013b3cf658c40e2c7b98e0a419ae7236f (patch)
treee701a8ab7b093e04367a0956e7ff94a702806e6c /webkit/glue/webplugin_impl.cc
parent983f7bd3fa88bbdac942dbfaf0269b1684a5c1ee (diff)
downloadchromium_src-4c870b4013b3cf658c40e2c7b98e0a419ae7236f.zip
chromium_src-4c870b4013b3cf658c40e2c7b98e0a419ae7236f.tar.gz
chromium_src-4c870b4013b3cf658c40e2c7b98e0a419ae7236f.tar.bz2
Eliminate CursorChromium's dependency on webkit/glue.
Also modified WidgetChromium to use ChromiumBridge instead of talking to ChromeClientChromium. I want to eliminate that fake interface in favor of just having our code talk directly to ChromeClientImpl, but that means a dependency on webkit/glue, so I needed to use ChromiumBridge. Long-term, I'd like to propose changes upstream to HostWindow and ChromeClient to avoid this usage of ChromiumBridge. The most impactful part of this CL is the change to move the enumeration of cursor types from WebCursor to PlatformCursor. This means that WebCursor consumers no longer have access to the type enumeration. I replaced that with helper functions on WebCursor. I think the result not only achieves the goal of breaking CursorChromium's dependency on webkit/glue but is also much cleaner. R=iyengar,eseidel Review URL: http://codereview.chromium.org/9072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4846 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webplugin_impl.cc')
-rw-r--r--webkit/glue/webplugin_impl.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc
index c428002..6d3fef8 100644
--- a/webkit/glue/webplugin_impl.cc
+++ b/webkit/glue/webplugin_impl.cc
@@ -46,8 +46,10 @@ MSVC_POP_WARNING();
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
#include "net/base/escape.h"
+#include "webkit/glue/chrome_client_impl.h"
#include "webkit/glue/glue_util.h"
#include "webkit/glue/multipart_response_delegate.h"
+#include "webkit/glue/webcursor.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webplugin_impl.h"
#include "webkit/glue/plugins/plugin_host.h"
@@ -869,13 +871,14 @@ void WebPluginImpl::handleMouseEvent(WebCore::MouseEvent* event) {
// TODO(pkasting): http://b/1119691 This conditional seems exactly backwards,
// but it matches Safari's code, and if I reverse it, giving focus to a
// transparent (windowless) plugin fails.
- WebCursor current_web_cursor;
- if (!delegate_->HandleEvent(&np_event, &current_web_cursor))
+ WebCursor cursor;
+ if (!delegate_->HandleEvent(&np_event, &cursor))
event->setDefaultHandled();
// A windowless plugin can change the cursor in response to the WM_MOUSEMOVE
// event. We need to reflect the changed cursor in the frame view as the
- // the mouse is moved in the boundaries of the windowless plugin.
- parent_view->setCursor(WebCore::PlatformCursor(current_web_cursor));
+ // mouse is moved in the boundaries of the windowless plugin.
+ static_cast<ChromeClientImpl*>(
+ parent_view->frame()->page()->chrome()->client())->SetCursor(cursor);
#else
NOTIMPLEMENTED();
#endif