Index: content/renderer/render_view.cc |
=================================================================== |
--- content/renderer/render_view.cc (revision 79031) |
+++ content/renderer/render_view.cc (working copy) |
@@ -72,6 +72,7 @@ |
#include "content/common/clipboard_messages.h" |
#include "content/common/content_constants.h" |
#include "content/common/database_messages.h" |
+#include "content/common/drag_messages.h" |
#include "content/common/file_system/file_system_dispatcher.h" |
#include "content/common/file_system/webfilesystem_callback_dispatcher.h" |
#include "content/common/notification_service.h" |
@@ -1002,16 +1003,15 @@ |
IPC_MESSAGE_HANDLER(ViewMsg_ScriptEvalRequest, OnScriptEvalRequest) |
IPC_MESSAGE_HANDLER(ViewMsg_CSSInsertRequest, OnCSSInsertRequest) |
IPC_MESSAGE_HANDLER(ViewMsg_ReservePageIDRange, OnReservePageIDRange) |
- IPC_MESSAGE_HANDLER(ViewMsg_DragTargetDragEnter, OnDragTargetDragEnter) |
- IPC_MESSAGE_HANDLER(ViewMsg_DragTargetDragOver, OnDragTargetDragOver) |
- IPC_MESSAGE_HANDLER(ViewMsg_DragTargetDragLeave, OnDragTargetDragLeave) |
- IPC_MESSAGE_HANDLER(ViewMsg_DragTargetDrop, OnDragTargetDrop) |
+ IPC_MESSAGE_HANDLER(DragMsg_TargetDragEnter, OnDragTargetDragEnter) |
+ IPC_MESSAGE_HANDLER(DragMsg_TargetDragOver, OnDragTargetDragOver) |
+ IPC_MESSAGE_HANDLER(DragMsg_TargetDragLeave, OnDragTargetDragLeave) |
+ IPC_MESSAGE_HANDLER(DragMsg_TargetDrop, OnDragTargetDrop) |
+ IPC_MESSAGE_HANDLER(DragMsg_SourceEndedOrMoved, OnDragSourceEndedOrMoved) |
+ IPC_MESSAGE_HANDLER(DragMsg_SourceSystemDragEnded, |
+ OnDragSourceSystemDragEnded) |
IPC_MESSAGE_HANDLER(ViewMsg_AllowBindings, OnAllowBindings) |
IPC_MESSAGE_HANDLER(ViewMsg_SetWebUIProperty, OnSetWebUIProperty) |
- IPC_MESSAGE_HANDLER(ViewMsg_DragSourceEndedOrMoved, |
- OnDragSourceEndedOrMoved) |
- IPC_MESSAGE_HANDLER(ViewMsg_DragSourceSystemDragEnded, |
- OnDragSourceSystemDragEnded) |
IPC_MESSAGE_HANDLER(ViewMsg_SetInitialFocus, OnSetInitialFocus) |
IPC_MESSAGE_HANDLER(ViewMsg_ScrollFocusedEditableNodeIntoView, |
OnScrollFocusedEditableNodeIntoView) |
@@ -2487,7 +2487,7 @@ |
SkBitmap bitmap = gfx::CGImageToSkBitmap(image.getCGImageRef()); |
#endif |
- Send(new ViewHostMsg_StartDragging(routing_id_, |
+ Send(new DragHostMsg_StartDragging(routing_id_, |
WebDropData(data), |
mask, |
bitmap, |
@@ -4368,21 +4368,6 @@ |
next_page_id_ += size_of_range + 1; |
} |
-void RenderView::OnDragSourceEndedOrMoved(const gfx::Point& client_point, |
- const gfx::Point& screen_point, |
- bool ended, |
- WebDragOperation op) { |
- if (ended) { |
- webview()->dragSourceEndedAt(client_point, screen_point, op); |
- } else { |
- webview()->dragSourceMovedTo(client_point, screen_point, op); |
- } |
-} |
- |
-void RenderView::OnDragSourceSystemDragEnded() { |
- webview()->dragSourceSystemDragEnded(); |
-} |
- |
void RenderView::OnDragTargetDragEnter(const WebDropData& drop_data, |
const gfx::Point& client_point, |
const gfx::Point& screen_point, |
@@ -4394,7 +4379,7 @@ |
screen_point, |
ops); |
- Send(new ViewHostMsg_UpdateDragCursor(routing_id_, operation)); |
+ Send(new DragHostMsg_UpdateDragCursor(routing_id_, operation)); |
} |
void RenderView::OnDragTargetDragOver(const gfx::Point& client_point, |
@@ -4405,7 +4390,7 @@ |
screen_point, |
ops); |
- Send(new ViewHostMsg_UpdateDragCursor(routing_id_, operation)); |
+ Send(new DragHostMsg_UpdateDragCursor(routing_id_, operation)); |
} |
void RenderView::OnDragTargetDragLeave() { |
@@ -4417,6 +4402,21 @@ |
webview()->dragTargetDrop(client_point, screen_point); |
} |
+void RenderView::OnDragSourceEndedOrMoved(const gfx::Point& client_point, |
+ const gfx::Point& screen_point, |
+ bool ended, |
+ WebDragOperation op) { |
+ if (ended) { |
+ webview()->dragSourceEndedAt(client_point, screen_point, op); |
+ } else { |
+ webview()->dragSourceMovedTo(client_point, screen_point, op); |
+ } |
+} |
+ |
+void RenderView::OnDragSourceSystemDragEnded() { |
+ webview()->dragSourceSystemDragEnded(); |
+} |
+ |
void RenderView::OnUpdateWebPreferences(const WebPreferences& prefs) { |
webkit_preferences_ = prefs; |
webkit_preferences_.Apply(webview()); |