OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1414 } | 1414 } |
1415 | 1415 |
1416 void RenderViewImpl::OnUnselect() { | 1416 void RenderViewImpl::OnUnselect() { |
1417 if (!webview()) | 1417 if (!webview()) |
1418 return; | 1418 return; |
1419 | 1419 |
1420 webview()->focusedFrame()->executeCommand(WebString::fromUTF8("Unselect")); | 1420 webview()->focusedFrame()->executeCommand(WebString::fromUTF8("Unselect")); |
1421 } | 1421 } |
1422 | 1422 |
1423 void RenderViewImpl::OnSetEditableSelectionOffsets(int start, int end) { | 1423 void RenderViewImpl::OnSetEditableSelectionOffsets(int start, int end) { |
1424 handling_ime_event_ = true; | |
jamesr
2013/02/01 00:22:10
What does this do? I can't find any code that cons
aurimas (slooooooooow)
2013/02/01 00:30:03
This is used in RenderWidget::UpdateTextInputState
| |
1424 webview()->setEditableSelectionOffsets(start, end); | 1425 webview()->setEditableSelectionOffsets(start, end); |
1426 handling_ime_event_ = false; | |
1427 UpdateTextInputState(DO_NOT_SHOW_IME); | |
1425 } | 1428 } |
1426 | 1429 |
1427 void RenderViewImpl::OnSetCompositionFromExistingText( | 1430 void RenderViewImpl::OnSetCompositionFromExistingText( |
1428 int start, int end, | 1431 int start, int end, |
1429 const std::vector<WebKit::WebCompositionUnderline>& underlines) { | 1432 const std::vector<WebKit::WebCompositionUnderline>& underlines) { |
1430 if (!webview()) | 1433 if (!webview()) |
1431 return; | 1434 return; |
1435 handling_ime_event_ = true; | |
1432 webview()->setCompositionFromExistingText(start, end, underlines); | 1436 webview()->setCompositionFromExistingText(start, end, underlines); |
1437 handling_ime_event_ = false; | |
1438 UpdateTextInputState(DO_NOT_SHOW_IME); | |
1433 } | 1439 } |
1434 | 1440 |
1435 void RenderViewImpl::OnExtendSelectionAndDelete(int before, int after) { | 1441 void RenderViewImpl::OnExtendSelectionAndDelete(int before, int after) { |
1436 if (!webview()) | 1442 if (!webview()) |
1437 return; | 1443 return; |
1444 handling_ime_event_ = true; | |
1438 webview()->extendSelectionAndDelete(before, after); | 1445 webview()->extendSelectionAndDelete(before, after); |
1446 handling_ime_event_ = false; | |
1447 UpdateTextInputState(DO_NOT_SHOW_IME); | |
1439 } | 1448 } |
1440 | 1449 |
1441 void RenderViewImpl::OnSelectRange(const gfx::Point& start, | 1450 void RenderViewImpl::OnSelectRange(const gfx::Point& start, |
1442 const gfx::Point& end) { | 1451 const gfx::Point& end) { |
1443 if (!webview()) | 1452 if (!webview()) |
1444 return; | 1453 return; |
1445 | 1454 |
1446 Send(new ViewHostMsg_SelectRange_ACK(routing_id_)); | 1455 Send(new ViewHostMsg_SelectRange_ACK(routing_id_)); |
1447 | 1456 |
1448 handling_select_range_ = true; | 1457 handling_select_range_ = true; |
(...skipping 5135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6584 } | 6593 } |
6585 #endif | 6594 #endif |
6586 | 6595 |
6587 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6596 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( |
6588 TransportDIB::Handle dib_handle) { | 6597 TransportDIB::Handle dib_handle) { |
6589 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6598 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
6590 RenderProcess::current()->ReleaseTransportDIB(dib); | 6599 RenderProcess::current()->ReleaseTransportDIB(dib); |
6591 } | 6600 } |
6592 | 6601 |
6593 } // namespace content | 6602 } // namespace content |
OLD | NEW |