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 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 DidToggleFullscreen(); | 808 DidToggleFullscreen(); |
809 | 809 |
810 // If a resize ack is requested and it isn't set-up, then no more resizes will | 810 // If a resize ack is requested and it isn't set-up, then no more resizes will |
811 // come in and in general things will go wrong. | 811 // come in and in general things will go wrong. |
812 DCHECK(resize_ack != SEND_RESIZE_ACK || next_paint_is_resize_ack()); | 812 DCHECK(resize_ack != SEND_RESIZE_ACK || next_paint_is_resize_ack()); |
813 } | 813 } |
814 | 814 |
815 void RenderWidget::SetWindowRectSynchronously( | 815 void RenderWidget::SetWindowRectSynchronously( |
816 const gfx::Rect& new_window_rect) { | 816 const gfx::Rect& new_window_rect) { |
817 Resize(new_window_rect.size(), | 817 Resize(new_window_rect.size(), |
818 new_window_rect.size(), | 818 gfx::ScaleToCeiledSize(new_window_rect.size(), device_scale_factor_), |
819 top_controls_shrink_blink_size_, | 819 top_controls_shrink_blink_size_, |
820 top_controls_height_, | 820 top_controls_height_, |
821 new_window_rect.size(), | 821 new_window_rect.size(), |
822 gfx::Rect(), | 822 gfx::Rect(), |
823 is_fullscreen_granted_, | 823 is_fullscreen_granted_, |
824 display_mode_, | 824 display_mode_, |
825 NO_RESIZE_ACK); | 825 NO_RESIZE_ACK); |
826 view_screen_rect_ = new_window_rect; | 826 view_screen_rect_ = new_window_rect; |
827 window_screen_rect_ = new_window_rect; | 827 window_screen_rect_ = new_window_rect; |
828 if (!did_show_) | 828 if (!did_show_) |
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2192 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2192 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
2193 video_hole_frames_.AddObserver(frame); | 2193 video_hole_frames_.AddObserver(frame); |
2194 } | 2194 } |
2195 | 2195 |
2196 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2196 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
2197 video_hole_frames_.RemoveObserver(frame); | 2197 video_hole_frames_.RemoveObserver(frame); |
2198 } | 2198 } |
2199 #endif // defined(VIDEO_HOLE) | 2199 #endif // defined(VIDEO_HOLE) |
2200 | 2200 |
2201 } // namespace content | 2201 } // namespace content |
OLD | NEW |