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