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_widget.h" | 5 #include "content/renderer/render_widget.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1645 void RenderWidget::UpdateSelectionBounds() { | 1645 void RenderWidget::UpdateSelectionBounds() { |
1646 if (!webwidget_) | 1646 if (!webwidget_) |
1647 return; | 1647 return; |
1648 | 1648 |
1649 gfx::Rect start_rect; | 1649 gfx::Rect start_rect; |
1650 gfx::Rect end_rect; | 1650 gfx::Rect end_rect; |
1651 GetSelectionBounds(&start_rect, &end_rect); | 1651 GetSelectionBounds(&start_rect, &end_rect); |
1652 if (selection_start_rect_ != start_rect || selection_end_rect_ != end_rect) { | 1652 if (selection_start_rect_ != start_rect || selection_end_rect_ != end_rect) { |
1653 selection_start_rect_ = start_rect; | 1653 selection_start_rect_ = start_rect; |
1654 selection_end_rect_ = end_rect; | 1654 selection_end_rect_ = end_rect; |
1655 Send(new ViewHostMsg_SelectionBoundsChanged( | 1655 WebTextDirection start_dir = WebKit::WebTextDirectionLeftToRight; |
1656 routing_id_, selection_start_rect_, selection_end_rect_)); | 1656 WebTextDirection end_dir = WebKit::WebTextDirectionLeftToRight; |
| 1657 webwidget_->selectionTextDirection(start_dir, end_dir); |
| 1658 Send(new ViewHostMsg_SelectionBoundsChanged(routing_id_, |
| 1659 selection_start_rect_, start_dir, selection_end_rect_, end_dir)); |
1657 } | 1660 } |
1658 | 1661 |
1659 std::vector<gfx::Rect> character_bounds; | 1662 std::vector<gfx::Rect> character_bounds; |
1660 GetCompositionCharacterBounds(&character_bounds); | 1663 GetCompositionCharacterBounds(&character_bounds); |
1661 UpdateCompositionInfo(composition_range_, character_bounds); | 1664 UpdateCompositionInfo(composition_range_, character_bounds); |
1662 } | 1665 } |
1663 | 1666 |
1664 bool RenderWidget::ShouldUpdateCompositionInfo( | 1667 bool RenderWidget::ShouldUpdateCompositionInfo( |
1665 const ui::Range& range, | 1668 const ui::Range& range, |
1666 const std::vector<gfx::Rect>& bounds) { | 1669 const std::vector<gfx::Rect>& bounds) { |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1797 Send(new ViewHostMsg_BeginSmoothScroll(routing_id_, down, scroll_far)); | 1800 Send(new ViewHostMsg_BeginSmoothScroll(routing_id_, down, scroll_far)); |
1798 } | 1801 } |
1799 | 1802 |
1800 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { | 1803 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { |
1801 return false; | 1804 return false; |
1802 } | 1805 } |
1803 | 1806 |
1804 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { | 1807 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { |
1805 return false; | 1808 return false; |
1806 } | 1809 } |
OLD | NEW |