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

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

Issue 2617443002: Implement ThreadedInputConnection.deleteSurroundingTextInCodePoints() (Closed)
Patch Set: Add more comments Created 3 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 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 1504 matching lines...) Expand 10 before | Expand all | Expand 10 after
1515 IPC_MESSAGE_HANDLER(InputMsg_Unselect, OnUnselect) 1515 IPC_MESSAGE_HANDLER(InputMsg_Unselect, OnUnselect)
1516 IPC_MESSAGE_HANDLER(InputMsg_MoveRangeSelectionExtent, 1516 IPC_MESSAGE_HANDLER(InputMsg_MoveRangeSelectionExtent,
1517 OnMoveRangeSelectionExtent) 1517 OnMoveRangeSelectionExtent)
1518 IPC_MESSAGE_HANDLER(InputMsg_Replace, OnReplace) 1518 IPC_MESSAGE_HANDLER(InputMsg_Replace, OnReplace)
1519 IPC_MESSAGE_HANDLER(InputMsg_ReplaceMisspelling, OnReplaceMisspelling) 1519 IPC_MESSAGE_HANDLER(InputMsg_ReplaceMisspelling, OnReplaceMisspelling)
1520 IPC_MESSAGE_HANDLER(FrameMsg_CopyImageAt, OnCopyImageAt) 1520 IPC_MESSAGE_HANDLER(FrameMsg_CopyImageAt, OnCopyImageAt)
1521 IPC_MESSAGE_HANDLER(FrameMsg_SaveImageAt, OnSaveImageAt) 1521 IPC_MESSAGE_HANDLER(FrameMsg_SaveImageAt, OnSaveImageAt)
1522 IPC_MESSAGE_HANDLER(InputMsg_ExtendSelectionAndDelete, 1522 IPC_MESSAGE_HANDLER(InputMsg_ExtendSelectionAndDelete,
1523 OnExtendSelectionAndDelete) 1523 OnExtendSelectionAndDelete)
1524 IPC_MESSAGE_HANDLER(InputMsg_DeleteSurroundingText, OnDeleteSurroundingText) 1524 IPC_MESSAGE_HANDLER(InputMsg_DeleteSurroundingText, OnDeleteSurroundingText)
1525 IPC_MESSAGE_HANDLER(InputMsg_DeleteSurroundingTextInCodePoints,
1526 OnDeleteSurroundingTextInCodePoints)
1525 IPC_MESSAGE_HANDLER(InputMsg_SetCompositionFromExistingText, 1527 IPC_MESSAGE_HANDLER(InputMsg_SetCompositionFromExistingText,
1526 OnSetCompositionFromExistingText) 1528 OnSetCompositionFromExistingText)
1527 IPC_MESSAGE_HANDLER(InputMsg_SetEditableSelectionOffsets, 1529 IPC_MESSAGE_HANDLER(InputMsg_SetEditableSelectionOffsets,
1528 OnSetEditableSelectionOffsets) 1530 OnSetEditableSelectionOffsets)
1529 IPC_MESSAGE_HANDLER(InputMsg_ExecuteNoValueEditCommand, 1531 IPC_MESSAGE_HANDLER(InputMsg_ExecuteNoValueEditCommand,
1530 OnExecuteNoValueEditCommand) 1532 OnExecuteNoValueEditCommand)
1531 IPC_MESSAGE_HANDLER(FrameMsg_AddMessageToConsole, OnAddMessageToConsole) 1533 IPC_MESSAGE_HANDLER(FrameMsg_AddMessageToConsole, OnAddMessageToConsole)
1532 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest, 1534 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest,
1533 OnJavaScriptExecuteRequest) 1535 OnJavaScriptExecuteRequest)
1534 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestForTests, 1536 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestForTests,
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
2096 void RenderFrameImpl::OnExtendSelectionAndDelete(int before, int after) { 2098 void RenderFrameImpl::OnExtendSelectionAndDelete(int before, int after) {
2097 ImeEventGuard guard(GetRenderWidget()); 2099 ImeEventGuard guard(GetRenderWidget());
2098 frame_->extendSelectionAndDelete(before, after); 2100 frame_->extendSelectionAndDelete(before, after);
2099 } 2101 }
2100 2102
2101 void RenderFrameImpl::OnDeleteSurroundingText(int before, int after) { 2103 void RenderFrameImpl::OnDeleteSurroundingText(int before, int after) {
2102 ImeEventGuard guard(GetRenderWidget()); 2104 ImeEventGuard guard(GetRenderWidget());
2103 frame_->deleteSurroundingText(before, after); 2105 frame_->deleteSurroundingText(before, after);
2104 } 2106 }
2105 2107
2108 void RenderFrameImpl::OnDeleteSurroundingTextInCodePoints(int before,
2109 int after) {
2110 ImeEventGuard guard(GetRenderWidget());
2111 frame_->deleteSurroundingTextInCodePoints(before, after);
2112 }
2113
2106 void RenderFrameImpl::OnSetAccessibilityMode(AccessibilityMode new_mode) { 2114 void RenderFrameImpl::OnSetAccessibilityMode(AccessibilityMode new_mode) {
2107 if (accessibility_mode_ == new_mode) 2115 if (accessibility_mode_ == new_mode)
2108 return; 2116 return;
2109 accessibility_mode_ = new_mode; 2117 accessibility_mode_ = new_mode;
2110 if (render_accessibility_) { 2118 if (render_accessibility_) {
2111 // Note: this isn't called automatically by the destructor because 2119 // Note: this isn't called automatically by the destructor because
2112 // there'd be no point in calling it in frame teardown, only if there's 2120 // there'd be no point in calling it in frame teardown, only if there's
2113 // an accessibility mode change but the frame is persisting. 2121 // an accessibility mode change but the frame is persisting.
2114 render_accessibility_->DisableAccessibility(); 2122 render_accessibility_->DisableAccessibility();
2115 2123
(...skipping 4636 matching lines...) Expand 10 before | Expand all | Expand 10 after
6752 // event target. Potentially a Pepper plugin will receive the event. 6760 // event target. Potentially a Pepper plugin will receive the event.
6753 // In order to tell whether a plugin gets the last mouse event and which it 6761 // In order to tell whether a plugin gets the last mouse event and which it
6754 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6762 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6755 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6763 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6756 // |pepper_last_mouse_event_target_|. 6764 // |pepper_last_mouse_event_target_|.
6757 pepper_last_mouse_event_target_ = nullptr; 6765 pepper_last_mouse_event_target_ = nullptr;
6758 #endif 6766 #endif
6759 } 6767 }
6760 6768
6761 } // namespace content 6769 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698