| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/frame_host/render_widget_host_view_child_frame.h" | 5 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
| 6 | 6 |
| 7 #include "cc/surfaces/surface.h" | 7 #include "cc/surfaces/surface.h" |
| 8 #include "cc/surfaces/surface_factory.h" | 8 #include "cc/surfaces/surface_factory.h" |
| 9 #include "cc/surfaces/surface_manager.h" | 9 #include "cc/surfaces/surface_manager.h" |
| 10 #include "cc/surfaces/surface_sequence.h" | 10 #include "cc/surfaces/surface_sequence.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 NOTREACHED(); | 123 NOTREACHED(); |
| 124 return NULL; | 124 return NULL; |
| 125 } | 125 } |
| 126 | 126 |
| 127 void RenderWidgetHostViewChildFrame::SetBackgroundColor(SkColor color) { | 127 void RenderWidgetHostViewChildFrame::SetBackgroundColor(SkColor color) { |
| 128 } | 128 } |
| 129 | 129 |
| 130 gfx::Size RenderWidgetHostViewChildFrame::GetPhysicalBackingSize() const { | 130 gfx::Size RenderWidgetHostViewChildFrame::GetPhysicalBackingSize() const { |
| 131 gfx::Size size; | 131 gfx::Size size; |
| 132 if (frame_connector_) { | 132 if (frame_connector_) { |
| 133 size = gfx::ToCeiledSize( | 133 size = gfx::ScaleToCeiledSize(frame_connector_->ChildFrameRect().size(), |
| 134 gfx::ScaleSize(frame_connector_->ChildFrameRect().size(), | 134 frame_connector_->device_scale_factor()); |
| 135 frame_connector_->device_scale_factor())); | |
| 136 } | 135 } |
| 137 return size; | 136 return size; |
| 138 } | 137 } |
| 139 | 138 |
| 140 void RenderWidgetHostViewChildFrame::InitAsPopup( | 139 void RenderWidgetHostViewChildFrame::InitAsPopup( |
| 141 RenderWidgetHostView* parent_host_view, | 140 RenderWidgetHostView* parent_host_view, |
| 142 const gfx::Rect& bounds) { | 141 const gfx::Rect& bounds) { |
| 143 NOTREACHED(); | 142 NOTREACHED(); |
| 144 } | 143 } |
| 145 | 144 |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 BrowserAccessibilityManager::GetEmptyDocument(), delegate); | 470 BrowserAccessibilityManager::GetEmptyDocument(), delegate); |
| 472 } | 471 } |
| 473 | 472 |
| 474 void RenderWidgetHostViewChildFrame::ClearCompositorSurfaceIfNecessary() { | 473 void RenderWidgetHostViewChildFrame::ClearCompositorSurfaceIfNecessary() { |
| 475 if (surface_factory_ && !surface_id_.is_null()) | 474 if (surface_factory_ && !surface_id_.is_null()) |
| 476 surface_factory_->Destroy(surface_id_); | 475 surface_factory_->Destroy(surface_id_); |
| 477 surface_id_ = cc::SurfaceId(); | 476 surface_id_ = cc::SurfaceId(); |
| 478 } | 477 } |
| 479 | 478 |
| 480 } // namespace content | 479 } // namespace content |
| OLD | NEW |