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/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 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1236 DCHECK(content_view_core_); | 1236 DCHECK(content_view_core_); |
1237 DCHECK(using_browser_compositor_); | 1237 DCHECK(using_browser_compositor_); |
1238 content_view_core_->GetWindowAndroid()->SetNeedsAnimate(); | 1238 content_view_core_->GetWindowAndroid()->SetNeedsAnimate(); |
1239 } | 1239 } |
1240 | 1240 |
1241 void RenderWidgetHostViewAndroid::MoveCaret(const gfx::PointF& position) { | 1241 void RenderWidgetHostViewAndroid::MoveCaret(const gfx::PointF& position) { |
1242 MoveCaret(gfx::Point(position.x(), position.y())); | 1242 MoveCaret(gfx::Point(position.x(), position.y())); |
1243 } | 1243 } |
1244 | 1244 |
1245 void RenderWidgetHostViewAndroid::MoveRangeSelectionExtent( | 1245 void RenderWidgetHostViewAndroid::MoveRangeSelectionExtent( |
1246 const gfx::PointF& extent) { | 1246 const gfx::PointF& extent, |
| 1247 ui::TextSelectionGranularity granularity) { |
1247 DCHECK(content_view_core_); | 1248 DCHECK(content_view_core_); |
1248 content_view_core_->MoveRangeSelectionExtent(extent); | 1249 content_view_core_->MoveRangeSelectionExtent(extent, granularity); |
1249 } | 1250 } |
1250 | 1251 |
1251 void RenderWidgetHostViewAndroid::SelectBetweenCoordinates( | 1252 void RenderWidgetHostViewAndroid::SelectBetweenCoordinates( |
1252 const gfx::PointF& base, | 1253 const gfx::PointF& base, |
1253 const gfx::PointF& extent) { | 1254 const gfx::PointF& extent) { |
1254 DCHECK(content_view_core_); | 1255 DCHECK(content_view_core_); |
1255 content_view_core_->SelectBetweenCoordinates(base, extent); | 1256 content_view_core_->SelectBetweenCoordinates(base, extent); |
1256 } | 1257 } |
1257 | 1258 |
1258 void RenderWidgetHostViewAndroid::OnSelectionEvent( | 1259 void RenderWidgetHostViewAndroid::OnSelectionEvent( |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1923 results->orientationAngle = display.RotationAsDegree(); | 1924 results->orientationAngle = display.RotationAsDegree(); |
1924 results->orientationType = | 1925 results->orientationType = |
1925 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 1926 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
1926 gfx::DeviceDisplayInfo info; | 1927 gfx::DeviceDisplayInfo info; |
1927 results->depth = info.GetBitsPerPixel(); | 1928 results->depth = info.GetBitsPerPixel(); |
1928 results->depthPerComponent = info.GetBitsPerComponent(); | 1929 results->depthPerComponent = info.GetBitsPerComponent(); |
1929 results->isMonochrome = (results->depthPerComponent == 0); | 1930 results->isMonochrome = (results->depthPerComponent == 0); |
1930 } | 1931 } |
1931 | 1932 |
1932 } // namespace content | 1933 } // namespace content |
OLD | NEW |