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