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 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1738 } | 1738 } |
1739 | 1739 |
1740 uint32_t RenderWidgetHostViewAndroid::GetSurfaceIdNamespace() { | 1740 uint32_t RenderWidgetHostViewAndroid::GetSurfaceIdNamespace() { |
1741 if (id_allocator_) | 1741 if (id_allocator_) |
1742 return id_allocator_->id_namespace(); | 1742 return id_allocator_->id_namespace(); |
1743 return 0; | 1743 return 0; |
1744 } | 1744 } |
1745 | 1745 |
1746 void RenderWidgetHostViewAndroid::SetContentViewCore( | 1746 void RenderWidgetHostViewAndroid::SetContentViewCore( |
1747 ContentViewCoreImpl* content_view_core) { | 1747 ContentViewCoreImpl* content_view_core) { |
| 1748 CHECK(!content_view_core_ || !content_view_core || (content_view_core_ == cont
ent_view_core)); |
1748 RemoveLayers(); | 1749 RemoveLayers(); |
1749 StopObservingRootWindow(); | 1750 StopObservingRootWindow(); |
1750 | 1751 |
1751 bool resize = false; | 1752 bool resize = false; |
1752 if (content_view_core != content_view_core_) { | 1753 if (content_view_core != content_view_core_) { |
1753 overscroll_controller_.reset(); | 1754 overscroll_controller_.reset(); |
1754 selection_controller_.reset(); | 1755 selection_controller_.reset(); |
1755 ReleaseLocksOnSurface(); | 1756 ReleaseLocksOnSurface(); |
1756 resize = true; | 1757 resize = true; |
1757 } | 1758 } |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2012 results->orientationAngle = display.RotationAsDegree(); | 2013 results->orientationAngle = display.RotationAsDegree(); |
2013 results->orientationType = | 2014 results->orientationType = |
2014 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2015 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
2015 gfx::DeviceDisplayInfo info; | 2016 gfx::DeviceDisplayInfo info; |
2016 results->depth = info.GetBitsPerPixel(); | 2017 results->depth = info.GetBitsPerPixel(); |
2017 results->depthPerComponent = info.GetBitsPerComponent(); | 2018 results->depthPerComponent = info.GetBitsPerComponent(); |
2018 results->isMonochrome = (results->depthPerComponent == 0); | 2019 results->isMonochrome = (results->depthPerComponent == 0); |
2019 } | 2020 } |
2020 | 2021 |
2021 } // namespace content | 2022 } // namespace content |
OLD | NEW |