OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/renderer_host/render_view_host.h" | 5 #include "content/browser/renderer_host/render_view_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnMsgOpenURL) | 651 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnMsgOpenURL) |
652 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, | 652 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, |
653 OnMsgDidContentsPreferredSizeChange) | 653 OnMsgDidContentsPreferredSizeChange) |
654 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnMsgSetTooltipText) | 654 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnMsgSetTooltipText) |
655 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunJavaScriptMessage, | 655 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunJavaScriptMessage, |
656 OnMsgRunJavaScriptMessage) | 656 OnMsgRunJavaScriptMessage) |
657 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunBeforeUnloadConfirm, | 657 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunBeforeUnloadConfirm, |
658 OnMsgRunBeforeUnloadConfirm) | 658 OnMsgRunBeforeUnloadConfirm) |
659 IPC_MESSAGE_HANDLER(DragHostMsg_StartDragging, OnMsgStartDragging) | 659 IPC_MESSAGE_HANDLER(DragHostMsg_StartDragging, OnMsgStartDragging) |
660 IPC_MESSAGE_HANDLER(DragHostMsg_UpdateDragCursor, OnUpdateDragCursor) | 660 IPC_MESSAGE_HANDLER(DragHostMsg_UpdateDragCursor, OnUpdateDragCursor) |
| 661 IPC_MESSAGE_HANDLER(DragHostMsg_TargetDrop_ACK, OnTargetDropACK) |
661 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus) | 662 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus) |
662 IPC_MESSAGE_HANDLER(ViewHostMsg_AddMessageToConsole, OnAddMessageToConsole) | 663 IPC_MESSAGE_HANDLER(ViewHostMsg_AddMessageToConsole, OnAddMessageToConsole) |
663 IPC_MESSAGE_HANDLER(ViewHostMsg_ShouldClose_ACK, OnMsgShouldCloseACK) | 664 IPC_MESSAGE_HANDLER(ViewHostMsg_ShouldClose_ACK, OnMsgShouldCloseACK) |
664 IPC_MESSAGE_HANDLER(ViewHostMsg_ClosePage_ACK, OnMsgClosePageACK) | 665 IPC_MESSAGE_HANDLER(ViewHostMsg_ClosePage_ACK, OnMsgClosePageACK) |
665 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionChanged, OnMsgSelectionChanged) | 666 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionChanged, OnMsgSelectionChanged) |
666 IPC_MESSAGE_HANDLER(ViewHostMsg_AccessibilityNotifications, | 667 IPC_MESSAGE_HANDLER(ViewHostMsg_AccessibilityNotifications, |
667 OnAccessibilityNotifications) | 668 OnAccessibilityNotifications) |
668 IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse) | 669 IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse) |
669 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL) | 670 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL) |
670 #if defined(OS_MACOSX) | 671 #if defined(OS_MACOSX) |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1028 if (view) | 1029 if (view) |
1029 view->StartDragging(drop_data, drag_operations_mask, image, image_offset); | 1030 view->StartDragging(drop_data, drag_operations_mask, image, image_offset); |
1030 } | 1031 } |
1031 | 1032 |
1032 void RenderViewHost::OnUpdateDragCursor(WebDragOperation current_op) { | 1033 void RenderViewHost::OnUpdateDragCursor(WebDragOperation current_op) { |
1033 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); | 1034 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); |
1034 if (view) | 1035 if (view) |
1035 view->UpdateDragCursor(current_op); | 1036 view->UpdateDragCursor(current_op); |
1036 } | 1037 } |
1037 | 1038 |
| 1039 void RenderViewHost::OnTargetDropACK() { |
| 1040 NotificationService::current()->Notify( |
| 1041 NotificationType::RENDER_VIEW_HOST_DID_RECEIVE_DRAG_TARGET_DROP_ACK, |
| 1042 Source<RenderViewHost>(this), |
| 1043 NotificationService::NoDetails()); |
| 1044 } |
| 1045 |
1038 void RenderViewHost::OnTakeFocus(bool reverse) { | 1046 void RenderViewHost::OnTakeFocus(bool reverse) { |
1039 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); | 1047 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); |
1040 if (view) | 1048 if (view) |
1041 view->TakeFocus(reverse); | 1049 view->TakeFocus(reverse); |
1042 } | 1050 } |
1043 | 1051 |
1044 void RenderViewHost::OnAddMessageToConsole(int32 level, | 1052 void RenderViewHost::OnAddMessageToConsole(int32 level, |
1045 const std::wstring& message, | 1053 const std::wstring& message, |
1046 int32 line_no, | 1054 int32 line_no, |
1047 const std::wstring& source_id) { | 1055 const std::wstring& source_id) { |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1278 if (view) { | 1286 if (view) { |
1279 view->ShowPopupMenu(params.bounds, | 1287 view->ShowPopupMenu(params.bounds, |
1280 params.item_height, | 1288 params.item_height, |
1281 params.item_font_size, | 1289 params.item_font_size, |
1282 params.selected_item, | 1290 params.selected_item, |
1283 params.popup_items, | 1291 params.popup_items, |
1284 params.right_aligned); | 1292 params.right_aligned); |
1285 } | 1293 } |
1286 } | 1294 } |
1287 #endif | 1295 #endif |
OLD | NEW |