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 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1063 // concurrent elements. See http://crbug.com/612909, http://crbug.com/622826. | 1063 // concurrent elements. See http://crbug.com/612909, http://crbug.com/622826. |
1064 const bool is_low_end_device = | 1064 const bool is_low_end_device = |
1065 base::android::BuildInfo::GetInstance()->sdk_int() <= | 1065 base::android::BuildInfo::GetInstance()->sdk_int() <= |
1066 base::android::SDK_VERSION_JELLY_BEAN_MR2 || | 1066 base::android::SDK_VERSION_JELLY_BEAN_MR2 || |
1067 base::SysInfo::IsLowEndDevice(); | 1067 base::SysInfo::IsLowEndDevice(); |
1068 // TODO(mlamouri): rename this setting "isLowEndDevice". | 1068 // TODO(mlamouri): rename this setting "isLowEndDevice". |
1069 settings->setForcePreloadNoneForMediaElements(is_low_end_device); | 1069 settings->setForcePreloadNoneForMediaElements(is_low_end_device); |
1070 | 1070 |
1071 WebRuntimeFeatures::enableVideoFullscreenOrientationLock( | 1071 WebRuntimeFeatures::enableVideoFullscreenOrientationLock( |
1072 prefs.video_fullscreen_orientation_lock_enabled); | 1072 prefs.video_fullscreen_orientation_lock_enabled); |
1073 | |
1074 settings->setMediaControlsEnabled(prefs.media_controls_enabled); | |
nasko
2017/02/13 22:28:43
This is set in ANDROID only section while the vari
mlamouri (slow - plz ping)
2017/02/14 11:19:46
Done.
| |
1073 #else // defined(OS_ANDROID) | 1075 #else // defined(OS_ANDROID) |
1074 settings->setCrossOriginMediaPlaybackRequiresUserGesture( | 1076 settings->setCrossOriginMediaPlaybackRequiresUserGesture( |
1075 prefs.cross_origin_media_playback_requires_user_gesture); | 1077 prefs.cross_origin_media_playback_requires_user_gesture); |
1076 #endif // defined(OS_ANDROID) | 1078 #endif // defined(OS_ANDROID) |
1077 | 1079 |
1078 settings->setViewportEnabled(prefs.viewport_enabled); | 1080 settings->setViewportEnabled(prefs.viewport_enabled); |
1079 settings->setViewportMetaEnabled(prefs.viewport_meta_enabled); | 1081 settings->setViewportMetaEnabled(prefs.viewport_meta_enabled); |
1080 settings->setShrinksViewportContentToFit( | 1082 settings->setShrinksViewportContentToFit( |
1081 prefs.shrinks_viewport_contents_to_fit); | 1083 prefs.shrinks_viewport_contents_to_fit); |
1082 settings->setViewportStyle( | 1084 settings->setViewportStyle( |
(...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2717 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 2719 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
2718 } | 2720 } |
2719 | 2721 |
2720 std::unique_ptr<InputEventAck> ack( | 2722 std::unique_ptr<InputEventAck> ack( |
2721 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(), | 2723 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(), |
2722 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); | 2724 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); |
2723 OnInputEventAck(std::move(ack)); | 2725 OnInputEventAck(std::move(ack)); |
2724 } | 2726 } |
2725 | 2727 |
2726 } // namespace content | 2728 } // namespace content |
OLD | NEW |