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_base.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "content/browser/accessibility/browser_accessibility_manager.h" | 9 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 10 #include "content/browser/gpu/gpu_data_manager_impl.h" | 10 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 | 96 |
| 97 void RenderWidgetHostViewBase::SetBackgroundColorToDefault() { | 97 void RenderWidgetHostViewBase::SetBackgroundColorToDefault() { |
| 98 SetBackgroundColor(SK_ColorWHITE); | 98 SetBackgroundColor(SK_ColorWHITE); |
| 99 } | 99 } |
| 100 | 100 |
| 101 bool RenderWidgetHostViewBase::GetBackgroundOpaque() { | 101 bool RenderWidgetHostViewBase::GetBackgroundOpaque() { |
| 102 return SkColorGetA(background_color_) == SK_AlphaOPAQUE; | 102 return SkColorGetA(background_color_) == SK_AlphaOPAQUE; |
| 103 } | 103 } |
| 104 | 104 |
| 105 gfx::Size RenderWidgetHostViewBase::GetPhysicalBackingSize() const { | 105 gfx::Size RenderWidgetHostViewBase::GetPhysicalBackingSize() const { |
| 106 display::Display display = | 106 display::Screen* screen = display::Screen::GetScreen(); |
| 107 display::Screen::GetScreen()->GetDisplayNearestWindow(GetNativeView()); | 107 if (!screen) |
|
boliu
2017/02/08 20:13:34
I'm curious which tests and which platform had had
sky
2017/02/08 23:21:36
+1 to this. I'm mildly worried this is going to ca
johnme
2017/02/09 18:59:29
Good news - it turns out this change to GetPhysica
| |
| 108 return gfx::Size(); | |
| 109 display::Display display = screen->GetDisplayNearestWindow(GetNativeView()); | |
| 108 return gfx::ScaleToCeiledSize(GetRequestedRendererSize(), | 110 return gfx::ScaleToCeiledSize(GetRequestedRendererSize(), |
| 109 display.device_scale_factor()); | 111 display.device_scale_factor()); |
| 110 } | 112 } |
| 111 | 113 |
| 112 bool RenderWidgetHostViewBase::DoBrowserControlsShrinkBlinkSize() const { | 114 bool RenderWidgetHostViewBase::DoBrowserControlsShrinkBlinkSize() const { |
| 113 return false; | 115 return false; |
| 114 } | 116 } |
| 115 | 117 |
| 116 float RenderWidgetHostViewBase::GetTopControlsHeight() const { | 118 float RenderWidgetHostViewBase::GetTopControlsHeight() const { |
| 117 return 0.f; | 119 return 0.f; |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 501 | 503 |
| 502 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const { | 504 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const { |
| 503 return false; | 505 return false; |
| 504 } | 506 } |
| 505 | 507 |
| 506 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const { | 508 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const { |
| 507 return cc::SurfaceId(); | 509 return cc::SurfaceId(); |
| 508 } | 510 } |
| 509 | 511 |
| 510 } // namespace content | 512 } // namespace content |
| OLD | NEW |