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 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 base::debug::SetCrashKeyValue( | 634 base::debug::SetCrashKeyValue( |
635 "rvinit_main_frame_id", base::IntToString(params.main_frame_routing_id)); | 635 "rvinit_main_frame_id", base::IntToString(params.main_frame_routing_id)); |
636 | 636 |
637 webview()->SetDisplayMode(display_mode_); | 637 webview()->SetDisplayMode(display_mode_); |
638 webview()->GetSettings()->SetPreferCompositingToLCDTextEnabled( | 638 webview()->GetSettings()->SetPreferCompositingToLCDTextEnabled( |
639 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 639 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
640 webview()->GetSettings()->SetThreadedScrollingEnabled( | 640 webview()->GetSettings()->SetThreadedScrollingEnabled( |
641 !command_line.HasSwitch(switches::kDisableThreadedScrolling)); | 641 !command_line.HasSwitch(switches::kDisableThreadedScrolling)); |
642 webview()->SetShowFPSCounter( | 642 webview()->SetShowFPSCounter( |
643 command_line.HasSwitch(cc::switches::kShowFPSCounter)); | 643 command_line.HasSwitch(cc::switches::kShowFPSCounter)); |
644 | 644 webview()->SetDeviceColorProfile(params.image_decode_color_space); |
645 if (std::unique_ptr<gfx::ICCProfile> overridden_color_profile = | |
646 GetContentClient()->renderer()->GetImageDecodeColorProfile()) { | |
647 webview()->SetDeviceColorProfile(*overridden_color_profile); | |
648 } else { | |
649 webview()->SetDeviceColorProfile(params.image_decode_color_space); | |
650 } | |
651 | 645 |
652 ApplyWebPreferencesInternal(webkit_preferences_, webview(), compositor_deps_); | 646 ApplyWebPreferencesInternal(webkit_preferences_, webview(), compositor_deps_); |
653 | 647 |
654 if (switches::IsTouchDragDropEnabled()) | 648 if (switches::IsTouchDragDropEnabled()) |
655 webview()->GetSettings()->SetTouchDragDropEnabled(true); | 649 webview()->GetSettings()->SetTouchDragDropEnabled(true); |
656 | 650 |
657 webview()->GetSettings()->SetBrowserSideNavigationEnabled( | 651 webview()->GetSettings()->SetBrowserSideNavigationEnabled( |
658 IsBrowserSideNavigationEnabled()); | 652 IsBrowserSideNavigationEnabled()); |
659 | 653 |
660 WebSettings::SelectionStrategyType selection_strategy = | 654 WebSettings::SelectionStrategyType selection_strategy = |
(...skipping 2008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2669 input_event.GetCoalescedEventsPointers(), latency_info, | 2663 input_event.GetCoalescedEventsPointers(), latency_info, |
2670 dispatch_type); | 2664 dispatch_type); |
2671 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; | 2665 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; |
2672 } | 2666 } |
2673 idle_user_detector_->ActivityDetected(); | 2667 idle_user_detector_->ActivityDetected(); |
2674 return RenderWidget::HandleInputEvent(input_event, latency_info, | 2668 return RenderWidget::HandleInputEvent(input_event, latency_info, |
2675 dispatch_type); | 2669 dispatch_type); |
2676 } | 2670 } |
2677 | 2671 |
2678 } // namespace content | 2672 } // namespace content |
OLD | NEW |