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