| 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 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/android/build_info.h" | 10 #include "base/android/build_info.h" |
| (...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1604 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; | 1604 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; |
| 1605 } | 1605 } |
| 1606 | 1606 |
| 1607 void RenderWidgetHostViewAndroid::OnSetNeedsFlushInput() { | 1607 void RenderWidgetHostViewAndroid::OnSetNeedsFlushInput() { |
| 1608 TRACE_EVENT0("input", "RenderWidgetHostViewAndroid::OnSetNeedsFlushInput"); | 1608 TRACE_EVENT0("input", "RenderWidgetHostViewAndroid::OnSetNeedsFlushInput"); |
| 1609 RequestVSyncUpdate(FLUSH_INPUT); | 1609 RequestVSyncUpdate(FLUSH_INPUT); |
| 1610 } | 1610 } |
| 1611 | 1611 |
| 1612 BrowserAccessibilityManager* | 1612 BrowserAccessibilityManager* |
| 1613 RenderWidgetHostViewAndroid::CreateBrowserAccessibilityManager( | 1613 RenderWidgetHostViewAndroid::CreateBrowserAccessibilityManager( |
| 1614 BrowserAccessibilityDelegate* delegate) { | 1614 BrowserAccessibilityDelegate* delegate, bool for_root_frame) { |
| 1615 base::android::ScopedJavaLocalRef<jobject> obj; | 1615 base::android::ScopedJavaLocalRef<jobject> content_view_core_obj; |
| 1616 if (host_ && | 1616 if (for_root_frame && host_ && content_view_core_) |
| 1617 host_->GetRootBrowserAccessibilityManager() && | 1617 content_view_core_obj = content_view_core_->GetJavaObject(); |
| 1618 content_view_core_) { | |
| 1619 obj = content_view_core_->GetJavaObject(); | |
| 1620 } | |
| 1621 return new BrowserAccessibilityManagerAndroid( | 1618 return new BrowserAccessibilityManagerAndroid( |
| 1622 obj, | 1619 content_view_core_obj, |
| 1623 BrowserAccessibilityManagerAndroid::GetEmptyDocument(), | 1620 BrowserAccessibilityManagerAndroid::GetEmptyDocument(), |
| 1624 delegate); | 1621 delegate); |
| 1625 } | 1622 } |
| 1626 | 1623 |
| 1627 bool RenderWidgetHostViewAndroid::LockMouse() { | 1624 bool RenderWidgetHostViewAndroid::LockMouse() { |
| 1628 NOTIMPLEMENTED(); | 1625 NOTIMPLEMENTED(); |
| 1629 return false; | 1626 return false; |
| 1630 } | 1627 } |
| 1631 | 1628 |
| 1632 void RenderWidgetHostViewAndroid::UnlockMouse() { | 1629 void RenderWidgetHostViewAndroid::UnlockMouse() { |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2021 results->orientationAngle = display.RotationAsDegree(); | 2018 results->orientationAngle = display.RotationAsDegree(); |
| 2022 results->orientationType = | 2019 results->orientationType = |
| 2023 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2020 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
| 2024 gfx::DeviceDisplayInfo info; | 2021 gfx::DeviceDisplayInfo info; |
| 2025 results->depth = info.GetBitsPerPixel(); | 2022 results->depth = info.GetBitsPerPixel(); |
| 2026 results->depthPerComponent = info.GetBitsPerComponent(); | 2023 results->depthPerComponent = info.GetBitsPerComponent(); |
| 2027 results->isMonochrome = (results->depthPerComponent == 0); | 2024 results->isMonochrome = (results->depthPerComponent == 0); |
| 2028 } | 2025 } |
| 2029 | 2026 |
| 2030 } // namespace content | 2027 } // namespace content |
| OLD | NEW |