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 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
998 if (resizing_mode_selector_->NeverUsesSynchronousResize()) { | 998 if (resizing_mode_selector_->NeverUsesSynchronousResize()) { |
999 // A resize ack shouldn't be requested if we have not ACK'd the previous | 999 // A resize ack shouldn't be requested if we have not ACK'd the previous |
1000 // one. | 1000 // one. |
1001 DCHECK(!params.needs_resize_ack || !next_paint_is_resize_ack()); | 1001 DCHECK(!params.needs_resize_ack || !next_paint_is_resize_ack()); |
1002 } | 1002 } |
1003 | 1003 |
1004 // Ignore this during shutdown. | 1004 // Ignore this during shutdown. |
1005 if (!webwidget_) | 1005 if (!webwidget_) |
1006 return; | 1006 return; |
1007 | 1007 |
1008 if (compositor_) | 1008 if (compositor_) { |
1009 compositor_->setViewportSize(params.physical_backing_size); | 1009 compositor_->setViewportSize(params.physical_backing_size); |
| 1010 compositor_->setBottomControlHeight(params.bottom_controls_height); |
| 1011 } |
1010 | 1012 |
1011 visible_viewport_size_ = params.visible_viewport_size; | 1013 visible_viewport_size_ = params.visible_viewport_size; |
1012 resizer_rect_ = params.resizer_rect; | 1014 resizer_rect_ = params.resizer_rect; |
1013 | 1015 |
1014 // NOTE: We may have entered fullscreen mode without changing our size. | 1016 // NOTE: We may have entered fullscreen mode without changing our size. |
1015 bool fullscreen_change = | 1017 bool fullscreen_change = |
1016 is_fullscreen_granted_ != params.is_fullscreen_granted; | 1018 is_fullscreen_granted_ != params.is_fullscreen_granted; |
1017 is_fullscreen_granted_ = params.is_fullscreen_granted; | 1019 is_fullscreen_granted_ = params.is_fullscreen_granted; |
1018 display_mode_ = params.display_mode; | 1020 display_mode_ = params.display_mode; |
1019 | 1021 |
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1979 void RenderWidget::requestPointerUnlock() { | 1981 void RenderWidget::requestPointerUnlock() { |
1980 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); | 1982 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); |
1981 } | 1983 } |
1982 | 1984 |
1983 bool RenderWidget::isPointerLocked() { | 1985 bool RenderWidget::isPointerLocked() { |
1984 return mouse_lock_dispatcher_->IsMouseLockedTo( | 1986 return mouse_lock_dispatcher_->IsMouseLockedTo( |
1985 webwidget_mouse_lock_target_.get()); | 1987 webwidget_mouse_lock_target_.get()); |
1986 } | 1988 } |
1987 | 1989 |
1988 } // namespace content | 1990 } // namespace content |
OLD | NEW |