Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: content/renderer/render_widget.cc

Issue 12321005: Enable touch based selection and editing for webpages behind a flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
1924 1924
1925 ViewHostMsg_SelectionBounds_Params params; 1925 ViewHostMsg_SelectionBounds_Params params;
1926 GetSelectionBounds(&params.anchor_rect, &params.focus_rect); 1926 GetSelectionBounds(&params.anchor_rect, &params.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
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
OLDNEW
« content/port/browser/render_widget_host_view_port.h ('K') | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698