| 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 1913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1924 | 1924 |
| 1925 ViewHostMsg_SelectionBounds_Params params; | 1925 ViewHostMsg_SelectionBounds_Params params; |
| 1926 GetSelectionBounds(¶ms.anchor_rect, ¶ms.focus_rect); | 1926 GetSelectionBounds(¶ms.anchor_rect, ¶ms.focus_rect); |
| 1927 if (selection_anchor_rect_ != params.anchor_rect || | 1927 if (selection_anchor_rect_ != params.anchor_rect || |
| 1928 selection_focus_rect_ != params.focus_rect) { | 1928 selection_focus_rect_ != params.focus_rect) { |
| 1929 selection_anchor_rect_ = params.anchor_rect; | 1929 selection_anchor_rect_ = params.anchor_rect; |
| 1930 selection_focus_rect_ = params.focus_rect; | 1930 selection_focus_rect_ = params.focus_rect; |
| 1931 webwidget_->selectionTextDirection(params.focus_dir, params.anchor_dir); | 1931 webwidget_->selectionTextDirection(params.focus_dir, params.anchor_dir); |
| 1932 params.is_anchor_first = webwidget_->isSelectionAnchorFirst(); | 1932 params.is_anchor_first = webwidget_->isSelectionAnchorFirst(); |
| 1933 Send(new ViewHostMsg_SelectionBoundsChanged(routing_id_, params)); | 1933 Send(new ViewHostMsg_SelectionBoundsChanged(routing_id_, params)); |
| 1934 webwidget_->updateTouchEditing(); |
| 1934 } | 1935 } |
| 1935 | 1936 |
| 1936 std::vector<gfx::Rect> character_bounds; | 1937 std::vector<gfx::Rect> character_bounds; |
| 1937 GetCompositionCharacterBounds(&character_bounds); | 1938 GetCompositionCharacterBounds(&character_bounds); |
| 1938 UpdateCompositionInfo(composition_range_, character_bounds); | 1939 UpdateCompositionInfo(composition_range_, character_bounds); |
| 1939 } | 1940 } |
| 1940 | 1941 |
| 1941 bool RenderWidget::ShouldUpdateCompositionInfo( | 1942 bool RenderWidget::ShouldUpdateCompositionInfo( |
| 1942 const ui::Range& range, | 1943 const ui::Range& range, |
| 1943 const std::vector<gfx::Rect>& bounds) { | 1944 const std::vector<gfx::Rect>& bounds) { |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2136 bool RenderWidget::WillHandleGestureEvent( | 2137 bool RenderWidget::WillHandleGestureEvent( |
| 2137 const WebKit::WebGestureEvent& event) { | 2138 const WebKit::WebGestureEvent& event) { |
| 2138 return false; | 2139 return false; |
| 2139 } | 2140 } |
| 2140 | 2141 |
| 2141 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const { | 2142 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const { |
| 2142 return true; | 2143 return true; |
| 2143 } | 2144 } |
| 2144 | 2145 |
| 2145 } // namespace content | 2146 } // namespace content |
| OLD | NEW |