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

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

Issue 2226733003: Color: Clean up color profile handling for layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master2
Patch Set: Update TODOs Created 4 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
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_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 base::debug::SetCrashKeyValue( 735 base::debug::SetCrashKeyValue(
736 "rvinit_main_frame_id", base::IntToString(params.main_frame_routing_id)); 736 "rvinit_main_frame_id", base::IntToString(params.main_frame_routing_id));
737 737
738 webview()->setDisplayMode(display_mode_); 738 webview()->setDisplayMode(display_mode_);
739 webview()->settings()->setPreferCompositingToLCDTextEnabled( 739 webview()->settings()->setPreferCompositingToLCDTextEnabled(
740 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); 740 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_));
741 webview()->settings()->setThreadedScrollingEnabled( 741 webview()->settings()->setThreadedScrollingEnabled(
742 !command_line.HasSwitch(switches::kDisableThreadedScrolling)); 742 !command_line.HasSwitch(switches::kDisableThreadedScrolling));
743 webview()->setShowFPSCounter( 743 webview()->setShowFPSCounter(
744 command_line.HasSwitch(cc::switches::kShowFPSCounter)); 744 command_line.HasSwitch(cc::switches::kShowFPSCounter));
745 webview()->setDeviceColorProfile(params.image_decode_color_space.GetData()); 745
746 if (auto overridden_color_profile =
747 GetContentClient()->renderer()->GetImageDecodeColorProfile()) {
748 webview()->setDeviceColorProfile(overridden_color_profile->GetData());
749 } else {
750 webview()->setDeviceColorProfile(params.image_decode_color_space.GetData());
751 }
746 752
747 ApplyWebPreferencesInternal(webkit_preferences_, webview(), compositor_deps_); 753 ApplyWebPreferencesInternal(webkit_preferences_, webview(), compositor_deps_);
748 754
749 if (switches::IsTouchDragDropEnabled()) 755 if (switches::IsTouchDragDropEnabled())
750 webview()->settings()->setTouchDragDropEnabled(true); 756 webview()->settings()->setTouchDragDropEnabled(true);
751 757
752 webview()->settings()->setBrowserSideNavigationEnabled( 758 webview()->settings()->setBrowserSideNavigationEnabled(
753 IsBrowserSideNavigationEnabled()); 759 IsBrowserSideNavigationEnabled());
754 760
755 WebSettings::SelectionStrategyType selection_strategy = 761 WebSettings::SelectionStrategyType selection_strategy =
(...skipping 2294 matching lines...) Expand 10 before | Expand all | Expand 10 after
3050 return render_frame->focused_pepper_plugin(); 3056 return render_frame->focused_pepper_plugin();
3051 } 3057 }
3052 frame = frame->traverseNext(false); 3058 frame = frame->traverseNext(false);
3053 } 3059 }
3054 3060
3055 return nullptr; 3061 return nullptr;
3056 } 3062 }
3057 #endif 3063 #endif
3058 3064
3059 } // namespace content 3065 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698