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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 2237433004: Adds DevTools commands for forced viewport override. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address Dmitry's comments + sync. Created 4 years, 3 months 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/renderer/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 layer_tree_host_->GetLayerTree()->animation_host(); 693 layer_tree_host_->GetLayerTree()->animation_host();
694 DCHECK(animation_host); 694 DCHECK(animation_host);
695 animation_host->RemoveAnimationTimeline(compositor_timeline); 695 animation_host->RemoveAnimationTimeline(compositor_timeline);
696 } 696 }
697 697
698 void RenderWidgetCompositor::setViewportSize( 698 void RenderWidgetCompositor::setViewportSize(
699 const WebSize& device_viewport_size) { 699 const WebSize& device_viewport_size) {
700 layer_tree_host_->GetLayerTree()->SetViewportSize(device_viewport_size); 700 layer_tree_host_->GetLayerTree()->SetViewportSize(device_viewport_size);
701 } 701 }
702 702
703 WebSize RenderWidgetCompositor::getViewportSize() const {
704 return layer_tree_host_->GetLayerTree()->device_viewport_size();
705 }
706
703 WebFloatPoint RenderWidgetCompositor::adjustEventPointForPinchZoom( 707 WebFloatPoint RenderWidgetCompositor::adjustEventPointForPinchZoom(
704 const WebFloatPoint& point) const { 708 const WebFloatPoint& point) const {
705 return point; 709 return point;
706 } 710 }
707 711
708 void RenderWidgetCompositor::setDeviceScaleFactor(float device_scale) { 712 void RenderWidgetCompositor::setDeviceScaleFactor(float device_scale) {
709 layer_tree_host_->GetLayerTree()->SetDeviceScaleFactor(device_scale); 713 layer_tree_host_->GetLayerTree()->SetDeviceScaleFactor(device_scale);
710 } 714 }
711 715
712 void RenderWidgetCompositor::setBackgroundColor(blink::WebColor color) { 716 void RenderWidgetCompositor::setBackgroundColor(blink::WebColor color) {
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 1147
1144 remote_proto_channel_receiver_->OnProtoReceived(std::move(deserialized)); 1148 remote_proto_channel_receiver_->OnProtoReceived(std::move(deserialized));
1145 } 1149 }
1146 1150
1147 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( 1151 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor(
1148 float device_scale) { 1152 float device_scale) {
1149 layer_tree_host_->GetLayerTree()->SetPaintedDeviceScaleFactor(device_scale); 1153 layer_tree_host_->GetLayerTree()->SetPaintedDeviceScaleFactor(device_scale);
1150 } 1154 }
1151 1155
1152 } // namespace content 1156 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698