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 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1418 } | 1418 } |
1419 | 1419 |
1420 void RenderWidgetHostViewAndroid::OnSetNeedsFlushInput() { | 1420 void RenderWidgetHostViewAndroid::OnSetNeedsFlushInput() { |
1421 TRACE_EVENT0("input", "RenderWidgetHostViewAndroid::OnSetNeedsFlushInput"); | 1421 TRACE_EVENT0("input", "RenderWidgetHostViewAndroid::OnSetNeedsFlushInput"); |
1422 RequestVSyncUpdate(FLUSH_INPUT); | 1422 RequestVSyncUpdate(FLUSH_INPUT); |
1423 } | 1423 } |
1424 | 1424 |
1425 BrowserAccessibilityManager* | 1425 BrowserAccessibilityManager* |
1426 RenderWidgetHostViewAndroid::CreateBrowserAccessibilityManager( | 1426 RenderWidgetHostViewAndroid::CreateBrowserAccessibilityManager( |
1427 BrowserAccessibilityDelegate* delegate) { | 1427 BrowserAccessibilityDelegate* delegate) { |
| 1428 // TODO(dmazzoni): Currently there can only be one |
| 1429 // BrowserAccessibilityManager per ContentViewCore, so return NULL |
| 1430 // if there's already a BrowserAccessibilityManager for the main |
| 1431 // frame. Eventually, in order to support cross-process iframes on |
| 1432 // Android we'll need to add support for a |
| 1433 // BrowserAccessibilityManager for a child frame. |
| 1434 // http://crbug.com/423846 |
| 1435 if (!host_ || host_->GetRootBrowserAccessibilityManager()) |
| 1436 return NULL; |
| 1437 |
1428 base::android::ScopedJavaLocalRef<jobject> obj; | 1438 base::android::ScopedJavaLocalRef<jobject> obj; |
1429 if (content_view_core_) | 1439 if (content_view_core_) |
1430 obj = content_view_core_->GetJavaObject(); | 1440 obj = content_view_core_->GetJavaObject(); |
1431 return new BrowserAccessibilityManagerAndroid( | 1441 return new BrowserAccessibilityManagerAndroid( |
1432 obj, | 1442 obj, |
1433 BrowserAccessibilityManagerAndroid::GetEmptyDocument(), | 1443 BrowserAccessibilityManagerAndroid::GetEmptyDocument(), |
1434 delegate); | 1444 delegate); |
1435 } | 1445 } |
1436 | 1446 |
1437 bool RenderWidgetHostViewAndroid::LockMouse() { | 1447 bool RenderWidgetHostViewAndroid::LockMouse() { |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1772 results->orientationAngle = display.RotationAsDegree(); | 1782 results->orientationAngle = display.RotationAsDegree(); |
1773 results->orientationType = | 1783 results->orientationType = |
1774 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 1784 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
1775 gfx::DeviceDisplayInfo info; | 1785 gfx::DeviceDisplayInfo info; |
1776 results->depth = info.GetBitsPerPixel(); | 1786 results->depth = info.GetBitsPerPixel(); |
1777 results->depthPerComponent = info.GetBitsPerComponent(); | 1787 results->depthPerComponent = info.GetBitsPerComponent(); |
1778 results->isMonochrome = (results->depthPerComponent == 0); | 1788 results->isMonochrome = (results->depthPerComponent == 0); |
1779 } | 1789 } |
1780 | 1790 |
1781 } // namespace content | 1791 } // namespace content |
OLD | NEW |