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 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1264 content_view_core_->SelectBetweenCoordinates(base, extent); | 1264 content_view_core_->SelectBetweenCoordinates(base, extent); |
1265 } | 1265 } |
1266 | 1266 |
1267 void RenderWidgetHostViewAndroid::OnSelectionEvent( | 1267 void RenderWidgetHostViewAndroid::OnSelectionEvent( |
1268 ui::SelectionEventType event) { | 1268 ui::SelectionEventType event) { |
1269 DCHECK(content_view_core_); | 1269 DCHECK(content_view_core_); |
1270 DCHECK(selection_controller_); | 1270 DCHECK(selection_controller_); |
1271 // If a selection drag has started, it has taken over the active touch | 1271 // If a selection drag has started, it has taken over the active touch |
1272 // sequence. Immediately cancel gesture detection and any downstream touch | 1272 // sequence. Immediately cancel gesture detection and any downstream touch |
1273 // listeners (e.g., web content) to communicate this transfer. | 1273 // listeners (e.g., web content) to communicate this transfer. |
1274 if (event == ui::SELECTION_SHOWN) | 1274 if (event == ui::SELECTION_HANDLES_SHOWN) |
1275 ResetGestureDetection(); | 1275 ResetGestureDetection(); |
1276 content_view_core_->OnSelectionEvent( | 1276 content_view_core_->OnSelectionEvent( |
1277 event, selection_controller_->GetStartPosition(), | 1277 event, selection_controller_->GetStartPosition(), |
1278 GetSelectionRect(*selection_controller_)); | 1278 GetSelectionRect(*selection_controller_)); |
1279 } | 1279 } |
1280 | 1280 |
1281 scoped_ptr<ui::TouchHandleDrawable> | 1281 scoped_ptr<ui::TouchHandleDrawable> |
1282 RenderWidgetHostViewAndroid::CreateDrawable() { | 1282 RenderWidgetHostViewAndroid::CreateDrawable() { |
1283 DCHECK(content_view_core_); | 1283 DCHECK(content_view_core_); |
1284 if (!using_browser_compositor_) | 1284 if (!using_browser_compositor_) |
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2049 results->orientationAngle = display.RotationAsDegree(); | 2049 results->orientationAngle = display.RotationAsDegree(); |
2050 results->orientationType = | 2050 results->orientationType = |
2051 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2051 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
2052 gfx::DeviceDisplayInfo info; | 2052 gfx::DeviceDisplayInfo info; |
2053 results->depth = info.GetBitsPerPixel(); | 2053 results->depth = info.GetBitsPerPixel(); |
2054 results->depthPerComponent = info.GetBitsPerComponent(); | 2054 results->depthPerComponent = info.GetBitsPerComponent(); |
2055 results->isMonochrome = (results->depthPerComponent == 0); | 2055 results->isMonochrome = (results->depthPerComponent == 0); |
2056 } | 2056 } |
2057 | 2057 |
2058 } // namespace content | 2058 } // namespace content |
OLD | NEW |