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_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1132 } | 1132 } |
1133 | 1133 |
1134 void RenderWidgetHostViewAura::OnLegacyWindowDestroyed() { | 1134 void RenderWidgetHostViewAura::OnLegacyWindowDestroyed() { |
1135 legacy_render_widget_host_HWND_ = NULL; | 1135 legacy_render_widget_host_HWND_ = NULL; |
1136 legacy_window_destroyed_ = true; | 1136 legacy_window_destroyed_ = true; |
1137 } | 1137 } |
1138 #endif | 1138 #endif |
1139 | 1139 |
1140 void RenderWidgetHostViewAura::OnSwapCompositorFrame( | 1140 void RenderWidgetHostViewAura::OnSwapCompositorFrame( |
1141 uint32_t output_surface_id, | 1141 uint32_t output_surface_id, |
1142 std::unique_ptr<cc::CompositorFrame> frame) { | 1142 cc::CompositorFrame frame) { |
1143 TRACE_EVENT0("content", "RenderWidgetHostViewAura::OnSwapCompositorFrame"); | 1143 TRACE_EVENT0("content", "RenderWidgetHostViewAura::OnSwapCompositorFrame"); |
1144 | 1144 |
1145 last_scroll_offset_ = frame->metadata.root_scroll_offset; | 1145 last_scroll_offset_ = frame.metadata.root_scroll_offset; |
1146 if (!frame->delegated_frame_data) | 1146 if (!frame.delegated_frame_data) |
1147 return; | 1147 return; |
1148 | 1148 |
1149 cc::Selection<gfx::SelectionBound> selection = frame->metadata.selection; | 1149 cc::Selection<gfx::SelectionBound> selection = frame.metadata.selection; |
1150 if (IsUseZoomForDSFEnabled()) { | 1150 if (IsUseZoomForDSFEnabled()) { |
1151 float viewportToDIPScale = 1.0f / current_device_scale_factor_; | 1151 float viewportToDIPScale = 1.0f / current_device_scale_factor_; |
1152 gfx::PointF start_edge_top = selection.start.edge_top(); | 1152 gfx::PointF start_edge_top = selection.start.edge_top(); |
1153 gfx::PointF start_edge_bottom = selection.start.edge_bottom(); | 1153 gfx::PointF start_edge_bottom = selection.start.edge_bottom(); |
1154 gfx::PointF end_edge_top = selection.end.edge_top(); | 1154 gfx::PointF end_edge_top = selection.end.edge_top(); |
1155 gfx::PointF end_edge_bottom = selection.end.edge_bottom(); | 1155 gfx::PointF end_edge_bottom = selection.end.edge_bottom(); |
1156 | 1156 |
1157 start_edge_top.Scale(viewportToDIPScale); | 1157 start_edge_top.Scale(viewportToDIPScale); |
1158 start_edge_bottom.Scale(viewportToDIPScale); | 1158 start_edge_bottom.Scale(viewportToDIPScale); |
1159 end_edge_top.Scale(viewportToDIPScale); | 1159 end_edge_top.Scale(viewportToDIPScale); |
(...skipping 1873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3033 | 3033 |
3034 //////////////////////////////////////////////////////////////////////////////// | 3034 //////////////////////////////////////////////////////////////////////////////// |
3035 // RenderWidgetHostViewBase, public: | 3035 // RenderWidgetHostViewBase, public: |
3036 | 3036 |
3037 // static | 3037 // static |
3038 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 3038 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
3039 GetScreenInfoForWindow(results, NULL); | 3039 GetScreenInfoForWindow(results, NULL); |
3040 } | 3040 } |
3041 | 3041 |
3042 } // namespace content | 3042 } // namespace content |
OLD | NEW |