Chromium Code Reviews| 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 1741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1752 (content_view_core_ == content_view_core)); | 1752 (content_view_core_ == content_view_core)); |
| 1753 RemoveLayers(); | 1753 RemoveLayers(); |
| 1754 StopObservingRootWindow(); | 1754 StopObservingRootWindow(); |
| 1755 | 1755 |
| 1756 bool resize = false; | 1756 bool resize = false; |
| 1757 if (content_view_core != content_view_core_) { | 1757 if (content_view_core != content_view_core_) { |
| 1758 overscroll_controller_.reset(); | 1758 overscroll_controller_.reset(); |
| 1759 selection_controller_.reset(); | 1759 selection_controller_.reset(); |
| 1760 ReleaseLocksOnSurface(); | 1760 ReleaseLocksOnSurface(); |
| 1761 resize = true; | 1761 resize = true; |
| 1762 if (content_view_core_) { | 1762 if (content_view_core_ && !content_view_core) |
| 1763 if (!content_view_core) | 1763 content_view_core_->RemoveObserver(this); |
|
no sievers
2016/02/25 19:23:16
So that fixes the else-path where we might not hav
Yusuf
2016/02/25 19:37:03
Another good point. Right now, we never call a sin
| |
| 1764 content_view_core_->RemoveObserver(this); | 1764 else |
| 1765 else | 1765 content_view_core->AddObserver(this); |
| 1766 content_view_core->AddObserver(this); | |
| 1767 } | |
| 1768 } | 1766 } |
| 1769 | 1767 |
| 1770 content_view_core_ = content_view_core; | 1768 content_view_core_ = content_view_core; |
| 1771 | 1769 |
| 1772 BrowserAccessibilityManager* manager = NULL; | 1770 BrowserAccessibilityManager* manager = NULL; |
| 1773 if (host_) | 1771 if (host_) |
| 1774 manager = host_->GetRootBrowserAccessibilityManager(); | 1772 manager = host_->GetRootBrowserAccessibilityManager(); |
| 1775 if (manager) { | 1773 if (manager) { |
| 1776 base::android::ScopedJavaLocalRef<jobject> obj; | 1774 base::android::ScopedJavaLocalRef<jobject> obj; |
| 1777 if (content_view_core_) | 1775 if (content_view_core_) |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2046 results->orientationAngle = display.RotationAsDegree(); | 2044 results->orientationAngle = display.RotationAsDegree(); |
| 2047 results->orientationType = | 2045 results->orientationType = |
| 2048 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2046 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
| 2049 gfx::DeviceDisplayInfo info; | 2047 gfx::DeviceDisplayInfo info; |
| 2050 results->depth = info.GetBitsPerPixel(); | 2048 results->depth = info.GetBitsPerPixel(); |
| 2051 results->depthPerComponent = info.GetBitsPerComponent(); | 2049 results->depthPerComponent = info.GetBitsPerComponent(); |
| 2052 results->isMonochrome = (results->depthPerComponent == 0); | 2050 results->isMonochrome = (results->depthPerComponent == 0); |
| 2053 } | 2051 } |
| 2054 | 2052 |
| 2055 } // namespace content | 2053 } // namespace content |
| OLD | NEW |