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