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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 11593011: Add a new code/message path for moving an insertion handle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + function rename Created 7 years, 11 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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 IPC_MESSAGE_HANDLER(ViewMsg_SetName, OnSetName) 967 IPC_MESSAGE_HANDLER(ViewMsg_SetName, OnSetName)
968 IPC_MESSAGE_HANDLER(ViewMsg_SelectAll, OnSelectAll) 968 IPC_MESSAGE_HANDLER(ViewMsg_SelectAll, OnSelectAll)
969 IPC_MESSAGE_HANDLER(ViewMsg_Unselect, OnUnselect) 969 IPC_MESSAGE_HANDLER(ViewMsg_Unselect, OnUnselect)
970 IPC_MESSAGE_HANDLER(ViewMsg_SetEditableSelectionOffsets, 970 IPC_MESSAGE_HANDLER(ViewMsg_SetEditableSelectionOffsets,
971 OnSetEditableSelectionOffsets) 971 OnSetEditableSelectionOffsets)
972 IPC_MESSAGE_HANDLER(ViewMsg_SetCompositionFromExistingText, 972 IPC_MESSAGE_HANDLER(ViewMsg_SetCompositionFromExistingText,
973 OnSetCompositionFromExistingText) 973 OnSetCompositionFromExistingText)
974 IPC_MESSAGE_HANDLER(ViewMsg_ExtendSelectionAndDelete, 974 IPC_MESSAGE_HANDLER(ViewMsg_ExtendSelectionAndDelete,
975 OnExtendSelectionAndDelete) 975 OnExtendSelectionAndDelete)
976 IPC_MESSAGE_HANDLER(ViewMsg_SelectRange, OnSelectRange) 976 IPC_MESSAGE_HANDLER(ViewMsg_SelectRange, OnSelectRange)
977 IPC_MESSAGE_HANDLER(ViewMsg_MoveCaret, OnMoveCaret)
977 IPC_MESSAGE_HANDLER(ViewMsg_CopyImageAt, OnCopyImageAt) 978 IPC_MESSAGE_HANDLER(ViewMsg_CopyImageAt, OnCopyImageAt)
978 IPC_MESSAGE_HANDLER(ViewMsg_ExecuteEditCommand, OnExecuteEditCommand) 979 IPC_MESSAGE_HANDLER(ViewMsg_ExecuteEditCommand, OnExecuteEditCommand)
979 IPC_MESSAGE_HANDLER(ViewMsg_Find, OnFind) 980 IPC_MESSAGE_HANDLER(ViewMsg_Find, OnFind)
980 IPC_MESSAGE_HANDLER(ViewMsg_StopFinding, OnStopFinding) 981 IPC_MESSAGE_HANDLER(ViewMsg_StopFinding, OnStopFinding)
981 IPC_MESSAGE_HANDLER(ViewMsg_Zoom, OnZoom) 982 IPC_MESSAGE_HANDLER(ViewMsg_Zoom, OnZoom)
982 IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevel, OnSetZoomLevel) 983 IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevel, OnSetZoomLevel)
983 IPC_MESSAGE_HANDLER(ViewMsg_ZoomFactor, OnZoomFactor) 984 IPC_MESSAGE_HANDLER(ViewMsg_ZoomFactor, OnZoomFactor)
984 IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevelForLoadingURL, 985 IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevelForLoadingURL,
985 OnSetZoomLevelForLoadingURL) 986 OnSetZoomLevelForLoadingURL)
986 IPC_MESSAGE_HANDLER(ViewMsg_SetPageEncoding, OnSetPageEncoding) 987 IPC_MESSAGE_HANDLER(ViewMsg_SetPageEncoding, OnSetPageEncoding)
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
1432 if (!webview()) 1433 if (!webview())
1433 return; 1434 return;
1434 1435
1435 Send(new ViewHostMsg_SelectRange_ACK(routing_id_)); 1436 Send(new ViewHostMsg_SelectRange_ACK(routing_id_));
1436 1437
1437 handling_select_range_ = true; 1438 handling_select_range_ = true;
1438 webview()->focusedFrame()->selectRange(start, end); 1439 webview()->focusedFrame()->selectRange(start, end);
1439 handling_select_range_ = false; 1440 handling_select_range_ = false;
1440 } 1441 }
1441 1442
1443 void RenderViewImpl::OnMoveCaret(const gfx::Point& point) {
1444 if (!webview())
1445 return;
1446
1447 Send(new ViewHostMsg_MoveCaret_ACK(routing_id_));
1448
1449 webview()->focusedFrame()->moveCaretSelectionTowardsWindowPoint(point);
1450 }
1451
1442 void RenderViewImpl::OnSetHistoryLengthAndPrune(int history_length, 1452 void RenderViewImpl::OnSetHistoryLengthAndPrune(int history_length,
1443 int32 minimum_page_id) { 1453 int32 minimum_page_id) {
1444 DCHECK_GE(history_length, 0); 1454 DCHECK_GE(history_length, 0);
1445 DCHECK(history_list_offset_ == history_list_length_ - 1); 1455 DCHECK(history_list_offset_ == history_list_length_ - 1);
1446 DCHECK_GE(minimum_page_id, -1); 1456 DCHECK_GE(minimum_page_id, -1);
1447 1457
1448 // Generate the new list. 1458 // Generate the new list.
1449 std::vector<int32> new_history_page_ids(history_length, -1); 1459 std::vector<int32> new_history_page_ids(history_length, -1);
1450 for (size_t i = 0; i < history_page_ids_.size(); ++i) { 1460 for (size_t i = 0; i < history_page_ids_.size(); ++i) {
1451 if (minimum_page_id >= 0 && history_page_ids_[i] < minimum_page_id) 1461 if (minimum_page_id >= 0 && history_page_ids_[i] < minimum_page_id)
(...skipping 5101 matching lines...) Expand 10 before | Expand all | Expand 10 after
6553 } 6563 }
6554 #endif 6564 #endif
6555 6565
6556 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( 6566 void RenderViewImpl::OnReleaseDisambiguationPopupDIB(
6557 TransportDIB::Handle dib_handle) { 6567 TransportDIB::Handle dib_handle) {
6558 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); 6568 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle);
6559 RenderProcess::current()->ReleaseTransportDIB(dib); 6569 RenderProcess::current()->ReleaseTransportDIB(dib);
6560 } 6570 }
6561 6571
6562 } // namespace content 6572 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/test/data/android/device_files/insertion_handle/input_text.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698