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/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1028 return gfx::ScaleToCeiledSize(size_, GetOriginalDeviceScaleFactor()); | 1028 return gfx::ScaleToCeiledSize(size_, GetOriginalDeviceScaleFactor()); |
1029 | 1029 |
1030 return size_; | 1030 return size_; |
1031 } | 1031 } |
1032 | 1032 |
1033 void RenderWidget::Resize(const ResizeParams& params) { | 1033 void RenderWidget::Resize(const ResizeParams& params) { |
1034 bool orientation_changed = | 1034 bool orientation_changed = |
1035 screen_info_.orientation_angle != params.screen_info.orientation_angle || | 1035 screen_info_.orientation_angle != params.screen_info.orientation_angle || |
1036 screen_info_.orientation_type != params.screen_info.orientation_type; | 1036 screen_info_.orientation_type != params.screen_info.orientation_type; |
1037 | 1037 |
| 1038 LOG(ERROR) << "===amp=== resize render widget, current in vr = " << screen_inf
o_.in_vr; |
1038 screen_info_ = params.screen_info; | 1039 screen_info_ = params.screen_info; |
| 1040 LOG(ERROR) << "===amp=== resize render widget, passed in vr = " << screen_info
_.in_vr; |
1039 | 1041 |
1040 if (device_scale_factor_ != screen_info_.device_scale_factor) { | 1042 if (device_scale_factor_ != screen_info_.device_scale_factor) { |
1041 device_scale_factor_ = screen_info_.device_scale_factor; | 1043 device_scale_factor_ = screen_info_.device_scale_factor; |
1042 OnDeviceScaleFactorChanged(); | 1044 OnDeviceScaleFactorChanged(); |
1043 ScheduleComposite(); | 1045 ScheduleComposite(); |
1044 } | 1046 } |
1045 | 1047 |
1046 if (resizing_mode_selector_->NeverUsesSynchronousResize()) { | 1048 if (resizing_mode_selector_->NeverUsesSynchronousResize()) { |
1047 // A resize ack shouldn't be requested if we have not ACK'd the previous | 1049 // A resize ack shouldn't be requested if we have not ACK'd the previous |
1048 // one. | 1050 // one. |
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2177 bool RenderWidget::isPointerLocked() { | 2179 bool RenderWidget::isPointerLocked() { |
2178 return mouse_lock_dispatcher_->IsMouseLockedTo( | 2180 return mouse_lock_dispatcher_->IsMouseLockedTo( |
2179 webwidget_mouse_lock_target_.get()); | 2181 webwidget_mouse_lock_target_.get()); |
2180 } | 2182 } |
2181 | 2183 |
2182 blink::WebWidget* RenderWidget::GetWebWidget() const { | 2184 blink::WebWidget* RenderWidget::GetWebWidget() const { |
2183 return webwidget_internal_; | 2185 return webwidget_internal_; |
2184 } | 2186 } |
2185 | 2187 |
2186 } // namespace content | 2188 } // namespace content |
OLD | NEW |