| 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 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1013 if (resizing_mode_selector_->NeverUsesSynchronousResize()) { | 1013 if (resizing_mode_selector_->NeverUsesSynchronousResize()) { |
| 1014 // A resize ack shouldn't be requested if we have not ACK'd the previous | 1014 // A resize ack shouldn't be requested if we have not ACK'd the previous |
| 1015 // one. | 1015 // one. |
| 1016 DCHECK(!params.needs_resize_ack || !next_paint_is_resize_ack()); | 1016 DCHECK(!params.needs_resize_ack || !next_paint_is_resize_ack()); |
| 1017 } | 1017 } |
| 1018 | 1018 |
| 1019 // Ignore this during shutdown. | 1019 // Ignore this during shutdown. |
| 1020 if (!webwidget_) | 1020 if (!webwidget_) |
| 1021 return; | 1021 return; |
| 1022 | 1022 |
| 1023 if (compositor_) | 1023 if (compositor_) { |
| 1024 compositor_->setViewportSize(params.physical_backing_size); | 1024 compositor_->setViewportSize(params.physical_backing_size); |
| 1025 compositor_->setBottomControlsHeight(params.bottom_controls_height); |
| 1026 } |
| 1025 | 1027 |
| 1026 visible_viewport_size_ = params.visible_viewport_size; | 1028 visible_viewport_size_ = params.visible_viewport_size; |
| 1027 resizer_rect_ = params.resizer_rect; | 1029 resizer_rect_ = params.resizer_rect; |
| 1028 | 1030 |
| 1029 // NOTE: We may have entered fullscreen mode without changing our size. | 1031 // NOTE: We may have entered fullscreen mode without changing our size. |
| 1030 bool fullscreen_change = | 1032 bool fullscreen_change = |
| 1031 is_fullscreen_granted_ != params.is_fullscreen_granted; | 1033 is_fullscreen_granted_ != params.is_fullscreen_granted; |
| 1032 is_fullscreen_granted_ = params.is_fullscreen_granted; | 1034 is_fullscreen_granted_ = params.is_fullscreen_granted; |
| 1033 display_mode_ = params.display_mode; | 1035 display_mode_ = params.display_mode; |
| 1034 | 1036 |
| (...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2064 void RenderWidget::requestPointerUnlock() { | 2066 void RenderWidget::requestPointerUnlock() { |
| 2065 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); | 2067 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); |
| 2066 } | 2068 } |
| 2067 | 2069 |
| 2068 bool RenderWidget::isPointerLocked() { | 2070 bool RenderWidget::isPointerLocked() { |
| 2069 return mouse_lock_dispatcher_->IsMouseLockedTo( | 2071 return mouse_lock_dispatcher_->IsMouseLockedTo( |
| 2070 webwidget_mouse_lock_target_.get()); | 2072 webwidget_mouse_lock_target_.get()); |
| 2071 } | 2073 } |
| 2072 | 2074 |
| 2073 } // namespace content | 2075 } // namespace content |
| OLD | NEW |