Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 186753002: Chromium plumbing to use the selection root bounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on Blink patch and OS_ANDROID specific Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 IPC_MESSAGE_HANDLER(DragHostMsg_TargetDrop_ACK, OnTargetDropACK) 1152 IPC_MESSAGE_HANDLER(DragHostMsg_TargetDrop_ACK, OnTargetDropACK)
1153 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus) 1153 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus)
1154 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) 1154 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged)
1155 IPC_MESSAGE_HANDLER(ViewHostMsg_AddMessageToConsole, OnAddMessageToConsole) 1155 IPC_MESSAGE_HANDLER(ViewHostMsg_AddMessageToConsole, OnAddMessageToConsole)
1156 IPC_MESSAGE_HANDLER(ViewHostMsg_ShouldClose_ACK, OnShouldCloseACK) 1156 IPC_MESSAGE_HANDLER(ViewHostMsg_ShouldClose_ACK, OnShouldCloseACK)
1157 IPC_MESSAGE_HANDLER(ViewHostMsg_ClosePage_ACK, OnClosePageACK) 1157 IPC_MESSAGE_HANDLER(ViewHostMsg_ClosePage_ACK, OnClosePageACK)
1158 IPC_MESSAGE_HANDLER(ViewHostMsg_SwapOut_ACK, OnSwapOutACK) 1158 IPC_MESSAGE_HANDLER(ViewHostMsg_SwapOut_ACK, OnSwapOutACK)
1159 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionChanged, OnSelectionChanged) 1159 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionChanged, OnSelectionChanged)
1160 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionBoundsChanged, 1160 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionBoundsChanged,
1161 OnSelectionBoundsChanged) 1161 OnSelectionBoundsChanged)
1162 #if defined(OS_ANDROID)
1163 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionRootBoundsChanged,
1164 OnSelectionRootBoundsChanged)
1165 #endif
1162 IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse) 1166 IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse)
1163 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL) 1167 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL)
1164 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_RequestPermission, 1168 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_RequestPermission,
1165 OnRequestDesktopNotificationPermission) 1169 OnRequestDesktopNotificationPermission)
1166 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show, 1170 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show,
1167 OnShowDesktopNotification) 1171 OnShowDesktopNotification)
1168 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel, 1172 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel,
1169 OnCancelDesktopNotification) 1173 OnCancelDesktopNotification)
1170 #if defined(OS_MACOSX) || defined(OS_ANDROID) 1174 #if defined(OS_MACOSX) || defined(OS_ANDROID)
1171 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup) 1175 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup)
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1402 view_->SelectionChanged(text, offset, range); 1406 view_->SelectionChanged(text, offset, range);
1403 } 1407 }
1404 1408
1405 void RenderViewHostImpl::OnSelectionBoundsChanged( 1409 void RenderViewHostImpl::OnSelectionBoundsChanged(
1406 const ViewHostMsg_SelectionBounds_Params& params) { 1410 const ViewHostMsg_SelectionBounds_Params& params) {
1407 if (view_) { 1411 if (view_) {
1408 view_->SelectionBoundsChanged(params); 1412 view_->SelectionBoundsChanged(params);
1409 } 1413 }
1410 } 1414 }
1411 1415
1416 #if defined(OS_ANDROID)
1417 void RenderViewHostImpl::OnSelectionRootBoundsChanged(
1418 const gfx::Rect& bounds) {
1419 if (view_) {
1420 view_->SelectionRootBoundsChanged(bounds);
1421 }
1422 }
1423 #endif
1424
1412 void RenderViewHostImpl::OnRouteCloseEvent() { 1425 void RenderViewHostImpl::OnRouteCloseEvent() {
1413 // Have the delegate route this to the active RenderViewHost. 1426 // Have the delegate route this to the active RenderViewHost.
1414 delegate_->RouteCloseEvent(this); 1427 delegate_->RouteCloseEvent(this);
1415 } 1428 }
1416 1429
1417 void RenderViewHostImpl::OnRouteMessageEvent( 1430 void RenderViewHostImpl::OnRouteMessageEvent(
1418 const ViewMsg_PostMessage_Params& params) { 1431 const ViewMsg_PostMessage_Params& params) {
1419 // Give to the delegate to route to the active RenderViewHost. 1432 // Give to the delegate to route to the active RenderViewHost.
1420 delegate_->RouteMessageEvent(this, params); 1433 delegate_->RouteMessageEvent(this, params);
1421 } 1434 }
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
1962 return true; 1975 return true;
1963 } 1976 }
1964 1977
1965 void RenderViewHostImpl::AttachToFrameTree() { 1978 void RenderViewHostImpl::AttachToFrameTree() {
1966 FrameTree* frame_tree = delegate_->GetFrameTree(); 1979 FrameTree* frame_tree = delegate_->GetFrameTree();
1967 1980
1968 frame_tree->ResetForMainFrameSwap(); 1981 frame_tree->ResetForMainFrameSwap();
1969 } 1982 }
1970 1983
1971 } // namespace content 1984 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698