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 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1394 IPC_MESSAGE_HANDLER(InputMsg_SelectRange, OnSelectRange) | 1394 IPC_MESSAGE_HANDLER(InputMsg_SelectRange, OnSelectRange) |
1395 IPC_MESSAGE_HANDLER(InputMsg_AdjustSelectionByCharacterOffset, | 1395 IPC_MESSAGE_HANDLER(InputMsg_AdjustSelectionByCharacterOffset, |
1396 OnAdjustSelectionByCharacterOffset) | 1396 OnAdjustSelectionByCharacterOffset) |
1397 IPC_MESSAGE_HANDLER(InputMsg_Unselect, OnUnselect) | 1397 IPC_MESSAGE_HANDLER(InputMsg_Unselect, OnUnselect) |
1398 IPC_MESSAGE_HANDLER(InputMsg_MoveRangeSelectionExtent, | 1398 IPC_MESSAGE_HANDLER(InputMsg_MoveRangeSelectionExtent, |
1399 OnMoveRangeSelectionExtent) | 1399 OnMoveRangeSelectionExtent) |
1400 IPC_MESSAGE_HANDLER(InputMsg_Replace, OnReplace) | 1400 IPC_MESSAGE_HANDLER(InputMsg_Replace, OnReplace) |
1401 IPC_MESSAGE_HANDLER(InputMsg_ReplaceMisspelling, OnReplaceMisspelling) | 1401 IPC_MESSAGE_HANDLER(InputMsg_ReplaceMisspelling, OnReplaceMisspelling) |
1402 IPC_MESSAGE_HANDLER(InputMsg_ExtendSelectionAndDelete, | 1402 IPC_MESSAGE_HANDLER(InputMsg_ExtendSelectionAndDelete, |
1403 OnExtendSelectionAndDelete) | 1403 OnExtendSelectionAndDelete) |
| 1404 IPC_MESSAGE_HANDLER(InputMsg_DeleteSurroundingText, OnDeleteSurroundingText) |
1404 IPC_MESSAGE_HANDLER(InputMsg_SetCompositionFromExistingText, | 1405 IPC_MESSAGE_HANDLER(InputMsg_SetCompositionFromExistingText, |
1405 OnSetCompositionFromExistingText) | 1406 OnSetCompositionFromExistingText) |
1406 IPC_MESSAGE_HANDLER(InputMsg_ExecuteNoValueEditCommand, | 1407 IPC_MESSAGE_HANDLER(InputMsg_ExecuteNoValueEditCommand, |
1407 OnExecuteNoValueEditCommand) | 1408 OnExecuteNoValueEditCommand) |
1408 IPC_MESSAGE_HANDLER(FrameMsg_CSSInsertRequest, OnCSSInsertRequest) | 1409 IPC_MESSAGE_HANDLER(FrameMsg_CSSInsertRequest, OnCSSInsertRequest) |
1409 IPC_MESSAGE_HANDLER(FrameMsg_AddMessageToConsole, OnAddMessageToConsole) | 1410 IPC_MESSAGE_HANDLER(FrameMsg_AddMessageToConsole, OnAddMessageToConsole) |
1410 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest, | 1411 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest, |
1411 OnJavaScriptExecuteRequest) | 1412 OnJavaScriptExecuteRequest) |
1412 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestForTests, | 1413 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestForTests, |
1413 OnJavaScriptExecuteRequestForTests) | 1414 OnJavaScriptExecuteRequestForTests) |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1956 } | 1957 } |
1957 | 1958 |
1958 void RenderFrameImpl::OnExtendSelectionAndDelete(int before, int after) { | 1959 void RenderFrameImpl::OnExtendSelectionAndDelete(int before, int after) { |
1959 if (!GetRenderWidget()->ShouldHandleImeEvent()) | 1960 if (!GetRenderWidget()->ShouldHandleImeEvent()) |
1960 return; | 1961 return; |
1961 | 1962 |
1962 ImeEventGuard guard(GetRenderWidget()); | 1963 ImeEventGuard guard(GetRenderWidget()); |
1963 frame_->extendSelectionAndDelete(before, after); | 1964 frame_->extendSelectionAndDelete(before, after); |
1964 } | 1965 } |
1965 | 1966 |
| 1967 void RenderFrameImpl::OnDeleteSurroundingText(int before, int after) { |
| 1968 if (!GetRenderWidget()->ShouldHandleImeEvent()) |
| 1969 return; |
| 1970 |
| 1971 ImeEventGuard guard(GetRenderWidget()); |
| 1972 frame_->deleteSurroundingText(before, after); |
| 1973 } |
| 1974 |
1966 void RenderFrameImpl::OnSetAccessibilityMode(AccessibilityMode new_mode) { | 1975 void RenderFrameImpl::OnSetAccessibilityMode(AccessibilityMode new_mode) { |
1967 if (accessibility_mode_ == new_mode) | 1976 if (accessibility_mode_ == new_mode) |
1968 return; | 1977 return; |
1969 accessibility_mode_ = new_mode; | 1978 accessibility_mode_ = new_mode; |
1970 if (renderer_accessibility_) { | 1979 if (renderer_accessibility_) { |
1971 // Note: this isn't called automatically by the destructor because | 1980 // Note: this isn't called automatically by the destructor because |
1972 // there'd be no point in calling it in frame teardown, only if there's | 1981 // there'd be no point in calling it in frame teardown, only if there's |
1973 // an accessibility mode change but the frame is persisting. | 1982 // an accessibility mode change but the frame is persisting. |
1974 renderer_accessibility_->DisableAccessibility(); | 1983 renderer_accessibility_->DisableAccessibility(); |
1975 | 1984 |
(...skipping 4064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6040 int match_count, | 6049 int match_count, |
6041 int ordinal, | 6050 int ordinal, |
6042 const WebRect& selection_rect, | 6051 const WebRect& selection_rect, |
6043 bool final_status_update) { | 6052 bool final_status_update) { |
6044 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, | 6053 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, |
6045 selection_rect, ordinal, | 6054 selection_rect, ordinal, |
6046 final_status_update)); | 6055 final_status_update)); |
6047 } | 6056 } |
6048 | 6057 |
6049 } // namespace content | 6058 } // namespace content |
OLD | NEW |