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

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

Issue 2617443002: Implement ThreadedInputConnection.deleteSurroundingTextInCodePoints() (Closed)
Patch Set: Address yosin@'s review Created 3 years, 10 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 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 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after
1535 IPC_MESSAGE_HANDLER(InputMsg_Unselect, OnUnselect) 1535 IPC_MESSAGE_HANDLER(InputMsg_Unselect, OnUnselect)
1536 IPC_MESSAGE_HANDLER(InputMsg_MoveRangeSelectionExtent, 1536 IPC_MESSAGE_HANDLER(InputMsg_MoveRangeSelectionExtent,
1537 OnMoveRangeSelectionExtent) 1537 OnMoveRangeSelectionExtent)
1538 IPC_MESSAGE_HANDLER(InputMsg_Replace, OnReplace) 1538 IPC_MESSAGE_HANDLER(InputMsg_Replace, OnReplace)
1539 IPC_MESSAGE_HANDLER(InputMsg_ReplaceMisspelling, OnReplaceMisspelling) 1539 IPC_MESSAGE_HANDLER(InputMsg_ReplaceMisspelling, OnReplaceMisspelling)
1540 IPC_MESSAGE_HANDLER(FrameMsg_CopyImageAt, OnCopyImageAt) 1540 IPC_MESSAGE_HANDLER(FrameMsg_CopyImageAt, OnCopyImageAt)
1541 IPC_MESSAGE_HANDLER(FrameMsg_SaveImageAt, OnSaveImageAt) 1541 IPC_MESSAGE_HANDLER(FrameMsg_SaveImageAt, OnSaveImageAt)
1542 IPC_MESSAGE_HANDLER(InputMsg_ExtendSelectionAndDelete, 1542 IPC_MESSAGE_HANDLER(InputMsg_ExtendSelectionAndDelete,
1543 OnExtendSelectionAndDelete) 1543 OnExtendSelectionAndDelete)
1544 IPC_MESSAGE_HANDLER(InputMsg_DeleteSurroundingText, OnDeleteSurroundingText) 1544 IPC_MESSAGE_HANDLER(InputMsg_DeleteSurroundingText, OnDeleteSurroundingText)
1545 IPC_MESSAGE_HANDLER(InputMsg_DeleteSurroundingTextInCodePoints,
1546 OnDeleteSurroundingTextInCodePoints)
1545 IPC_MESSAGE_HANDLER(InputMsg_SetCompositionFromExistingText, 1547 IPC_MESSAGE_HANDLER(InputMsg_SetCompositionFromExistingText,
1546 OnSetCompositionFromExistingText) 1548 OnSetCompositionFromExistingText)
1547 IPC_MESSAGE_HANDLER(InputMsg_SetEditableSelectionOffsets, 1549 IPC_MESSAGE_HANDLER(InputMsg_SetEditableSelectionOffsets,
1548 OnSetEditableSelectionOffsets) 1550 OnSetEditableSelectionOffsets)
1549 IPC_MESSAGE_HANDLER(InputMsg_ExecuteNoValueEditCommand, 1551 IPC_MESSAGE_HANDLER(InputMsg_ExecuteNoValueEditCommand,
1550 OnExecuteNoValueEditCommand) 1552 OnExecuteNoValueEditCommand)
1551 IPC_MESSAGE_HANDLER(FrameMsg_AddMessageToConsole, OnAddMessageToConsole) 1553 IPC_MESSAGE_HANDLER(FrameMsg_AddMessageToConsole, OnAddMessageToConsole)
1552 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest, 1554 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest,
1553 OnJavaScriptExecuteRequest) 1555 OnJavaScriptExecuteRequest)
1554 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestForTests, 1556 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestForTests,
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
2109 void RenderFrameImpl::OnExtendSelectionAndDelete(int before, int after) { 2111 void RenderFrameImpl::OnExtendSelectionAndDelete(int before, int after) {
2110 ImeEventGuard guard(GetRenderWidget()); 2112 ImeEventGuard guard(GetRenderWidget());
2111 frame_->extendSelectionAndDelete(before, after); 2113 frame_->extendSelectionAndDelete(before, after);
2112 } 2114 }
2113 2115
2114 void RenderFrameImpl::OnDeleteSurroundingText(int before, int after) { 2116 void RenderFrameImpl::OnDeleteSurroundingText(int before, int after) {
2115 ImeEventGuard guard(GetRenderWidget()); 2117 ImeEventGuard guard(GetRenderWidget());
2116 frame_->deleteSurroundingText(before, after); 2118 frame_->deleteSurroundingText(before, after);
2117 } 2119 }
2118 2120
2121 void RenderFrameImpl::OnDeleteSurroundingTextInCodePoints(int before,
2122 int after) {
2123 ImeEventGuard guard(GetRenderWidget());
2124 frame_->deleteSurroundingTextInCodePoints(before, after);
2125 }
2126
2119 void RenderFrameImpl::OnSetAccessibilityMode(AccessibilityMode new_mode) { 2127 void RenderFrameImpl::OnSetAccessibilityMode(AccessibilityMode new_mode) {
2120 if (accessibility_mode_ == new_mode) 2128 if (accessibility_mode_ == new_mode)
2121 return; 2129 return;
2122 accessibility_mode_ = new_mode; 2130 accessibility_mode_ = new_mode;
2123 if (render_accessibility_) { 2131 if (render_accessibility_) {
2124 // Note: this isn't called automatically by the destructor because 2132 // Note: this isn't called automatically by the destructor because
2125 // there'd be no point in calling it in frame teardown, only if there's 2133 // there'd be no point in calling it in frame teardown, only if there's
2126 // an accessibility mode change but the frame is persisting. 2134 // an accessibility mode change but the frame is persisting.
2127 render_accessibility_->DisableAccessibility(); 2135 render_accessibility_->DisableAccessibility();
2128 2136
(...skipping 4697 matching lines...) Expand 10 before | Expand all | Expand 10 after
6826 // event target. Potentially a Pepper plugin will receive the event. 6834 // event target. Potentially a Pepper plugin will receive the event.
6827 // In order to tell whether a plugin gets the last mouse event and which it 6835 // In order to tell whether a plugin gets the last mouse event and which it
6828 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6836 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6829 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6837 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6830 // |pepper_last_mouse_event_target_|. 6838 // |pepper_last_mouse_event_target_|.
6831 pepper_last_mouse_event_target_ = nullptr; 6839 pepper_last_mouse_event_target_ = nullptr;
6832 #endif 6840 #endif
6833 } 6841 }
6834 6842
6835 } // namespace content 6843 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698