| 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 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1153 void RenderWidgetHostViewAndroid::SetNeedsAnimate() { | 1153 void RenderWidgetHostViewAndroid::SetNeedsAnimate() { |
| 1154 DCHECK(content_view_core_); | 1154 DCHECK(content_view_core_); |
| 1155 DCHECK(!using_synchronous_compositor_); | 1155 DCHECK(!using_synchronous_compositor_); |
| 1156 content_view_core_->GetWindowAndroid()->SetNeedsAnimate(); | 1156 content_view_core_->GetWindowAndroid()->SetNeedsAnimate(); |
| 1157 } | 1157 } |
| 1158 | 1158 |
| 1159 void RenderWidgetHostViewAndroid::MoveCaret(const gfx::PointF& position) { | 1159 void RenderWidgetHostViewAndroid::MoveCaret(const gfx::PointF& position) { |
| 1160 MoveCaret(gfx::Point(position.x(), position.y())); | 1160 MoveCaret(gfx::Point(position.x(), position.y())); |
| 1161 } | 1161 } |
| 1162 | 1162 |
| 1163 void RenderWidgetHostViewAndroid::MoveRangeSelectionExtent( |
| 1164 const gfx::PointF& extent) { |
| 1165 DCHECK(content_view_core_); |
| 1166 content_view_core_->MoveRangeSelectionExtent(extent); |
| 1167 } |
| 1168 |
| 1163 void RenderWidgetHostViewAndroid::SelectBetweenCoordinates( | 1169 void RenderWidgetHostViewAndroid::SelectBetweenCoordinates( |
| 1164 const gfx::PointF& start, | 1170 const gfx::PointF& base, |
| 1165 const gfx::PointF& end) { | 1171 const gfx::PointF& extent) { |
| 1166 DCHECK(content_view_core_); | 1172 DCHECK(content_view_core_); |
| 1167 content_view_core_->SelectBetweenCoordinates(start, end); | 1173 content_view_core_->SelectBetweenCoordinates(base, extent); |
| 1168 } | 1174 } |
| 1169 | 1175 |
| 1170 void RenderWidgetHostViewAndroid::OnSelectionEvent( | 1176 void RenderWidgetHostViewAndroid::OnSelectionEvent( |
| 1171 SelectionEventType event, | 1177 SelectionEventType event, |
| 1172 const gfx::PointF& position) { | 1178 const gfx::PointF& position) { |
| 1173 DCHECK(content_view_core_); | 1179 DCHECK(content_view_core_); |
| 1174 content_view_core_->OnSelectionEvent(event, position); | 1180 content_view_core_->OnSelectionEvent(event, position); |
| 1175 } | 1181 } |
| 1176 | 1182 |
| 1177 scoped_ptr<TouchHandleDrawable> RenderWidgetHostViewAndroid::CreateDrawable() { | 1183 scoped_ptr<TouchHandleDrawable> RenderWidgetHostViewAndroid::CreateDrawable() { |
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1805 results->orientationAngle = display.RotationAsDegree(); | 1811 results->orientationAngle = display.RotationAsDegree(); |
| 1806 results->orientationType = | 1812 results->orientationType = |
| 1807 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 1813 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
| 1808 gfx::DeviceDisplayInfo info; | 1814 gfx::DeviceDisplayInfo info; |
| 1809 results->depth = info.GetBitsPerPixel(); | 1815 results->depth = info.GetBitsPerPixel(); |
| 1810 results->depthPerComponent = info.GetBitsPerComponent(); | 1816 results->depthPerComponent = info.GetBitsPerComponent(); |
| 1811 results->isMonochrome = (results->depthPerComponent == 0); | 1817 results->isMonochrome = (results->depthPerComponent == 0); |
| 1812 } | 1818 } |
| 1813 | 1819 |
| 1814 } // namespace content | 1820 } // namespace content |
| OLD | NEW |