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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 657803002: Update touch selection to only modify one selection point at a time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address issues and add tests Created 6 years, 1 month 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
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/browser/renderer_host/render_widget_host_view_android.h" 5 #include "content/browser/renderer_host/render_widget_host_view_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 void RenderWidgetHostViewAndroid::SetNeedsAnimate() { 1133 void RenderWidgetHostViewAndroid::SetNeedsAnimate() {
1134 DCHECK(content_view_core_); 1134 DCHECK(content_view_core_);
1135 DCHECK(!using_synchronous_compositor_); 1135 DCHECK(!using_synchronous_compositor_);
1136 content_view_core_->GetWindowAndroid()->SetNeedsAnimate(); 1136 content_view_core_->GetWindowAndroid()->SetNeedsAnimate();
1137 } 1137 }
1138 1138
1139 void RenderWidgetHostViewAndroid::MoveCaret(const gfx::PointF& position) { 1139 void RenderWidgetHostViewAndroid::MoveCaret(const gfx::PointF& position) {
1140 MoveCaret(gfx::Point(position.x(), position.y())); 1140 MoveCaret(gfx::Point(position.x(), position.y()));
1141 } 1141 }
1142 1142
1143 void RenderWidgetHostViewAndroid::MoveRangeSelectionExtent(
1144 const gfx::PointF& extent) {
1145 DCHECK(content_view_core_);
1146 content_view_core_->MoveRangeSelectionExtent(extent);
no sievers 2014/11/04 22:12:10 It seems a bit odd that we are going back from RWH
1147 }
1148
1143 void RenderWidgetHostViewAndroid::SelectBetweenCoordinates( 1149 void RenderWidgetHostViewAndroid::SelectBetweenCoordinates(
1144 const gfx::PointF& start, 1150 const gfx::PointF& base,
1145 const gfx::PointF& end) { 1151 const gfx::PointF& extent) {
1146 DCHECK(content_view_core_); 1152 DCHECK(content_view_core_);
1147 content_view_core_->SelectBetweenCoordinates(start, end); 1153 content_view_core_->SelectBetweenCoordinates(base, extent);
1148 } 1154 }
1149 1155
1150 void RenderWidgetHostViewAndroid::OnSelectionEvent( 1156 void RenderWidgetHostViewAndroid::OnSelectionEvent(
1151 SelectionEventType event, 1157 SelectionEventType event,
1152 const gfx::PointF& position) { 1158 const gfx::PointF& position) {
1153 DCHECK(content_view_core_); 1159 DCHECK(content_view_core_);
1154 content_view_core_->OnSelectionEvent(event, position); 1160 content_view_core_->OnSelectionEvent(event, position);
1155 } 1161 }
1156 1162
1157 scoped_ptr<TouchHandleDrawable> RenderWidgetHostViewAndroid::CreateDrawable() { 1163 scoped_ptr<TouchHandleDrawable> RenderWidgetHostViewAndroid::CreateDrawable() {
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
1772 results->orientationAngle = display.RotationAsDegree(); 1778 results->orientationAngle = display.RotationAsDegree();
1773 results->orientationType = 1779 results->orientationType =
1774 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 1780 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
1775 gfx::DeviceDisplayInfo info; 1781 gfx::DeviceDisplayInfo info;
1776 results->depth = info.GetBitsPerPixel(); 1782 results->depth = info.GetBitsPerPixel();
1777 results->depthPerComponent = info.GetBitsPerComponent(); 1783 results->depthPerComponent = info.GetBitsPerComponent();
1778 results->isMonochrome = (results->depthPerComponent == 0); 1784 results->isMonochrome = (results->depthPerComponent == 0);
1779 } 1785 }
1780 1786
1781 } // namespace content 1787 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698