Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Side by Side Diff: content/renderer/render_widget.cc

Issue 561453004: Add RenderView ResetDeviceColorProfileForTesting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/render_widget.h ('k') | content/shell/renderer/test_runner/test_runner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/renderer/render_widget.h ('k') | content/shell/renderer/test_runner/test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698