| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateState, OnUpdateState) | 766 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateState, OnUpdateState) |
| 767 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTargetURL, OnUpdateTargetURL) | 767 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTargetURL, OnUpdateTargetURL) |
| 768 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) | 768 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) |
| 769 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) | 769 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) |
| 770 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentAvailableInMainFrame, | 770 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentAvailableInMainFrame, |
| 771 OnDocumentAvailableInMainFrame) | 771 OnDocumentAvailableInMainFrame) |
| 772 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, | 772 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, |
| 773 OnDidContentsPreferredSizeChange) | 773 OnDidContentsPreferredSizeChange) |
| 774 IPC_MESSAGE_HANDLER(ViewHostMsg_RouteCloseEvent, | 774 IPC_MESSAGE_HANDLER(ViewHostMsg_RouteCloseEvent, |
| 775 OnRouteCloseEvent) | 775 OnRouteCloseEvent) |
| 776 IPC_MESSAGE_HANDLER(DragHostMsg_UpdateDragCursor, OnUpdateDragCursor) | |
| 777 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus) | 776 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus) |
| 778 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) | 777 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) |
| 779 IPC_MESSAGE_HANDLER(ViewHostMsg_ClosePage_ACK, OnClosePageACK) | 778 IPC_MESSAGE_HANDLER(ViewHostMsg_ClosePage_ACK, OnClosePageACK) |
| 780 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL) | 779 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL) |
| 781 IPC_MESSAGE_HANDLER(ViewHostMsg_Focus, OnFocus) | 780 IPC_MESSAGE_HANDLER(ViewHostMsg_Focus, OnFocus) |
| 782 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeTouched, OnFocusedNodeTouched) | 781 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeTouched, OnFocusedNodeTouched) |
| 783 IPC_MESSAGE_UNHANDLED(handled = false) | 782 IPC_MESSAGE_UNHANDLED(handled = false) |
| 784 IPC_END_MESSAGE_MAP() | 783 IPC_END_MESSAGE_MAP() |
| 785 | 784 |
| 786 return handled; | 785 return handled; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 908 void RenderViewHostImpl::OnDidContentsPreferredSizeChange( | 907 void RenderViewHostImpl::OnDidContentsPreferredSizeChange( |
| 909 const gfx::Size& new_size) { | 908 const gfx::Size& new_size) { |
| 910 delegate_->UpdatePreferredSize(new_size); | 909 delegate_->UpdatePreferredSize(new_size); |
| 911 } | 910 } |
| 912 | 911 |
| 913 void RenderViewHostImpl::OnRouteCloseEvent() { | 912 void RenderViewHostImpl::OnRouteCloseEvent() { |
| 914 // Have the delegate route this to the active RenderViewHost. | 913 // Have the delegate route this to the active RenderViewHost. |
| 915 delegate_->RouteCloseEvent(this); | 914 delegate_->RouteCloseEvent(this); |
| 916 } | 915 } |
| 917 | 916 |
| 918 void RenderViewHostImpl::OnUpdateDragCursor(WebDragOperation current_op) { | |
| 919 RenderViewHostDelegateView* view = delegate_->GetDelegateView(); | |
| 920 if (view) | |
| 921 view->UpdateDragCursor(current_op); | |
| 922 } | |
| 923 | |
| 924 void RenderViewHostImpl::OnTakeFocus(bool reverse) { | 917 void RenderViewHostImpl::OnTakeFocus(bool reverse) { |
| 925 RenderViewHostDelegateView* view = delegate_->GetDelegateView(); | 918 RenderViewHostDelegateView* view = delegate_->GetDelegateView(); |
| 926 if (view) | 919 if (view) |
| 927 view->TakeFocus(reverse); | 920 view->TakeFocus(reverse); |
| 928 } | 921 } |
| 929 | 922 |
| 930 void RenderViewHostImpl::OnFocusedNodeChanged( | 923 void RenderViewHostImpl::OnFocusedNodeChanged( |
| 931 bool is_editable_node, | 924 bool is_editable_node, |
| 932 const gfx::Rect& node_bounds_in_viewport) { | 925 const gfx::Rect& node_bounds_in_viewport) { |
| 933 is_focused_element_editable_ = is_editable_node; | 926 is_focused_element_editable_ = is_editable_node; |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1097 } else { | 1090 } else { |
| 1098 render_view_ready_on_process_launch_ = true; | 1091 render_view_ready_on_process_launch_ = true; |
| 1099 } | 1092 } |
| 1100 } | 1093 } |
| 1101 | 1094 |
| 1102 void RenderViewHostImpl::RenderViewReady() { | 1095 void RenderViewHostImpl::RenderViewReady() { |
| 1103 delegate_->RenderViewReady(this); | 1096 delegate_->RenderViewReady(this); |
| 1104 } | 1097 } |
| 1105 | 1098 |
| 1106 } // namespace content | 1099 } // namespace content |
| OLD | NEW |