OLD | NEW |
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 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1524 IPC_MESSAGE_HANDLER(InputMsg_Unselect, OnUnselect) | 1524 IPC_MESSAGE_HANDLER(InputMsg_Unselect, OnUnselect) |
1525 IPC_MESSAGE_HANDLER(InputMsg_MoveRangeSelectionExtent, | 1525 IPC_MESSAGE_HANDLER(InputMsg_MoveRangeSelectionExtent, |
1526 OnMoveRangeSelectionExtent) | 1526 OnMoveRangeSelectionExtent) |
1527 IPC_MESSAGE_HANDLER(InputMsg_Replace, OnReplace) | 1527 IPC_MESSAGE_HANDLER(InputMsg_Replace, OnReplace) |
1528 IPC_MESSAGE_HANDLER(InputMsg_ReplaceMisspelling, OnReplaceMisspelling) | 1528 IPC_MESSAGE_HANDLER(InputMsg_ReplaceMisspelling, OnReplaceMisspelling) |
1529 IPC_MESSAGE_HANDLER(FrameMsg_CopyImageAt, OnCopyImageAt) | 1529 IPC_MESSAGE_HANDLER(FrameMsg_CopyImageAt, OnCopyImageAt) |
1530 IPC_MESSAGE_HANDLER(FrameMsg_SaveImageAt, OnSaveImageAt) | 1530 IPC_MESSAGE_HANDLER(FrameMsg_SaveImageAt, OnSaveImageAt) |
1531 IPC_MESSAGE_HANDLER(InputMsg_ExtendSelectionAndDelete, | 1531 IPC_MESSAGE_HANDLER(InputMsg_ExtendSelectionAndDelete, |
1532 OnExtendSelectionAndDelete) | 1532 OnExtendSelectionAndDelete) |
1533 IPC_MESSAGE_HANDLER(InputMsg_DeleteSurroundingText, OnDeleteSurroundingText) | 1533 IPC_MESSAGE_HANDLER(InputMsg_DeleteSurroundingText, OnDeleteSurroundingText) |
| 1534 IPC_MESSAGE_HANDLER(InputMsg_DeleteSurroundingTextInCodePoints, |
| 1535 OnDeleteSurroundingTextInCodePoints) |
1534 IPC_MESSAGE_HANDLER(InputMsg_SetCompositionFromExistingText, | 1536 IPC_MESSAGE_HANDLER(InputMsg_SetCompositionFromExistingText, |
1535 OnSetCompositionFromExistingText) | 1537 OnSetCompositionFromExistingText) |
1536 IPC_MESSAGE_HANDLER(InputMsg_SetEditableSelectionOffsets, | 1538 IPC_MESSAGE_HANDLER(InputMsg_SetEditableSelectionOffsets, |
1537 OnSetEditableSelectionOffsets) | 1539 OnSetEditableSelectionOffsets) |
1538 IPC_MESSAGE_HANDLER(InputMsg_ExecuteNoValueEditCommand, | 1540 IPC_MESSAGE_HANDLER(InputMsg_ExecuteNoValueEditCommand, |
1539 OnExecuteNoValueEditCommand) | 1541 OnExecuteNoValueEditCommand) |
1540 IPC_MESSAGE_HANDLER(FrameMsg_AddMessageToConsole, OnAddMessageToConsole) | 1542 IPC_MESSAGE_HANDLER(FrameMsg_AddMessageToConsole, OnAddMessageToConsole) |
1541 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest, | 1543 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest, |
1542 OnJavaScriptExecuteRequest) | 1544 OnJavaScriptExecuteRequest) |
1543 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestForTests, | 1545 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestForTests, |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2094 void RenderFrameImpl::OnExtendSelectionAndDelete(int before, int after) { | 2096 void RenderFrameImpl::OnExtendSelectionAndDelete(int before, int after) { |
2095 ImeEventGuard guard(GetRenderWidget()); | 2097 ImeEventGuard guard(GetRenderWidget()); |
2096 frame_->extendSelectionAndDelete(before, after); | 2098 frame_->extendSelectionAndDelete(before, after); |
2097 } | 2099 } |
2098 | 2100 |
2099 void RenderFrameImpl::OnDeleteSurroundingText(int before, int after) { | 2101 void RenderFrameImpl::OnDeleteSurroundingText(int before, int after) { |
2100 ImeEventGuard guard(GetRenderWidget()); | 2102 ImeEventGuard guard(GetRenderWidget()); |
2101 frame_->deleteSurroundingText(before, after); | 2103 frame_->deleteSurroundingText(before, after); |
2102 } | 2104 } |
2103 | 2105 |
| 2106 void RenderFrameImpl::OnDeleteSurroundingTextInCodePoints(int before, |
| 2107 int after) { |
| 2108 ImeEventGuard guard(GetRenderWidget()); |
| 2109 frame_->deleteSurroundingTextInCodePoints(before, after); |
| 2110 } |
| 2111 |
2104 void RenderFrameImpl::OnSetAccessibilityMode(AccessibilityMode new_mode) { | 2112 void RenderFrameImpl::OnSetAccessibilityMode(AccessibilityMode new_mode) { |
2105 if (accessibility_mode_ == new_mode) | 2113 if (accessibility_mode_ == new_mode) |
2106 return; | 2114 return; |
2107 accessibility_mode_ = new_mode; | 2115 accessibility_mode_ = new_mode; |
2108 if (render_accessibility_) { | 2116 if (render_accessibility_) { |
2109 // Note: this isn't called automatically by the destructor because | 2117 // Note: this isn't called automatically by the destructor because |
2110 // there'd be no point in calling it in frame teardown, only if there's | 2118 // there'd be no point in calling it in frame teardown, only if there's |
2111 // an accessibility mode change but the frame is persisting. | 2119 // an accessibility mode change but the frame is persisting. |
2112 render_accessibility_->DisableAccessibility(); | 2120 render_accessibility_->DisableAccessibility(); |
2113 | 2121 |
(...skipping 4762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6876 // event target. Potentially a Pepper plugin will receive the event. | 6884 // event target. Potentially a Pepper plugin will receive the event. |
6877 // In order to tell whether a plugin gets the last mouse event and which it | 6885 // In order to tell whether a plugin gets the last mouse event and which it |
6878 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6886 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6879 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6887 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6880 // |pepper_last_mouse_event_target_|. | 6888 // |pepper_last_mouse_event_target_|. |
6881 pepper_last_mouse_event_target_ = nullptr; | 6889 pepper_last_mouse_event_target_ = nullptr; |
6882 #endif | 6890 #endif |
6883 } | 6891 } |
6884 | 6892 |
6885 } // namespace content | 6893 } // namespace content |
OLD | NEW |