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 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1173 settings->setMainFrameResizesAreOrientationChanges( | 1173 settings->setMainFrameResizesAreOrientationChanges( |
1174 prefs.main_frame_resizes_are_orientation_changes); | 1174 prefs.main_frame_resizes_are_orientation_changes); |
1175 | 1175 |
1176 settings->setUseSolidColorScrollbars(prefs.use_solid_color_scrollbars); | 1176 settings->setUseSolidColorScrollbars(prefs.use_solid_color_scrollbars); |
1177 | 1177 |
1178 settings->setShowContextMenuOnMouseUp(prefs.context_menu_on_mouse_up); | 1178 settings->setShowContextMenuOnMouseUp(prefs.context_menu_on_mouse_up); |
1179 settings->setAlwaysShowContextMenuOnTouch( | 1179 settings->setAlwaysShowContextMenuOnTouch( |
1180 prefs.always_show_context_menu_on_touch); | 1180 prefs.always_show_context_menu_on_touch); |
1181 | 1181 |
1182 settings->setHideDownloadUI(prefs.hide_download_ui); | 1182 settings->setHideDownloadUI(prefs.hide_download_ui); |
| 1183 WebRuntimeFeatures::enableBackgroundVideoTrackOptimization( |
| 1184 prefs.background_video_track_optimization_enabled); |
1183 | 1185 |
1184 #if defined(OS_MACOSX) | 1186 #if defined(OS_MACOSX) |
1185 settings->setDoubleTapToZoomEnabled(true); | 1187 settings->setDoubleTapToZoomEnabled(true); |
1186 web_view->setMaximumLegibleScale(prefs.default_maximum_page_scale_factor); | 1188 web_view->setMaximumLegibleScale(prefs.default_maximum_page_scale_factor); |
1187 #endif | 1189 #endif |
1188 | 1190 |
1189 #if defined(OS_WIN) | 1191 #if defined(OS_WIN) |
1190 WebRuntimeFeatures::enableMiddleClickAutoscroll(true); | 1192 WebRuntimeFeatures::enableMiddleClickAutoscroll(true); |
1191 #endif | 1193 #endif |
1192 } | 1194 } |
(...skipping 1783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2976 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 2978 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
2977 } | 2979 } |
2978 | 2980 |
2979 std::unique_ptr<InputEventAck> ack( | 2981 std::unique_ptr<InputEventAck> ack( |
2980 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, | 2982 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, |
2981 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); | 2983 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); |
2982 OnInputEventAck(std::move(ack)); | 2984 OnInputEventAck(std::move(ack)); |
2983 } | 2985 } |
2984 | 2986 |
2985 } // namespace content | 2987 } // namespace content |
OLD | NEW |