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 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1506 IPC_MESSAGE_HANDLER(InputMsg_Unselect, OnUnselect) | 1506 IPC_MESSAGE_HANDLER(InputMsg_Unselect, OnUnselect) |
1507 IPC_MESSAGE_HANDLER(InputMsg_MoveRangeSelectionExtent, | 1507 IPC_MESSAGE_HANDLER(InputMsg_MoveRangeSelectionExtent, |
1508 OnMoveRangeSelectionExtent) | 1508 OnMoveRangeSelectionExtent) |
1509 IPC_MESSAGE_HANDLER(InputMsg_Replace, OnReplace) | 1509 IPC_MESSAGE_HANDLER(InputMsg_Replace, OnReplace) |
1510 IPC_MESSAGE_HANDLER(InputMsg_ReplaceMisspelling, OnReplaceMisspelling) | 1510 IPC_MESSAGE_HANDLER(InputMsg_ReplaceMisspelling, OnReplaceMisspelling) |
1511 IPC_MESSAGE_HANDLER(FrameMsg_CopyImageAt, OnCopyImageAt) | 1511 IPC_MESSAGE_HANDLER(FrameMsg_CopyImageAt, OnCopyImageAt) |
1512 IPC_MESSAGE_HANDLER(FrameMsg_SaveImageAt, OnSaveImageAt) | 1512 IPC_MESSAGE_HANDLER(FrameMsg_SaveImageAt, OnSaveImageAt) |
1513 IPC_MESSAGE_HANDLER(InputMsg_ExtendSelectionAndDelete, | 1513 IPC_MESSAGE_HANDLER(InputMsg_ExtendSelectionAndDelete, |
1514 OnExtendSelectionAndDelete) | 1514 OnExtendSelectionAndDelete) |
1515 IPC_MESSAGE_HANDLER(InputMsg_DeleteSurroundingText, OnDeleteSurroundingText) | 1515 IPC_MESSAGE_HANDLER(InputMsg_DeleteSurroundingText, OnDeleteSurroundingText) |
| 1516 IPC_MESSAGE_HANDLER(InputMsg_DeleteSurroundingTextInCodePoints, |
| 1517 OnDeleteSurroundingTextInCodePoints) |
1516 IPC_MESSAGE_HANDLER(InputMsg_SetCompositionFromExistingText, | 1518 IPC_MESSAGE_HANDLER(InputMsg_SetCompositionFromExistingText, |
1517 OnSetCompositionFromExistingText) | 1519 OnSetCompositionFromExistingText) |
1518 IPC_MESSAGE_HANDLER(InputMsg_SetEditableSelectionOffsets, | 1520 IPC_MESSAGE_HANDLER(InputMsg_SetEditableSelectionOffsets, |
1519 OnSetEditableSelectionOffsets) | 1521 OnSetEditableSelectionOffsets) |
1520 IPC_MESSAGE_HANDLER(InputMsg_ExecuteNoValueEditCommand, | 1522 IPC_MESSAGE_HANDLER(InputMsg_ExecuteNoValueEditCommand, |
1521 OnExecuteNoValueEditCommand) | 1523 OnExecuteNoValueEditCommand) |
1522 IPC_MESSAGE_HANDLER(FrameMsg_AddMessageToConsole, OnAddMessageToConsole) | 1524 IPC_MESSAGE_HANDLER(FrameMsg_AddMessageToConsole, OnAddMessageToConsole) |
1523 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest, | 1525 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest, |
1524 OnJavaScriptExecuteRequest) | 1526 OnJavaScriptExecuteRequest) |
1525 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestForTests, | 1527 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestForTests, |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2083 void RenderFrameImpl::OnExtendSelectionAndDelete(int before, int after) { | 2085 void RenderFrameImpl::OnExtendSelectionAndDelete(int before, int after) { |
2084 ImeEventGuard guard(GetRenderWidget()); | 2086 ImeEventGuard guard(GetRenderWidget()); |
2085 frame_->extendSelectionAndDelete(before, after); | 2087 frame_->extendSelectionAndDelete(before, after); |
2086 } | 2088 } |
2087 | 2089 |
2088 void RenderFrameImpl::OnDeleteSurroundingText(int before, int after) { | 2090 void RenderFrameImpl::OnDeleteSurroundingText(int before, int after) { |
2089 ImeEventGuard guard(GetRenderWidget()); | 2091 ImeEventGuard guard(GetRenderWidget()); |
2090 frame_->deleteSurroundingText(before, after); | 2092 frame_->deleteSurroundingText(before, after); |
2091 } | 2093 } |
2092 | 2094 |
| 2095 void RenderFrameImpl::OnDeleteSurroundingTextInCodePoints(int before, |
| 2096 int after) { |
| 2097 ImeEventGuard guard(GetRenderWidget()); |
| 2098 frame_->deleteSurroundingTextInCodePoints(before, after); |
| 2099 } |
| 2100 |
2093 void RenderFrameImpl::OnSetAccessibilityMode(AccessibilityMode new_mode) { | 2101 void RenderFrameImpl::OnSetAccessibilityMode(AccessibilityMode new_mode) { |
2094 if (accessibility_mode_ == new_mode) | 2102 if (accessibility_mode_ == new_mode) |
2095 return; | 2103 return; |
2096 accessibility_mode_ = new_mode; | 2104 accessibility_mode_ = new_mode; |
2097 if (render_accessibility_) { | 2105 if (render_accessibility_) { |
2098 // Note: this isn't called automatically by the destructor because | 2106 // Note: this isn't called automatically by the destructor because |
2099 // there'd be no point in calling it in frame teardown, only if there's | 2107 // there'd be no point in calling it in frame teardown, only if there's |
2100 // an accessibility mode change but the frame is persisting. | 2108 // an accessibility mode change but the frame is persisting. |
2101 render_accessibility_->DisableAccessibility(); | 2109 render_accessibility_->DisableAccessibility(); |
2102 | 2110 |
(...skipping 4748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6851 // event target. Potentially a Pepper plugin will receive the event. | 6859 // event target. Potentially a Pepper plugin will receive the event. |
6852 // In order to tell whether a plugin gets the last mouse event and which it | 6860 // In order to tell whether a plugin gets the last mouse event and which it |
6853 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6861 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6854 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6862 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6855 // |pepper_last_mouse_event_target_|. | 6863 // |pepper_last_mouse_event_target_|. |
6856 pepper_last_mouse_event_target_ = nullptr; | 6864 pepper_last_mouse_event_target_ = nullptr; |
6857 #endif | 6865 #endif |
6858 } | 6866 } |
6859 | 6867 |
6860 } // namespace content | 6868 } // namespace content |
OLD | NEW |