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 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1052 settings->setMainFrameResizesAreOrientationChanges( | 1052 settings->setMainFrameResizesAreOrientationChanges( |
1053 prefs.main_frame_resizes_are_orientation_changes); | 1053 prefs.main_frame_resizes_are_orientation_changes); |
1054 | 1054 |
1055 settings->setUseSolidColorScrollbars(prefs.use_solid_color_scrollbars); | 1055 settings->setUseSolidColorScrollbars(prefs.use_solid_color_scrollbars); |
1056 | 1056 |
1057 settings->setShowContextMenuOnMouseUp(prefs.context_menu_on_mouse_up); | 1057 settings->setShowContextMenuOnMouseUp(prefs.context_menu_on_mouse_up); |
1058 settings->setAlwaysShowContextMenuOnTouch( | 1058 settings->setAlwaysShowContextMenuOnTouch( |
1059 prefs.always_show_context_menu_on_touch); | 1059 prefs.always_show_context_menu_on_touch); |
1060 | 1060 |
1061 settings->setHideDownloadUI(prefs.hide_download_ui); | 1061 settings->setHideDownloadUI(prefs.hide_download_ui); |
| 1062 WebRuntimeFeatures::enableBackgroundVideoTrackOptimization( |
| 1063 prefs.background_video_track_optimization_enabled); |
1062 | 1064 |
1063 #if defined(OS_MACOSX) | 1065 #if defined(OS_MACOSX) |
1064 settings->setDoubleTapToZoomEnabled(true); | 1066 settings->setDoubleTapToZoomEnabled(true); |
1065 web_view->setMaximumLegibleScale(prefs.default_maximum_page_scale_factor); | 1067 web_view->setMaximumLegibleScale(prefs.default_maximum_page_scale_factor); |
1066 #endif | 1068 #endif |
1067 | 1069 |
1068 #if defined(OS_WIN) | 1070 #if defined(OS_WIN) |
1069 WebRuntimeFeatures::enableMiddleClickAutoscroll(true); | 1071 WebRuntimeFeatures::enableMiddleClickAutoscroll(true); |
1070 #endif | 1072 #endif |
1071 } | 1073 } |
(...skipping 1735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2807 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 2809 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
2808 } | 2810 } |
2809 | 2811 |
2810 std::unique_ptr<InputEventAck> ack( | 2812 std::unique_ptr<InputEventAck> ack( |
2811 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, | 2813 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, |
2812 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); | 2814 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); |
2813 OnInputEventAck(std::move(ack)); | 2815 OnInputEventAck(std::move(ack)); |
2814 } | 2816 } |
2815 | 2817 |
2816 } // namespace content | 2818 } // namespace content |
OLD | NEW |