| 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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/debug/trace_event_synthetic_delay.h" | 10 #include "base/debug/trace_event_synthetic_delay.h" |
| (...skipping 1651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1662 if (!webwidget_) | 1662 if (!webwidget_) |
| 1663 return; | 1663 return; |
| 1664 | 1664 |
| 1665 if (is_fullscreen_) { | 1665 if (is_fullscreen_) { |
| 1666 webwidget_->didEnterFullScreen(); | 1666 webwidget_->didEnterFullScreen(); |
| 1667 } else { | 1667 } else { |
| 1668 webwidget_->didExitFullScreen(); | 1668 webwidget_->didExitFullScreen(); |
| 1669 } | 1669 } |
| 1670 } | 1670 } |
| 1671 | 1671 |
| 1672 void RenderWidget::SetBackground(const SkBitmap& background) { | |
| 1673 background_ = background; | |
| 1674 | |
| 1675 // Generate a full repaint. | |
| 1676 didInvalidateRect(gfx::Rect(size_.width(), size_.height())); | |
| 1677 } | |
| 1678 | |
| 1679 bool RenderWidget::next_paint_is_resize_ack() const { | 1672 bool RenderWidget::next_paint_is_resize_ack() const { |
| 1680 return ViewHostMsg_UpdateRect_Flags::is_resize_ack(next_paint_flags_); | 1673 return ViewHostMsg_UpdateRect_Flags::is_resize_ack(next_paint_flags_); |
| 1681 } | 1674 } |
| 1682 | 1675 |
| 1683 void RenderWidget::set_next_paint_is_resize_ack() { | 1676 void RenderWidget::set_next_paint_is_resize_ack() { |
| 1684 next_paint_flags_ |= ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK; | 1677 next_paint_flags_ |= ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK; |
| 1685 } | 1678 } |
| 1686 | 1679 |
| 1687 void RenderWidget::set_next_paint_is_repaint_ack() { | 1680 void RenderWidget::set_next_paint_is_repaint_ack() { |
| 1688 next_paint_flags_ |= ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK; | 1681 next_paint_flags_ |= ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK; |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2183 | 2176 |
| 2184 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) { | 2177 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) { |
| 2185 swapped_out_frames_.AddObserver(frame); | 2178 swapped_out_frames_.AddObserver(frame); |
| 2186 } | 2179 } |
| 2187 | 2180 |
| 2188 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) { | 2181 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) { |
| 2189 swapped_out_frames_.RemoveObserver(frame); | 2182 swapped_out_frames_.RemoveObserver(frame); |
| 2190 } | 2183 } |
| 2191 | 2184 |
| 2192 } // namespace content | 2185 } // namespace content |
| OLD | NEW |