| 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 1591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1602 } | 1602 } |
| 1603 | 1603 |
| 1604 void RenderWidgetHostViewAndroid::OnSetNeedsFlushInput() { | 1604 void RenderWidgetHostViewAndroid::OnSetNeedsFlushInput() { |
| 1605 TRACE_EVENT0("input", "RenderWidgetHostViewAndroid::OnSetNeedsFlushInput"); | 1605 TRACE_EVENT0("input", "RenderWidgetHostViewAndroid::OnSetNeedsFlushInput"); |
| 1606 RequestVSyncUpdate(FLUSH_INPUT); | 1606 RequestVSyncUpdate(FLUSH_INPUT); |
| 1607 } | 1607 } |
| 1608 | 1608 |
| 1609 BrowserAccessibilityManager* | 1609 BrowserAccessibilityManager* |
| 1610 RenderWidgetHostViewAndroid::CreateBrowserAccessibilityManager( | 1610 RenderWidgetHostViewAndroid::CreateBrowserAccessibilityManager( |
| 1611 BrowserAccessibilityDelegate* delegate) { | 1611 BrowserAccessibilityDelegate* delegate) { |
| 1612 // TODO(dmazzoni): Currently there can only be one | |
| 1613 // BrowserAccessibilityManager per ContentViewCore, so return NULL | |
| 1614 // if there's already a BrowserAccessibilityManager for the main | |
| 1615 // frame. Eventually, in order to support cross-process iframes on | |
| 1616 // Android we'll need to add support for a | |
| 1617 // BrowserAccessibilityManager for a child frame. | |
| 1618 // http://crbug.com/423846 | |
| 1619 if (!host_ || host_->GetRootBrowserAccessibilityManager()) | |
| 1620 return NULL; | |
| 1621 | |
| 1622 base::android::ScopedJavaLocalRef<jobject> obj; | 1612 base::android::ScopedJavaLocalRef<jobject> obj; |
| 1623 if (content_view_core_) | 1613 if (host_ && |
| 1614 host_->GetRootBrowserAccessibilityManager() && |
| 1615 content_view_core_) { |
| 1624 obj = content_view_core_->GetJavaObject(); | 1616 obj = content_view_core_->GetJavaObject(); |
| 1617 } |
| 1625 return new BrowserAccessibilityManagerAndroid( | 1618 return new BrowserAccessibilityManagerAndroid( |
| 1626 obj, | 1619 obj, |
| 1627 BrowserAccessibilityManagerAndroid::GetEmptyDocument(), | 1620 BrowserAccessibilityManagerAndroid::GetEmptyDocument(), |
| 1628 delegate); | 1621 delegate); |
| 1629 } | 1622 } |
| 1630 | 1623 |
| 1631 bool RenderWidgetHostViewAndroid::LockMouse() { | 1624 bool RenderWidgetHostViewAndroid::LockMouse() { |
| 1632 NOTIMPLEMENTED(); | 1625 NOTIMPLEMENTED(); |
| 1633 return false; | 1626 return false; |
| 1634 } | 1627 } |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2022 results->orientationAngle = display.RotationAsDegree(); | 2015 results->orientationAngle = display.RotationAsDegree(); |
| 2023 results->orientationType = | 2016 results->orientationType = |
| 2024 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2017 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
| 2025 gfx::DeviceDisplayInfo info; | 2018 gfx::DeviceDisplayInfo info; |
| 2026 results->depth = info.GetBitsPerPixel(); | 2019 results->depth = info.GetBitsPerPixel(); |
| 2027 results->depthPerComponent = info.GetBitsPerComponent(); | 2020 results->depthPerComponent = info.GetBitsPerComponent(); |
| 2028 results->isMonochrome = (results->depthPerComponent == 0); | 2021 results->isMonochrome = (results->depthPerComponent == 0); |
| 2029 } | 2022 } |
| 2030 | 2023 |
| 2031 } // namespace content | 2024 } // namespace content |
| OLD | NEW |