| 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 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1532 | 1532 |
| 1533 // TODO(jrg): Find out the implications and answer correctly here, | 1533 // TODO(jrg): Find out the implications and answer correctly here, |
| 1534 // as we are returning the WebView and not root window bounds. | 1534 // as we are returning the WebView and not root window bounds. |
| 1535 gfx::Rect RenderWidgetHostViewAndroid::GetBoundsInRootWindow() { | 1535 gfx::Rect RenderWidgetHostViewAndroid::GetBoundsInRootWindow() { |
| 1536 return GetViewBounds(); | 1536 return GetViewBounds(); |
| 1537 } | 1537 } |
| 1538 | 1538 |
| 1539 gfx::GLSurfaceHandle RenderWidgetHostViewAndroid::GetCompositingSurface() { | 1539 gfx::GLSurfaceHandle RenderWidgetHostViewAndroid::GetCompositingSurface() { |
| 1540 gfx::GLSurfaceHandle handle = | 1540 gfx::GLSurfaceHandle handle = |
| 1541 gfx::GLSurfaceHandle(gfx::kNullPluginWindow, gfx::NULL_TRANSPORT); | 1541 gfx::GLSurfaceHandle(gfx::kNullPluginWindow, gfx::NULL_TRANSPORT); |
| 1542 if (using_browser_compositor_) { | 1542 // Null check for when we're running inside content_unittests. |
| 1543 if (using_browser_compositor_ && BrowserGpuChannelHostFactory::instance()) { |
| 1543 handle.parent_client_id = | 1544 handle.parent_client_id = |
| 1544 BrowserGpuChannelHostFactory::instance()->GetGpuChannelId(); | 1545 BrowserGpuChannelHostFactory::instance()->GetGpuChannelId(); |
| 1545 } | 1546 } |
| 1546 return handle; | 1547 return handle; |
| 1547 } | 1548 } |
| 1548 | 1549 |
| 1549 void RenderWidgetHostViewAndroid::ProcessAckedTouchEvent( | 1550 void RenderWidgetHostViewAndroid::ProcessAckedTouchEvent( |
| 1550 const TouchEventWithLatencyInfo& touch, InputEventAckState ack_result) { | 1551 const TouchEventWithLatencyInfo& touch, InputEventAckState ack_result) { |
| 1551 const bool event_consumed = ack_result == INPUT_EVENT_ACK_STATE_CONSUMED; | 1552 const bool event_consumed = ack_result == INPUT_EVENT_ACK_STATE_CONSUMED; |
| 1552 gesture_provider_.OnTouchEventAck(touch.event.uniqueTouchEventId, | 1553 gesture_provider_.OnTouchEventAck(touch.event.uniqueTouchEventId, |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2017 results->orientationAngle = display.RotationAsDegree(); | 2018 results->orientationAngle = display.RotationAsDegree(); |
| 2018 results->orientationType = | 2019 results->orientationType = |
| 2019 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2020 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
| 2020 gfx::DeviceDisplayInfo info; | 2021 gfx::DeviceDisplayInfo info; |
| 2021 results->depth = info.GetBitsPerPixel(); | 2022 results->depth = info.GetBitsPerPixel(); |
| 2022 results->depthPerComponent = info.GetBitsPerComponent(); | 2023 results->depthPerComponent = info.GetBitsPerComponent(); |
| 2023 results->isMonochrome = (results->depthPerComponent == 0); | 2024 results->isMonochrome = (results->depthPerComponent == 0); |
| 2024 } | 2025 } |
| 2025 | 2026 |
| 2026 } // namespace content | 2027 } // namespace content |
| OLD | NEW |