diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/plugin/webplugin_delegate_stub.cc | 7 | ||||
-rw-r--r-- | chrome/renderer/print_web_view_helper.h | 3 | ||||
-rw-r--r-- | chrome/renderer/render_widget.cc | 8 | ||||
-rw-r--r-- | chrome/renderer/render_widget.h | 3 | ||||
-rw-r--r-- | chrome/renderer/webplugin_delegate_proxy.cc | 8 | ||||
-rw-r--r-- | chrome/renderer/webplugin_delegate_proxy.h | 2 |
6 files changed, 24 insertions, 7 deletions
diff --git a/chrome/plugin/webplugin_delegate_stub.cc b/chrome/plugin/webplugin_delegate_stub.cc index 4d18012..542f0a3 100644 --- a/chrome/plugin/webplugin_delegate_stub.cc +++ b/chrome/plugin/webplugin_delegate_stub.cc @@ -18,9 +18,12 @@ #include "third_party/npapi/bindings/npapi.h" #include "third_party/npapi/bindings/npruntime.h" #include "skia/ext/platform_device.h" +#include "webkit/api/public/WebCursorInfo.h" #include "webkit/glue/webcursor.h" #include "webkit/glue/webplugin_delegate.h" +using WebKit::WebCursorInfo; + class FinishDestructionTask : public Task { public: FinishDestructionTask(WebPluginDelegate* delegate, WebPlugin* webplugin) @@ -223,7 +226,9 @@ void WebPluginDelegateStub::OnHandleInputEvent( const WebKit::WebInputEvent *event, bool* handled, WebCursor* cursor) { - *handled = delegate_->HandleInputEvent(*event, cursor); + WebCursorInfo cursor_info; + *handled = delegate_->HandleInputEvent(*event, &cursor_info); + cursor->InitFromCursorInfo(cursor_info); } void WebPluginDelegateStub::OnPaint(const gfx::Rect& damaged_rect) { diff --git a/chrome/renderer/print_web_view_helper.h b/chrome/renderer/print_web_view_helper.h index 77079fd..dcfab9d 100644 --- a/chrome/renderer/print_web_view_helper.h +++ b/chrome/renderer/print_web_view_helper.h @@ -81,7 +81,8 @@ class PrintWebViewHelper : public WebViewDelegate { virtual void CloseWidgetSoon(WebWidget* webwidget) {} virtual void Focus(WebWidget* webwidget) {} virtual void Blur(WebWidget* webwidget) {} - virtual void SetCursor(WebWidget* webwidget, const WebCursor& cursor) {} + virtual void SetCursor(WebWidget* webwidget, + const WebKit::WebCursorInfo& cursor) {} virtual void GetWindowRect(WebWidget* webwidget, WebKit::WebRect* rect); virtual void SetWindowRect(WebWidget* webwidget, const WebKit::WebRect& rect) {} diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc index 4a786c8..daede7a 100644 --- a/chrome/renderer/render_widget.cc +++ b/chrome/renderer/render_widget.cc @@ -15,6 +15,7 @@ #include "chrome/renderer/render_process.h" #include "skia/ext/platform_canvas.h" #include "third_party/skia/include/core/SkShader.h" +#include "webkit/api/public/WebCursorInfo.h" #include "webkit/api/public/WebRect.h" #include "webkit/api/public/WebScreenInfo.h" #include "webkit/api/public/WebSize.h" @@ -27,6 +28,7 @@ #include "webkit/glue/webtextdirection.h" #include "webkit/glue/webwidget.h" +using WebKit::WebCursorInfo; using WebKit::WebInputEvent; using WebKit::WebRect; using WebKit::WebScreenInfo; @@ -561,7 +563,11 @@ void RenderWidget::DidScrollRect(WebWidget* webwidget, int dx, int dy, this, &RenderWidget::DoDeferredScroll)); } -void RenderWidget::SetCursor(WebWidget* webwidget, const WebCursor& cursor) { +void RenderWidget::SetCursor(WebWidget* webwidget, + const WebCursorInfo& cursor_info) { + // TODO(darin): Eliminate this temporary. + WebCursor cursor(cursor_info); + // Only send a SetCursor message if we need to make a change. if (!current_cursor_.IsEqual(cursor)) { current_cursor_ = cursor; diff --git a/chrome/renderer/render_widget.h b/chrome/renderer/render_widget.h index fe69433..0d5308b 100644 --- a/chrome/renderer/render_widget.h +++ b/chrome/renderer/render_widget.h @@ -80,7 +80,8 @@ class RenderWidget : public IPC::Channel::Listener, virtual void CloseWidgetSoon(WebWidget* webwidget); virtual void Focus(WebWidget* webwidget); virtual void Blur(WebWidget* webwidget); - virtual void SetCursor(WebWidget* webwidget, const WebCursor& cursor); + virtual void SetCursor(WebWidget* webwidget, + const WebKit::WebCursorInfo& cursor); virtual void GetWindowRect(WebWidget* webwidget, WebKit::WebRect* rect); virtual void SetWindowRect(WebWidget* webwidget, const WebKit::WebRect& rect); diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc index e7650a7..8314b71 100644 --- a/chrome/renderer/webplugin_delegate_proxy.cc +++ b/chrome/renderer/webplugin_delegate_proxy.cc @@ -30,6 +30,7 @@ #include "grit/generated_resources.h" #include "net/base/mime_util.h" #include "printing/native_metafile.h" +#include "webkit/api/public/WebCursorInfo.h" #include "webkit/api/public/WebDragData.h" #include "webkit/api/public/WebString.h" #include "webkit/api/public/WebVector.h" @@ -42,6 +43,7 @@ #include "chrome/common/ipc_channel_posix.h" #endif +using WebKit::WebCursorInfo; using WebKit::WebInputEvent; using WebKit::WebDragData; using WebKit::WebVector; @@ -627,16 +629,18 @@ void WebPluginDelegateProxy::SetFocus() { bool WebPluginDelegateProxy::HandleInputEvent( const WebInputEvent& event, - WebCursor* cursor) { + WebCursorInfo* cursor_info) { bool handled; + WebCursor cursor; // A windowless plugin can enter a modal loop in the context of a // NPP_HandleEvent call, in which case we need to pump messages to // the plugin. We pass of the corresponding event handle to the // plugin process, which is set if the plugin does enter a modal loop. IPC::SyncMessage* message = new PluginMsg_HandleInputEvent( - instance_id_, &event, &handled, cursor); + instance_id_, &event, &handled, &cursor); message->set_pump_messages_event(modal_loop_pump_messages_event_.get()); Send(message); + cursor.GetCursorInfo(cursor_info); return handled; } diff --git a/chrome/renderer/webplugin_delegate_proxy.h b/chrome/renderer/webplugin_delegate_proxy.h index b665015..f7b91e8 100644 --- a/chrome/renderer/webplugin_delegate_proxy.h +++ b/chrome/renderer/webplugin_delegate_proxy.h @@ -60,7 +60,7 @@ class WebPluginDelegateProxy : public WebPluginDelegate, virtual void DidFinishLoadWithReason(NPReason reason); virtual void SetFocus(); virtual bool HandleInputEvent(const WebKit::WebInputEvent& event, - WebCursor* cursor); + WebKit::WebCursorInfo* cursor); virtual int GetProcessId(); // IPC::Channel::Listener implementation: |