| 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/logging.h" | 10 #include "base/logging.h" |
| (...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |