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

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

Issue 814083004: Notify main-thread of top controls state changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile error after rebase 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/render_view_impl_android.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 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 DCHECK(resize_ack != SEND_RESIZE_ACK || !next_paint_is_resize_ack()); 785 DCHECK(resize_ack != SEND_RESIZE_ACK || !next_paint_is_resize_ack());
786 DCHECK(resize_ack == SEND_RESIZE_ACK || resize_ack == NO_RESIZE_ACK); 786 DCHECK(resize_ack == SEND_RESIZE_ACK || resize_ack == NO_RESIZE_ACK);
787 } 787 }
788 788
789 // Ignore this during shutdown. 789 // Ignore this during shutdown.
790 if (!webwidget_) 790 if (!webwidget_)
791 return; 791 return;
792 792
793 if (compositor_) { 793 if (compositor_) {
794 compositor_->setViewportSize(new_size, physical_backing_size); 794 compositor_->setViewportSize(new_size, physical_backing_size);
795 compositor_->SetTopControlsShrinkBlinkSize(top_controls_shrink_blink_size);
796 compositor_->SetTopControlsHeight(top_controls_height);
797 } 795 }
798 796
799 physical_backing_size_ = physical_backing_size; 797 physical_backing_size_ = physical_backing_size;
800 top_controls_shrink_blink_size_ = top_controls_shrink_blink_size; 798 top_controls_shrink_blink_size_ = top_controls_shrink_blink_size;
801 top_controls_height_ = top_controls_height; 799 top_controls_height_ = top_controls_height;
802 visible_viewport_size_ = visible_viewport_size; 800 visible_viewport_size_ = visible_viewport_size;
803 resizer_rect_ = resizer_rect; 801 resizer_rect_ = resizer_rect;
804 802
805 // NOTE: We may have entered fullscreen mode without changing our size. 803 // NOTE: We may have entered fullscreen mode without changing our size.
806 bool fullscreen_change = is_fullscreen_ != is_fullscreen; 804 bool fullscreen_change = is_fullscreen_ != is_fullscreen;
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after
2417 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { 2415 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) {
2418 video_hole_frames_.AddObserver(frame); 2416 video_hole_frames_.AddObserver(frame);
2419 } 2417 }
2420 2418
2421 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { 2419 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) {
2422 video_hole_frames_.RemoveObserver(frame); 2420 video_hole_frames_.RemoveObserver(frame);
2423 } 2421 }
2424 #endif // defined(VIDEO_HOLE) 2422 #endif // defined(VIDEO_HOLE)
2425 2423
2426 } // namespace content 2424 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698