| 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" |
| 11 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h" | 11 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h" |
| 12 #include "content/browser/renderer_host/render_process_host_impl.h" | 12 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 13 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 13 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
| 14 #include "content/browser/renderer_host/render_widget_host_impl.h" | 14 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 15 #include "content/browser/renderer_host/render_widget_host_view_base_observer.h" | 15 #include "content/browser/renderer_host/render_widget_host_view_base_observer.h" |
| 16 #include "content/browser/renderer_host/render_widget_host_view_frame_subscriber
.h" | 16 #include "content/browser/renderer_host/render_widget_host_view_frame_subscriber
.h" |
| 17 #include "content/browser/renderer_host/text_input_manager.h" | 17 #include "content/browser/renderer_host/text_input_manager.h" |
| 18 #include "content/common/content_switches_internal.h" | 18 #include "content/common/content_switches_internal.h" |
| 19 #include "media/base/video_frame.h" | 19 #include "media/base/video_frame.h" |
| 20 #include "ui/display/display.h" | 20 #include "ui/base/layout.h" |
| 21 #include "ui/display/screen.h" | 21 #include "ui/display/screen.h" |
| 22 #include "ui/gfx/geometry/point_conversions.h" | 22 #include "ui/gfx/geometry/point_conversions.h" |
| 23 #include "ui/gfx/geometry/size_conversions.h" | 23 #include "ui/gfx/geometry/size_conversions.h" |
| 24 #include "ui/gfx/geometry/size_f.h" | 24 #include "ui/gfx/geometry/size_f.h" |
| 25 | 25 |
| 26 namespace content { | 26 namespace content { |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| 30 // How many microseconds apart input events should be flushed. | 30 // How many microseconds apart input events should be flushed. |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 97 |
| 98 void RenderWidgetHostViewBase::SetBackgroundColorToDefault() { | 98 void RenderWidgetHostViewBase::SetBackgroundColorToDefault() { |
| 99 SetBackgroundColor(SK_ColorWHITE); | 99 SetBackgroundColor(SK_ColorWHITE); |
| 100 } | 100 } |
| 101 | 101 |
| 102 bool RenderWidgetHostViewBase::GetBackgroundOpaque() { | 102 bool RenderWidgetHostViewBase::GetBackgroundOpaque() { |
| 103 return SkColorGetA(background_color_) == SK_AlphaOPAQUE; | 103 return SkColorGetA(background_color_) == SK_AlphaOPAQUE; |
| 104 } | 104 } |
| 105 | 105 |
| 106 gfx::Size RenderWidgetHostViewBase::GetPhysicalBackingSize() const { | 106 gfx::Size RenderWidgetHostViewBase::GetPhysicalBackingSize() const { |
| 107 display::Display display = | 107 return gfx::ScaleToCeiledSize( |
| 108 display::Screen::GetScreen()->GetDisplayNearestWindow(GetNativeView()); | 108 GetRequestedRendererSize(), |
| 109 return gfx::ScaleToCeiledSize(GetRequestedRendererSize(), | 109 ui::GetScaleFactorForNativeView(GetNativeView())); |
| 110 display.device_scale_factor()); | |
| 111 } | 110 } |
| 112 | 111 |
| 113 bool RenderWidgetHostViewBase::DoBrowserControlsShrinkBlinkSize() const { | 112 bool RenderWidgetHostViewBase::DoBrowserControlsShrinkBlinkSize() const { |
| 114 return false; | 113 return false; |
| 115 } | 114 } |
| 116 | 115 |
| 117 float RenderWidgetHostViewBase::GetTopControlsHeight() const { | 116 float RenderWidgetHostViewBase::GetTopControlsHeight() const { |
| 118 return 0.f; | 117 return 0.f; |
| 119 } | 118 } |
| 120 | 119 |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 | 514 |
| 516 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const { | 515 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const { |
| 517 return false; | 516 return false; |
| 518 } | 517 } |
| 519 | 518 |
| 520 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const { | 519 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const { |
| 521 return cc::SurfaceId(); | 520 return cc::SurfaceId(); |
| 522 } | 521 } |
| 523 | 522 |
| 524 } // namespace content | 523 } // namespace content |
| OLD | NEW |