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 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1610 } | 1610 } |
1611 | 1611 |
1612 void RenderWidgetHostViewAndroid::OnSetNeedsFlushInput() { | 1612 void RenderWidgetHostViewAndroid::OnSetNeedsFlushInput() { |
1613 TRACE_EVENT0("input", "RenderWidgetHostViewAndroid::OnSetNeedsFlushInput"); | 1613 TRACE_EVENT0("input", "RenderWidgetHostViewAndroid::OnSetNeedsFlushInput"); |
1614 RequestVSyncUpdate(FLUSH_INPUT); | 1614 RequestVSyncUpdate(FLUSH_INPUT); |
1615 } | 1615 } |
1616 | 1616 |
1617 BrowserAccessibilityManager* | 1617 BrowserAccessibilityManager* |
1618 RenderWidgetHostViewAndroid::CreateBrowserAccessibilityManager( | 1618 RenderWidgetHostViewAndroid::CreateBrowserAccessibilityManager( |
1619 BrowserAccessibilityDelegate* delegate) { | 1619 BrowserAccessibilityDelegate* delegate) { |
1620 // TODO(dmazzoni): Currently there can only be one | |
1621 // BrowserAccessibilityManager per ContentViewCore, so return NULL | |
1622 // if there's already a BrowserAccessibilityManager for the main | |
1623 // frame. Eventually, in order to support cross-process iframes on | |
1624 // Android we'll need to add support for a | |
1625 // BrowserAccessibilityManager for a child frame. | |
1626 // http://crbug.com/423846 | |
1627 if (!host_ || host_->GetRootBrowserAccessibilityManager()) | |
1628 return NULL; | |
1629 | |
1630 base::android::ScopedJavaLocalRef<jobject> obj; | 1620 base::android::ScopedJavaLocalRef<jobject> obj; |
1631 if (content_view_core_) | 1621 if (host_ && |
| 1622 host_->GetRootBrowserAccessibilityManager() && |
| 1623 content_view_core_) { |
1632 obj = content_view_core_->GetJavaObject(); | 1624 obj = content_view_core_->GetJavaObject(); |
| 1625 } |
1633 return new BrowserAccessibilityManagerAndroid( | 1626 return new BrowserAccessibilityManagerAndroid( |
1634 obj, | 1627 obj, |
1635 BrowserAccessibilityManagerAndroid::GetEmptyDocument(), | 1628 BrowserAccessibilityManagerAndroid::GetEmptyDocument(), |
1636 delegate); | 1629 delegate); |
1637 } | 1630 } |
1638 | 1631 |
1639 bool RenderWidgetHostViewAndroid::LockMouse() { | 1632 bool RenderWidgetHostViewAndroid::LockMouse() { |
1640 NOTIMPLEMENTED(); | 1633 NOTIMPLEMENTED(); |
1641 return false; | 1634 return false; |
1642 } | 1635 } |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2044 results->orientationAngle = display.RotationAsDegree(); | 2037 results->orientationAngle = display.RotationAsDegree(); |
2045 results->orientationType = | 2038 results->orientationType = |
2046 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2039 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
2047 gfx::DeviceDisplayInfo info; | 2040 gfx::DeviceDisplayInfo info; |
2048 results->depth = info.GetBitsPerPixel(); | 2041 results->depth = info.GetBitsPerPixel(); |
2049 results->depthPerComponent = info.GetBitsPerComponent(); | 2042 results->depthPerComponent = info.GetBitsPerComponent(); |
2050 results->isMonochrome = (results->depthPerComponent == 0); | 2043 results->isMonochrome = (results->depthPerComponent == 0); |
2051 } | 2044 } |
2052 | 2045 |
2053 } // namespace content | 2046 } // namespace content |
OLD | NEW |