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

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

Issue 901813002: Normalize top controls offset to (0, 1), Chromium-side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace more EXPECT_EQ with EXPECT_FLOAT_EQ for windows bots Created 5 years, 10 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
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 top_controls_height_ = top_controls_height; 801 top_controls_height_ = top_controls_height;
802 visible_viewport_size_ = visible_viewport_size; 802 visible_viewport_size_ = visible_viewport_size;
803 resizer_rect_ = resizer_rect; 803 resizer_rect_ = resizer_rect;
804 804
805 // NOTE: We may have entered fullscreen mode without changing our size. 805 // NOTE: We may have entered fullscreen mode without changing our size.
806 bool fullscreen_change = is_fullscreen_ != is_fullscreen; 806 bool fullscreen_change = is_fullscreen_ != is_fullscreen;
807 if (fullscreen_change) 807 if (fullscreen_change)
808 WillToggleFullscreen(); 808 WillToggleFullscreen();
809 is_fullscreen_ = is_fullscreen; 809 is_fullscreen_ = is_fullscreen;
810 810
811 webwidget_->setTopControlsLayoutHeight(top_controls_shrink_blink_size_ 811 webwidget_->setTopControlsHeight(top_controls_height,
812 ? top_controls_height : 0.f); 812 top_controls_shrink_blink_size_);
813 813
814 if (size_ != new_size) { 814 if (size_ != new_size) {
815 size_ = new_size; 815 size_ = new_size;
816 816
817 // When resizing, we want to wait to paint before ACK'ing the resize. This 817 // When resizing, we want to wait to paint before ACK'ing the resize. This
818 // ensures that we only resize as fast as we can paint. We only need to 818 // ensures that we only resize as fast as we can paint. We only need to
819 // send an ACK if we are resized to a non-empty rect. 819 // send an ACK if we are resized to a non-empty rect.
820 webwidget_->resize(new_size); 820 webwidget_->resize(new_size);
821 } else if (!resizing_mode_selector_->is_synchronous_mode()) { 821 } else if (!resizing_mode_selector_->is_synchronous_mode()) {
822 resize_ack = NO_RESIZE_ACK; 822 resize_ack = NO_RESIZE_ACK;
(...skipping 1604 matching lines...) Expand 10 before | Expand all | Expand 10 after
2427 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { 2427 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) {
2428 video_hole_frames_.AddObserver(frame); 2428 video_hole_frames_.AddObserver(frame);
2429 } 2429 }
2430 2430
2431 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { 2431 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) {
2432 video_hole_frames_.RemoveObserver(frame); 2432 video_hole_frames_.RemoveObserver(frame);
2433 } 2433 }
2434 #endif // defined(VIDEO_HOLE) 2434 #endif // defined(VIDEO_HOLE)
2435 2435
2436 } // namespace content 2436 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698