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

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

Issue 2617443002: Implement ThreadedInputConnection.deleteSurroundingTextInCodePoints() (Closed)
Patch Set: Address dcheng@'s review Created 3 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
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1526 IPC_MESSAGE_HANDLER(InputMsg_Unselect, OnUnselect) 1526 IPC_MESSAGE_HANDLER(InputMsg_Unselect, OnUnselect)
1527 IPC_MESSAGE_HANDLER(InputMsg_MoveRangeSelectionExtent, 1527 IPC_MESSAGE_HANDLER(InputMsg_MoveRangeSelectionExtent,
1528 OnMoveRangeSelectionExtent) 1528 OnMoveRangeSelectionExtent)
1529 IPC_MESSAGE_HANDLER(InputMsg_Replace, OnReplace) 1529 IPC_MESSAGE_HANDLER(InputMsg_Replace, OnReplace)
1530 IPC_MESSAGE_HANDLER(InputMsg_ReplaceMisspelling, OnReplaceMisspelling) 1530 IPC_MESSAGE_HANDLER(InputMsg_ReplaceMisspelling, OnReplaceMisspelling)
1531 IPC_MESSAGE_HANDLER(FrameMsg_CopyImageAt, OnCopyImageAt) 1531 IPC_MESSAGE_HANDLER(FrameMsg_CopyImageAt, OnCopyImageAt)
1532 IPC_MESSAGE_HANDLER(FrameMsg_SaveImageAt, OnSaveImageAt) 1532 IPC_MESSAGE_HANDLER(FrameMsg_SaveImageAt, OnSaveImageAt)
1533 IPC_MESSAGE_HANDLER(InputMsg_ExtendSelectionAndDelete, 1533 IPC_MESSAGE_HANDLER(InputMsg_ExtendSelectionAndDelete,
1534 OnExtendSelectionAndDelete) 1534 OnExtendSelectionAndDelete)
1535 IPC_MESSAGE_HANDLER(InputMsg_DeleteSurroundingText, OnDeleteSurroundingText) 1535 IPC_MESSAGE_HANDLER(InputMsg_DeleteSurroundingText, OnDeleteSurroundingText)
1536 IPC_MESSAGE_HANDLER(InputMsg_DeleteSurroundingTextInCodePoints,
1537 OnDeleteSurroundingTextInCodePoints)
1536 IPC_MESSAGE_HANDLER(InputMsg_SetCompositionFromExistingText, 1538 IPC_MESSAGE_HANDLER(InputMsg_SetCompositionFromExistingText,
1537 OnSetCompositionFromExistingText) 1539 OnSetCompositionFromExistingText)
1538 IPC_MESSAGE_HANDLER(InputMsg_SetEditableSelectionOffsets, 1540 IPC_MESSAGE_HANDLER(InputMsg_SetEditableSelectionOffsets,
1539 OnSetEditableSelectionOffsets) 1541 OnSetEditableSelectionOffsets)
1540 IPC_MESSAGE_HANDLER(InputMsg_ExecuteNoValueEditCommand, 1542 IPC_MESSAGE_HANDLER(InputMsg_ExecuteNoValueEditCommand,
1541 OnExecuteNoValueEditCommand) 1543 OnExecuteNoValueEditCommand)
1542 IPC_MESSAGE_HANDLER(FrameMsg_AddMessageToConsole, OnAddMessageToConsole) 1544 IPC_MESSAGE_HANDLER(FrameMsg_AddMessageToConsole, OnAddMessageToConsole)
1543 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest, 1545 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest,
1544 OnJavaScriptExecuteRequest) 1546 OnJavaScriptExecuteRequest)
1545 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestForTests, 1547 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestForTests,
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
2101 void RenderFrameImpl::OnExtendSelectionAndDelete(int before, int after) { 2103 void RenderFrameImpl::OnExtendSelectionAndDelete(int before, int after) {
2102 ImeEventGuard guard(GetRenderWidget()); 2104 ImeEventGuard guard(GetRenderWidget());
2103 frame_->extendSelectionAndDelete(before, after); 2105 frame_->extendSelectionAndDelete(before, after);
2104 } 2106 }
2105 2107
2106 void RenderFrameImpl::OnDeleteSurroundingText(int before, int after) { 2108 void RenderFrameImpl::OnDeleteSurroundingText(int before, int after) {
2107 ImeEventGuard guard(GetRenderWidget()); 2109 ImeEventGuard guard(GetRenderWidget());
2108 frame_->deleteSurroundingText(before, after); 2110 frame_->deleteSurroundingText(before, after);
2109 } 2111 }
2110 2112
2113 void RenderFrameImpl::OnDeleteSurroundingTextInCodePoints(int before,
2114 int after) {
2115 ImeEventGuard guard(GetRenderWidget());
2116 frame_->deleteSurroundingTextInCodePoints(before, after);
2117 }
2118
2111 void RenderFrameImpl::OnSetAccessibilityMode(AccessibilityMode new_mode) { 2119 void RenderFrameImpl::OnSetAccessibilityMode(AccessibilityMode new_mode) {
2112 if (accessibility_mode_ == new_mode) 2120 if (accessibility_mode_ == new_mode)
2113 return; 2121 return;
2114 accessibility_mode_ = new_mode; 2122 accessibility_mode_ = new_mode;
2115 if (render_accessibility_) { 2123 if (render_accessibility_) {
2116 // Note: this isn't called automatically by the destructor because 2124 // Note: this isn't called automatically by the destructor because
2117 // there'd be no point in calling it in frame teardown, only if there's 2125 // there'd be no point in calling it in frame teardown, only if there's
2118 // an accessibility mode change but the frame is persisting. 2126 // an accessibility mode change but the frame is persisting.
2119 render_accessibility_->DisableAccessibility(); 2127 render_accessibility_->DisableAccessibility();
2120 2128
(...skipping 4720 matching lines...) Expand 10 before | Expand all | Expand 10 after
6841 // event target. Potentially a Pepper plugin will receive the event. 6849 // event target. Potentially a Pepper plugin will receive the event.
6842 // In order to tell whether a plugin gets the last mouse event and which it 6850 // In order to tell whether a plugin gets the last mouse event and which it
6843 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6851 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6844 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6852 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6845 // |pepper_last_mouse_event_target_|. 6853 // |pepper_last_mouse_event_target_|.
6846 pepper_last_mouse_event_target_ = nullptr; 6854 pepper_last_mouse_event_target_ = nullptr;
6847 #endif 6855 #endif
6848 } 6856 }
6849 6857
6850 } // namespace content 6858 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698