Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 2449853004: Getting rid of DelegatedFrameData (Closed)
Patch Set: Addressed reviewers' concerns Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 legacy_window_destroyed_ = true; 900 legacy_window_destroyed_ = true;
901 } 901 }
902 #endif 902 #endif
903 903
904 void RenderWidgetHostViewAura::OnSwapCompositorFrame( 904 void RenderWidgetHostViewAura::OnSwapCompositorFrame(
905 uint32_t compositor_frame_sink_id, 905 uint32_t compositor_frame_sink_id,
906 cc::CompositorFrame frame) { 906 cc::CompositorFrame frame) {
907 TRACE_EVENT0("content", "RenderWidgetHostViewAura::OnSwapCompositorFrame"); 907 TRACE_EVENT0("content", "RenderWidgetHostViewAura::OnSwapCompositorFrame");
908 908
909 last_scroll_offset_ = frame.metadata.root_scroll_offset; 909 last_scroll_offset_ = frame.metadata.root_scroll_offset;
910 if (!frame.delegated_frame_data)
911 return;
912 910
913 cc::Selection<gfx::SelectionBound> selection = frame.metadata.selection; 911 cc::Selection<gfx::SelectionBound> selection = frame.metadata.selection;
914 if (IsUseZoomForDSFEnabled()) { 912 if (IsUseZoomForDSFEnabled()) {
915 float viewportToDIPScale = 1.0f / current_device_scale_factor_; 913 float viewportToDIPScale = 1.0f / current_device_scale_factor_;
916 gfx::PointF start_edge_top = selection.start.edge_top(); 914 gfx::PointF start_edge_top = selection.start.edge_top();
917 gfx::PointF start_edge_bottom = selection.start.edge_bottom(); 915 gfx::PointF start_edge_bottom = selection.start.edge_bottom();
918 gfx::PointF end_edge_top = selection.end.edge_top(); 916 gfx::PointF end_edge_top = selection.end.edge_top();
919 gfx::PointF end_edge_bottom = selection.end.edge_bottom(); 917 gfx::PointF end_edge_bottom = selection.end.edge_bottom();
920 918
921 start_edge_top.Scale(viewportToDIPScale); 919 start_edge_top.Scale(viewportToDIPScale);
(...skipping 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after
2381 2379
2382 void RenderWidgetHostViewAura::SetPopupChild( 2380 void RenderWidgetHostViewAura::SetPopupChild(
2383 RenderWidgetHostViewAura* popup_child_host_view) { 2381 RenderWidgetHostViewAura* popup_child_host_view) {
2384 popup_child_host_view_ = popup_child_host_view; 2382 popup_child_host_view_ = popup_child_host_view;
2385 event_handler_->SetPopupChild( 2383 event_handler_->SetPopupChild(
2386 popup_child_host_view, 2384 popup_child_host_view,
2387 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); 2385 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr);
2388 } 2386 }
2389 2387
2390 } // namespace content 2388 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698