| 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 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 908 cc::CompositorFrame frame) { | 908 cc::CompositorFrame frame) { |
| 909 TRACE_EVENT0("content", "RenderWidgetHostViewAura::OnSwapCompositorFrame"); | 909 TRACE_EVENT0("content", "RenderWidgetHostViewAura::OnSwapCompositorFrame"); |
| 910 | 910 |
| 911 // Override the background color to the current compositor background. | 911 // Override the background color to the current compositor background. |
| 912 // This allows us to, when navigating to a new page, transfer this color to | 912 // This allows us to, when navigating to a new page, transfer this color to |
| 913 // that page. This allows us to pass this background color to new views on | 913 // that page. This allows us to pass this background color to new views on |
| 914 // navigation. | 914 // navigation. |
| 915 SetBackgroundColor(frame.metadata.root_background_color); | 915 SetBackgroundColor(frame.metadata.root_background_color); |
| 916 | 916 |
| 917 last_scroll_offset_ = frame.metadata.root_scroll_offset; | 917 last_scroll_offset_ = frame.metadata.root_scroll_offset; |
| 918 if (frame.render_pass_list.empty()) | 918 if (!frame.delegated_frame_data) |
| 919 return; | 919 return; |
| 920 | 920 |
| 921 cc::Selection<gfx::SelectionBound> selection = frame.metadata.selection; | 921 cc::Selection<gfx::SelectionBound> selection = frame.metadata.selection; |
| 922 if (IsUseZoomForDSFEnabled()) { | 922 if (IsUseZoomForDSFEnabled()) { |
| 923 float viewportToDIPScale = 1.0f / current_device_scale_factor_; | 923 float viewportToDIPScale = 1.0f / current_device_scale_factor_; |
| 924 gfx::PointF start_edge_top = selection.start.edge_top(); | 924 gfx::PointF start_edge_top = selection.start.edge_top(); |
| 925 gfx::PointF start_edge_bottom = selection.start.edge_bottom(); | 925 gfx::PointF start_edge_bottom = selection.start.edge_bottom(); |
| 926 gfx::PointF end_edge_top = selection.end.edge_top(); | 926 gfx::PointF end_edge_top = selection.end.edge_top(); |
| 927 gfx::PointF end_edge_bottom = selection.end.edge_bottom(); | 927 gfx::PointF end_edge_bottom = selection.end.edge_bottom(); |
| 928 | 928 |
| (...skipping 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2387 | 2387 |
| 2388 void RenderWidgetHostViewAura::SetPopupChild( | 2388 void RenderWidgetHostViewAura::SetPopupChild( |
| 2389 RenderWidgetHostViewAura* popup_child_host_view) { | 2389 RenderWidgetHostViewAura* popup_child_host_view) { |
| 2390 popup_child_host_view_ = popup_child_host_view; | 2390 popup_child_host_view_ = popup_child_host_view; |
| 2391 event_handler_->SetPopupChild( | 2391 event_handler_->SetPopupChild( |
| 2392 popup_child_host_view, | 2392 popup_child_host_view, |
| 2393 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); | 2393 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); |
| 2394 } | 2394 } |
| 2395 | 2395 |
| 2396 } // namespace content | 2396 } // namespace content |
| OLD | NEW |