| 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 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1185 IPC_MESSAGE_HANDLER(DragHostMsg_TargetDrop_ACK, OnTargetDropACK) | 1185 IPC_MESSAGE_HANDLER(DragHostMsg_TargetDrop_ACK, OnTargetDropACK) |
| 1186 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus) | 1186 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus) |
| 1187 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) | 1187 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) |
| 1188 IPC_MESSAGE_HANDLER(ViewHostMsg_AddMessageToConsole, OnAddMessageToConsole) | 1188 IPC_MESSAGE_HANDLER(ViewHostMsg_AddMessageToConsole, OnAddMessageToConsole) |
| 1189 IPC_MESSAGE_HANDLER(ViewHostMsg_ShouldClose_ACK, OnShouldCloseACK) | 1189 IPC_MESSAGE_HANDLER(ViewHostMsg_ShouldClose_ACK, OnShouldCloseACK) |
| 1190 IPC_MESSAGE_HANDLER(ViewHostMsg_ClosePage_ACK, OnClosePageACK) | 1190 IPC_MESSAGE_HANDLER(ViewHostMsg_ClosePage_ACK, OnClosePageACK) |
| 1191 IPC_MESSAGE_HANDLER(ViewHostMsg_SwapOut_ACK, OnSwapOutACK) | 1191 IPC_MESSAGE_HANDLER(ViewHostMsg_SwapOut_ACK, OnSwapOutACK) |
| 1192 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionChanged, OnSelectionChanged) | 1192 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionChanged, OnSelectionChanged) |
| 1193 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionBoundsChanged, | 1193 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionBoundsChanged, |
| 1194 OnSelectionBoundsChanged) | 1194 OnSelectionBoundsChanged) |
| 1195 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionRootBoundsChanged, |
| 1196 OnSelectionRootBoundsChanged) |
| 1195 IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse) | 1197 IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse) |
| 1196 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL) | 1198 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL) |
| 1197 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_RequestPermission, | 1199 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_RequestPermission, |
| 1198 OnRequestDesktopNotificationPermission) | 1200 OnRequestDesktopNotificationPermission) |
| 1199 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show, | 1201 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show, |
| 1200 OnShowDesktopNotification) | 1202 OnShowDesktopNotification) |
| 1201 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel, | 1203 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel, |
| 1202 OnCancelDesktopNotification) | 1204 OnCancelDesktopNotification) |
| 1203 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 1205 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 1204 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup) | 1206 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup) |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1445 view_->SelectionChanged(text, offset, range); | 1447 view_->SelectionChanged(text, offset, range); |
| 1446 } | 1448 } |
| 1447 | 1449 |
| 1448 void RenderViewHostImpl::OnSelectionBoundsChanged( | 1450 void RenderViewHostImpl::OnSelectionBoundsChanged( |
| 1449 const ViewHostMsg_SelectionBounds_Params& params) { | 1451 const ViewHostMsg_SelectionBounds_Params& params) { |
| 1450 if (view_) { | 1452 if (view_) { |
| 1451 view_->SelectionBoundsChanged(params); | 1453 view_->SelectionBoundsChanged(params); |
| 1452 } | 1454 } |
| 1453 } | 1455 } |
| 1454 | 1456 |
| 1457 void RenderViewHostImpl::OnSelectionRootBoundsChanged( |
| 1458 const gfx::Rect& bounds) { |
| 1459 if (view_) { |
| 1460 view_->SelectionRootBoundsChanged(bounds); |
| 1461 } |
| 1462 } |
| 1463 |
| 1455 void RenderViewHostImpl::OnRouteCloseEvent() { | 1464 void RenderViewHostImpl::OnRouteCloseEvent() { |
| 1456 // Have the delegate route this to the active RenderViewHost. | 1465 // Have the delegate route this to the active RenderViewHost. |
| 1457 delegate_->RouteCloseEvent(this); | 1466 delegate_->RouteCloseEvent(this); |
| 1458 } | 1467 } |
| 1459 | 1468 |
| 1460 void RenderViewHostImpl::OnRouteMessageEvent( | 1469 void RenderViewHostImpl::OnRouteMessageEvent( |
| 1461 const ViewMsg_PostMessage_Params& params) { | 1470 const ViewMsg_PostMessage_Params& params) { |
| 1462 // Give to the delegate to route to the active RenderViewHost. | 1471 // Give to the delegate to route to the active RenderViewHost. |
| 1463 delegate_->RouteMessageEvent(this, params); | 1472 delegate_->RouteMessageEvent(this, params); |
| 1464 } | 1473 } |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2010 return true; | 2019 return true; |
| 2011 } | 2020 } |
| 2012 | 2021 |
| 2013 void RenderViewHostImpl::AttachToFrameTree() { | 2022 void RenderViewHostImpl::AttachToFrameTree() { |
| 2014 FrameTree* frame_tree = delegate_->GetFrameTree(); | 2023 FrameTree* frame_tree = delegate_->GetFrameTree(); |
| 2015 | 2024 |
| 2016 frame_tree->ResetForMainFrameSwap(); | 2025 frame_tree->ResetForMainFrameSwap(); |
| 2017 } | 2026 } |
| 2018 | 2027 |
| 2019 } // namespace content | 2028 } // namespace content |
| OLD | NEW |