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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 DidToggleFullscreen(); | 783 DidToggleFullscreen(); |
784 | 784 |
785 // If a resize ack is requested and it isn't set-up, then no more resizes will | 785 // If a resize ack is requested and it isn't set-up, then no more resizes will |
786 // come in and in general things will go wrong. | 786 // come in and in general things will go wrong. |
787 DCHECK(resize_ack != SEND_RESIZE_ACK || next_paint_is_resize_ack()); | 787 DCHECK(resize_ack != SEND_RESIZE_ACK || next_paint_is_resize_ack()); |
788 } | 788 } |
789 | 789 |
790 void RenderWidget::SetWindowRectSynchronously( | 790 void RenderWidget::SetWindowRectSynchronously( |
791 const gfx::Rect& new_window_rect) { | 791 const gfx::Rect& new_window_rect) { |
792 Resize(new_window_rect.size(), | 792 Resize(new_window_rect.size(), |
793 new_window_rect.size(), | 793 gfx::ScaleToCeiledSize(new_window_rect.size(), device_scale_factor_), |
794 top_controls_shrink_blink_size_, | 794 top_controls_shrink_blink_size_, |
795 top_controls_height_, | 795 top_controls_height_, |
796 new_window_rect.size(), | 796 new_window_rect.size(), |
797 gfx::Rect(), | 797 gfx::Rect(), |
798 is_fullscreen_granted_, | 798 is_fullscreen_granted_, |
799 display_mode_, | 799 display_mode_, |
800 NO_RESIZE_ACK); | 800 NO_RESIZE_ACK); |
801 view_screen_rect_ = new_window_rect; | 801 view_screen_rect_ = new_window_rect; |
802 window_screen_rect_ = new_window_rect; | 802 window_screen_rect_ = new_window_rect; |
803 if (!did_show_) | 803 if (!did_show_) |
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2160 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2160 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
2161 video_hole_frames_.AddObserver(frame); | 2161 video_hole_frames_.AddObserver(frame); |
2162 } | 2162 } |
2163 | 2163 |
2164 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2164 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
2165 video_hole_frames_.RemoveObserver(frame); | 2165 video_hole_frames_.RemoveObserver(frame); |
2166 } | 2166 } |
2167 #endif // defined(VIDEO_HOLE) | 2167 #endif // defined(VIDEO_HOLE) |
2168 | 2168 |
2169 } // namespace content | 2169 } // namespace content |
OLD | NEW |