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

Side by Side Diff: content/renderer/render_widget.cc

Issue 2106753004: Introduce bottom controls to CC and let it respond to scrolling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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) 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 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 if (resizing_mode_selector_->NeverUsesSynchronousResize()) { 997 if (resizing_mode_selector_->NeverUsesSynchronousResize()) {
998 // A resize ack shouldn't be requested if we have not ACK'd the previous 998 // A resize ack shouldn't be requested if we have not ACK'd the previous
999 // one. 999 // one.
1000 DCHECK(!params.needs_resize_ack || !next_paint_is_resize_ack()); 1000 DCHECK(!params.needs_resize_ack || !next_paint_is_resize_ack());
1001 } 1001 }
1002 1002
1003 // Ignore this during shutdown. 1003 // Ignore this during shutdown.
1004 if (!webwidget_) 1004 if (!webwidget_)
1005 return; 1005 return;
1006 1006
1007 if (compositor_) 1007 if (compositor_) {
1008 compositor_->setViewportSize(params.physical_backing_size); 1008 compositor_->setViewportSize(params.physical_backing_size);
1009 compositor_->setBottomControlHeight(params.bottom_controls_height);
1010 }
1009 1011
1010 visible_viewport_size_ = params.visible_viewport_size; 1012 visible_viewport_size_ = params.visible_viewport_size;
1011 resizer_rect_ = params.resizer_rect; 1013 resizer_rect_ = params.resizer_rect;
1012 1014
1013 // NOTE: We may have entered fullscreen mode without changing our size. 1015 // NOTE: We may have entered fullscreen mode without changing our size.
1014 bool fullscreen_change = 1016 bool fullscreen_change =
1015 is_fullscreen_granted_ != params.is_fullscreen_granted; 1017 is_fullscreen_granted_ != params.is_fullscreen_granted;
1016 is_fullscreen_granted_ = params.is_fullscreen_granted; 1018 is_fullscreen_granted_ = params.is_fullscreen_granted;
1017 display_mode_ = params.display_mode; 1019 display_mode_ = params.display_mode;
1018 1020
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
1978 void RenderWidget::requestPointerUnlock() { 1980 void RenderWidget::requestPointerUnlock() {
1979 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); 1981 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get());
1980 } 1982 }
1981 1983
1982 bool RenderWidget::isPointerLocked() { 1984 bool RenderWidget::isPointerLocked() {
1983 return mouse_lock_dispatcher_->IsMouseLockedTo( 1985 return mouse_lock_dispatcher_->IsMouseLockedTo(
1984 webwidget_mouse_lock_target_.get()); 1986 webwidget_mouse_lock_target_.get());
1985 } 1987 }
1986 1988
1987 } // namespace content 1989 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698