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_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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 | 713 |
714 webview()->setDisplayMode(display_mode_); | 714 webview()->setDisplayMode(display_mode_); |
715 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 715 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
716 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 716 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
717 webview()->settings()->setThreadedScrollingEnabled( | 717 webview()->settings()->setThreadedScrollingEnabled( |
718 !command_line.HasSwitch(switches::kDisableThreadedScrolling)); | 718 !command_line.HasSwitch(switches::kDisableThreadedScrolling)); |
719 webview()->settings()->setRootLayerScrolls( | 719 webview()->settings()->setRootLayerScrolls( |
720 command_line.HasSwitch(switches::kRootLayerScrolls)); | 720 command_line.HasSwitch(switches::kRootLayerScrolls)); |
721 webview()->setShowFPSCounter( | 721 webview()->setShowFPSCounter( |
722 command_line.HasSwitch(cc::switches::kShowFPSCounter)); | 722 command_line.HasSwitch(cc::switches::kShowFPSCounter)); |
723 webview()->setDeviceColorProfile(params.image_decode_color_space.GetData()); | 723 |
| 724 if (auto overridden_color_profile = |
| 725 GetContentClient()->renderer()->GetImageDecodeColorProfile()) { |
| 726 webview()->setDeviceColorProfile(overridden_color_profile->GetData()); |
| 727 } else { |
| 728 webview()->setDeviceColorProfile(params.image_decode_color_space.GetData()); |
| 729 } |
724 | 730 |
725 ApplyWebPreferencesInternal(webkit_preferences_, webview(), compositor_deps_); | 731 ApplyWebPreferencesInternal(webkit_preferences_, webview(), compositor_deps_); |
726 | 732 |
727 if (switches::IsTouchDragDropEnabled()) | 733 if (switches::IsTouchDragDropEnabled()) |
728 webview()->settings()->setTouchDragDropEnabled(true); | 734 webview()->settings()->setTouchDragDropEnabled(true); |
729 | 735 |
730 WebSettings::SelectionStrategyType selection_strategy = | 736 WebSettings::SelectionStrategyType selection_strategy = |
731 WebSettings::SelectionStrategyType::Character; | 737 WebSettings::SelectionStrategyType::Character; |
732 const std::string selection_strategy_str = | 738 const std::string selection_strategy_str = |
733 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 739 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
(...skipping 2324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3058 return render_frame->focused_pepper_plugin(); | 3064 return render_frame->focused_pepper_plugin(); |
3059 } | 3065 } |
3060 frame = frame->traverseNext(false); | 3066 frame = frame->traverseNext(false); |
3061 } | 3067 } |
3062 | 3068 |
3063 return nullptr; | 3069 return nullptr; |
3064 } | 3070 } |
3065 #endif | 3071 #endif |
3066 | 3072 |
3067 } // namespace content | 3073 } // namespace content |
OLD | NEW |