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

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

Issue 2216073002: Color: Add ColorCorrectRendering flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@decoder_profile
Patch Set: Rebase Created 4 years, 4 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/public/common/web_preferences.cc ('k') | content/renderer/render_widget.h » ('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_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 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 settings->setAvailablePointerTypes(prefs.available_pointer_types); 1026 settings->setAvailablePointerTypes(prefs.available_pointer_types);
1027 settings->setPrimaryPointerType( 1027 settings->setPrimaryPointerType(
1028 static_cast<blink::PointerType>(prefs.primary_pointer_type)); 1028 static_cast<blink::PointerType>(prefs.primary_pointer_type));
1029 settings->setAvailableHoverTypes(prefs.available_hover_types); 1029 settings->setAvailableHoverTypes(prefs.available_hover_types);
1030 settings->setPrimaryHoverType( 1030 settings->setPrimaryHoverType(
1031 static_cast<blink::HoverType>(prefs.primary_hover_type)); 1031 static_cast<blink::HoverType>(prefs.primary_hover_type));
1032 settings->setDeviceSupportsTouch(prefs.device_supports_touch); 1032 settings->setDeviceSupportsTouch(prefs.device_supports_touch);
1033 settings->setDeviceSupportsMouse(prefs.device_supports_mouse); 1033 settings->setDeviceSupportsMouse(prefs.device_supports_mouse);
1034 settings->setEnableTouchAdjustment(prefs.touch_adjustment_enabled); 1034 settings->setEnableTouchAdjustment(prefs.touch_adjustment_enabled);
1035 1035
1036 WebRuntimeFeatures::enableImageColorProfiles( 1036 WebRuntimeFeatures::enableColorCorrectRendering(
1037 prefs.image_color_profiles_enabled); 1037 prefs.color_correct_rendering_enabled);
1038 settings->setShouldRespectImageOrientation( 1038 settings->setShouldRespectImageOrientation(
1039 prefs.should_respect_image_orientation); 1039 prefs.should_respect_image_orientation);
1040 1040
1041 settings->setEditingBehavior( 1041 settings->setEditingBehavior(
1042 static_cast<WebSettings::EditingBehavior>(prefs.editing_behavior)); 1042 static_cast<WebSettings::EditingBehavior>(prefs.editing_behavior));
1043 1043
1044 settings->setSupportsMultipleWindows(prefs.supports_multiple_windows); 1044 settings->setSupportsMultipleWindows(prefs.supports_multiple_windows);
1045 1045
1046 settings->setInertVisualViewport(prefs.inert_visual_viewport); 1046 settings->setInertVisualViewport(prefs.inert_visual_viewport);
1047 1047
(...skipping 1645 matching lines...) Expand 10 before | Expand all | Expand 10 after
2693 RenderWidget::OnSetFocus(enable); 2693 RenderWidget::OnSetFocus(enable);
2694 2694
2695 // Notify all BrowserPlugins of the RenderView's focus state. 2695 // Notify all BrowserPlugins of the RenderView's focus state.
2696 if (BrowserPluginManager::Get()) 2696 if (BrowserPluginManager::Get())
2697 BrowserPluginManager::Get()->UpdateFocusState(); 2697 BrowserPluginManager::Get()->UpdateFocusState();
2698 } 2698 }
2699 2699
2700 void RenderViewImpl::RenderWidgetDidSetColorProfile( 2700 void RenderViewImpl::RenderWidgetDidSetColorProfile(
2701 const std::vector<char>& profile) { 2701 const std::vector<char>& profile) {
2702 if (webview()) { 2702 if (webview()) {
2703 bool was_reset = (profile.size() == 1 && profile[0] == '0'); 2703 WebVector<char> colorProfile = profile;
2704 2704 webview()->setDeviceColorProfile(colorProfile);
2705 if (was_reset) {
2706 webview()->resetDeviceColorProfileForTesting();
2707 } else {
2708 WebVector<char> colorProfile = profile;
2709 webview()->setDeviceColorProfile(colorProfile);
2710 }
2711 } 2705 }
2712 } 2706 }
2713 2707
2714 void RenderViewImpl::DidCompletePageScaleAnimation() { 2708 void RenderViewImpl::DidCompletePageScaleAnimation() {
2715 GetWidget()->FocusChangeComplete(); 2709 GetWidget()->FocusChangeComplete();
2716 } 2710 }
2717 2711
2718 void RenderViewImpl::OnDeviceScaleFactorChanged() { 2712 void RenderViewImpl::OnDeviceScaleFactorChanged() {
2719 RenderWidget::OnDeviceScaleFactorChanged(); 2713 RenderWidget::OnDeviceScaleFactorChanged();
2720 UpdateWebViewWithDeviceScaleFactor(); 2714 UpdateWebViewWithDeviceScaleFactor();
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
3080 return render_frame->focused_pepper_plugin(); 3074 return render_frame->focused_pepper_plugin();
3081 } 3075 }
3082 frame = frame->traverseNext(false); 3076 frame = frame->traverseNext(false);
3083 } 3077 }
3084 3078
3085 return nullptr; 3079 return nullptr;
3086 } 3080 }
3087 #endif 3081 #endif
3088 3082
3089 } // namespace content 3083 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/web_preferences.cc ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698