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 1641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1652 | 1652 |
1653 bool RenderWidget::SetDeviceColorProfile( | 1653 bool RenderWidget::SetDeviceColorProfile( |
1654 const std::vector<char>& color_profile) { | 1654 const std::vector<char>& color_profile) { |
1655 if (device_color_profile_ == color_profile) | 1655 if (device_color_profile_ == color_profile) |
1656 return false; | 1656 return false; |
1657 | 1657 |
1658 device_color_profile_ = color_profile; | 1658 device_color_profile_ = color_profile; |
1659 return true; | 1659 return true; |
1660 } | 1660 } |
1661 | 1661 |
| 1662 void RenderWidget::ResetDeviceColorProfileForTesting() { |
| 1663 if (!device_color_profile_.empty()) |
| 1664 device_color_profile_.clear(); |
| 1665 device_color_profile_.push_back('0'); |
| 1666 } |
| 1667 |
1662 void RenderWidget::OnOrientationChange() { | 1668 void RenderWidget::OnOrientationChange() { |
1663 } | 1669 } |
1664 | 1670 |
1665 gfx::Vector2d RenderWidget::GetScrollOffset() { | 1671 gfx::Vector2d RenderWidget::GetScrollOffset() { |
1666 // Bare RenderWidgets don't support scroll offset. | 1672 // Bare RenderWidgets don't support scroll offset. |
1667 return gfx::Vector2d(); | 1673 return gfx::Vector2d(); |
1668 } | 1674 } |
1669 | 1675 |
1670 void RenderWidget::SetHidden(bool hidden) { | 1676 void RenderWidget::SetHidden(bool hidden) { |
1671 if (is_hidden_ == hidden) | 1677 if (is_hidden_ == hidden) |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2175 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2181 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
2176 video_hole_frames_.AddObserver(frame); | 2182 video_hole_frames_.AddObserver(frame); |
2177 } | 2183 } |
2178 | 2184 |
2179 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2185 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
2180 video_hole_frames_.RemoveObserver(frame); | 2186 video_hole_frames_.RemoveObserver(frame); |
2181 } | 2187 } |
2182 #endif // defined(VIDEO_HOLE) | 2188 #endif // defined(VIDEO_HOLE) |
2183 | 2189 |
2184 } // namespace content | 2190 } // namespace content |
OLD | NEW |