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 "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/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 top_controls_layout_height_ = top_controls_layout_height; | 672 top_controls_layout_height_ = top_controls_layout_height; |
673 visible_viewport_size_ = visible_viewport_size; | 673 visible_viewport_size_ = visible_viewport_size; |
674 resizer_rect_ = resizer_rect; | 674 resizer_rect_ = resizer_rect; |
675 | 675 |
676 // NOTE: We may have entered fullscreen mode without changing our size. | 676 // NOTE: We may have entered fullscreen mode without changing our size. |
677 bool fullscreen_change = is_fullscreen_ != is_fullscreen; | 677 bool fullscreen_change = is_fullscreen_ != is_fullscreen; |
678 if (fullscreen_change) | 678 if (fullscreen_change) |
679 WillToggleFullscreen(); | 679 WillToggleFullscreen(); |
680 is_fullscreen_ = is_fullscreen; | 680 is_fullscreen_ = is_fullscreen; |
681 | 681 |
| 682 webwidget_->setTopControlsLayoutHeight(top_controls_layout_height); |
| 683 |
682 if (size_ != new_size) { | 684 if (size_ != new_size) { |
683 size_ = new_size; | 685 size_ = new_size; |
684 | 686 |
685 // When resizing, we want to wait to paint before ACK'ing the resize. This | 687 // When resizing, we want to wait to paint before ACK'ing the resize. This |
686 // ensures that we only resize as fast as we can paint. We only need to | 688 // ensures that we only resize as fast as we can paint. We only need to |
687 // send an ACK if we are resized to a non-empty rect. | 689 // send an ACK if we are resized to a non-empty rect. |
688 webwidget_->resize(new_size); | 690 webwidget_->resize(new_size); |
689 } else if (!resizing_mode_selector_->is_synchronous_mode()) { | 691 } else if (!resizing_mode_selector_->is_synchronous_mode()) { |
690 resize_ack = NO_RESIZE_ACK; | 692 resize_ack = NO_RESIZE_ACK; |
691 } | 693 } |
(...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2175 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2177 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
2176 video_hole_frames_.AddObserver(frame); | 2178 video_hole_frames_.AddObserver(frame); |
2177 } | 2179 } |
2178 | 2180 |
2179 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2181 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
2180 video_hole_frames_.RemoveObserver(frame); | 2182 video_hole_frames_.RemoveObserver(frame); |
2181 } | 2183 } |
2182 #endif // defined(VIDEO_HOLE) | 2184 #endif // defined(VIDEO_HOLE) |
2183 | 2185 |
2184 } // namespace content | 2186 } // namespace content |
OLD | NEW |