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 1697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1708 void RenderWidget::DidToggleFullscreen() { | 1708 void RenderWidget::DidToggleFullscreen() { |
1709 if (!webwidget_) | 1709 if (!webwidget_) |
1710 return; | 1710 return; |
1711 | 1711 |
1712 if (is_fullscreen_) { | 1712 if (is_fullscreen_) { |
1713 // NOTE: for fullscreen video the ordering is important. | 1713 // NOTE: for fullscreen video the ordering is important. |
1714 // 1. webwidget_->didEnterFullScreen() creates the ContentVideoView | 1714 // 1. webwidget_->didEnterFullScreen() creates the ContentVideoView |
1715 // 2. which will be added to the window once | 1715 // 2. which will be added to the window once |
1716 // ViewHostMsg_DidEnterFullscreen is received. | 1716 // ViewHostMsg_DidEnterFullscreen is received. |
1717 webwidget_->didEnterFullScreen(); | 1717 webwidget_->didEnterFullScreen(); |
1718 #if defined(OS_ANDROID) | |
1719 Send(new ViewHostMsg_DidEnterFullscreen(routing_id_)); | |
1720 #endif | |
1721 } else { | 1718 } else { |
1722 webwidget_->didExitFullScreen(); | 1719 webwidget_->didExitFullScreen(); |
1723 #if defined(OS_ANDROID) | |
1724 Send(new ViewHostMsg_DidExitFullscreen(routing_id_)); | |
1725 #endif | |
1726 } | 1720 } |
1727 } | 1721 } |
1728 | 1722 |
1729 bool RenderWidget::next_paint_is_resize_ack() const { | 1723 bool RenderWidget::next_paint_is_resize_ack() const { |
1730 return ViewHostMsg_UpdateRect_Flags::is_resize_ack(next_paint_flags_); | 1724 return ViewHostMsg_UpdateRect_Flags::is_resize_ack(next_paint_flags_); |
1731 } | 1725 } |
1732 | 1726 |
1733 void RenderWidget::set_next_paint_is_resize_ack() { | 1727 void RenderWidget::set_next_paint_is_resize_ack() { |
1734 next_paint_flags_ |= ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK; | 1728 next_paint_flags_ |= ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK; |
1735 } | 1729 } |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2206 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2200 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
2207 video_hole_frames_.AddObserver(frame); | 2201 video_hole_frames_.AddObserver(frame); |
2208 } | 2202 } |
2209 | 2203 |
2210 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2204 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
2211 video_hole_frames_.RemoveObserver(frame); | 2205 video_hole_frames_.RemoveObserver(frame); |
2212 } | 2206 } |
2213 #endif // defined(VIDEO_HOLE) | 2207 #endif // defined(VIDEO_HOLE) |
2214 | 2208 |
2215 } // namespace content | 2209 } // namespace content |
OLD | NEW |