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

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: 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 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 IPC_MESSAGE_HANDLER(DragHostMsg_UpdateDragCursor, OnUpdateDragCursor) 1117 IPC_MESSAGE_HANDLER(DragHostMsg_UpdateDragCursor, OnUpdateDragCursor)
1118 IPC_MESSAGE_HANDLER(DragHostMsg_TargetDrop_ACK, OnTargetDropACK) 1118 IPC_MESSAGE_HANDLER(DragHostMsg_TargetDrop_ACK, OnTargetDropACK)
1119 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus) 1119 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus)
1120 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) 1120 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged)
1121 IPC_MESSAGE_HANDLER(ViewHostMsg_AddMessageToConsole, OnAddMessageToConsole) 1121 IPC_MESSAGE_HANDLER(ViewHostMsg_AddMessageToConsole, OnAddMessageToConsole)
1122 IPC_MESSAGE_HANDLER(ViewHostMsg_ClosePage_ACK, OnClosePageACK) 1122 IPC_MESSAGE_HANDLER(ViewHostMsg_ClosePage_ACK, OnClosePageACK)
1123 IPC_MESSAGE_HANDLER(ViewHostMsg_SwapOut_ACK, OnSwapOutACK) 1123 IPC_MESSAGE_HANDLER(ViewHostMsg_SwapOut_ACK, OnSwapOutACK)
1124 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionChanged, OnSelectionChanged) 1124 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionChanged, OnSelectionChanged)
1125 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionBoundsChanged, 1125 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionBoundsChanged,
1126 OnSelectionBoundsChanged) 1126 OnSelectionBoundsChanged)
1127 #if defined(OS_ANDROID)
1128 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionRootBoundsChanged,
1129 OnSelectionRootBoundsChanged)
1130 #endif
1127 IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse) 1131 IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse)
1128 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL) 1132 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL)
1129 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_RequestPermission, 1133 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_RequestPermission,
1130 OnRequestDesktopNotificationPermission) 1134 OnRequestDesktopNotificationPermission)
1131 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show, 1135 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show,
1132 OnShowDesktopNotification) 1136 OnShowDesktopNotification)
1133 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel, 1137 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel,
1134 OnCancelDesktopNotification) 1138 OnCancelDesktopNotification)
1135 #if defined(OS_MACOSX) || defined(OS_ANDROID) 1139 #if defined(OS_MACOSX) || defined(OS_ANDROID)
1136 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup) 1140 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup)
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1354 view_->SelectionChanged(text, offset, range); 1358 view_->SelectionChanged(text, offset, range);
1355 } 1359 }
1356 1360
1357 void RenderViewHostImpl::OnSelectionBoundsChanged( 1361 void RenderViewHostImpl::OnSelectionBoundsChanged(
1358 const ViewHostMsg_SelectionBounds_Params& params) { 1362 const ViewHostMsg_SelectionBounds_Params& params) {
1359 if (view_) { 1363 if (view_) {
1360 view_->SelectionBoundsChanged(params); 1364 view_->SelectionBoundsChanged(params);
1361 } 1365 }
1362 } 1366 }
1363 1367
1368 #if defined(OS_ANDROID)
1369 void RenderViewHostImpl::OnSelectionRootBoundsChanged(
1370 const gfx::Rect& bounds) {
1371 if (view_) {
1372 view_->SelectionRootBoundsChanged(bounds);
1373 }
1374 }
1375 #endif
1376
1364 void RenderViewHostImpl::OnRouteCloseEvent() { 1377 void RenderViewHostImpl::OnRouteCloseEvent() {
1365 // Have the delegate route this to the active RenderViewHost. 1378 // Have the delegate route this to the active RenderViewHost.
1366 delegate_->RouteCloseEvent(this); 1379 delegate_->RouteCloseEvent(this);
1367 } 1380 }
1368 1381
1369 void RenderViewHostImpl::OnRouteMessageEvent( 1382 void RenderViewHostImpl::OnRouteMessageEvent(
1370 const ViewMsg_PostMessage_Params& params) { 1383 const ViewMsg_PostMessage_Params& params) {
1371 // Give to the delegate to route to the active RenderViewHost. 1384 // Give to the delegate to route to the active RenderViewHost.
1372 delegate_->RouteMessageEvent(this, params); 1385 delegate_->RouteMessageEvent(this, params);
1373 } 1386 }
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
1877 return true; 1890 return true;
1878 } 1891 }
1879 1892
1880 void RenderViewHostImpl::AttachToFrameTree() { 1893 void RenderViewHostImpl::AttachToFrameTree() {
1881 FrameTree* frame_tree = delegate_->GetFrameTree(); 1894 FrameTree* frame_tree = delegate_->GetFrameTree();
1882 1895
1883 frame_tree->ResetForMainFrameSwap(); 1896 frame_tree->ResetForMainFrameSwap();
1884 } 1897 }
1885 1898
1886 } // namespace content 1899 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/browser/renderer_host/render_widget_host_view_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698