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

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

Powered by Google App Engine
This is Rietveld 408576698