Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 2738893002: Add flag for enabling/disabling video fullscreen detection (Closed)
Patch Set: s/AppHooksHelper/AppHooks Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 // concurrent elements. See http://crbug.com/612909, http://crbug.com/622826. 1066 // concurrent elements. See http://crbug.com/612909, http://crbug.com/622826.
1067 const bool is_low_end_device = 1067 const bool is_low_end_device =
1068 base::android::BuildInfo::GetInstance()->sdk_int() <= 1068 base::android::BuildInfo::GetInstance()->sdk_int() <=
1069 base::android::SDK_VERSION_JELLY_BEAN_MR2 || 1069 base::android::SDK_VERSION_JELLY_BEAN_MR2 ||
1070 base::SysInfo::IsLowEndDevice(); 1070 base::SysInfo::IsLowEndDevice();
1071 // TODO(mlamouri): rename this setting "isLowEndDevice". 1071 // TODO(mlamouri): rename this setting "isLowEndDevice".
1072 settings->setForcePreloadNoneForMediaElements(is_low_end_device); 1072 settings->setForcePreloadNoneForMediaElements(is_low_end_device);
1073 1073
1074 WebRuntimeFeatures::enableVideoFullscreenOrientationLock( 1074 WebRuntimeFeatures::enableVideoFullscreenOrientationLock(
1075 prefs.video_fullscreen_orientation_lock_enabled); 1075 prefs.video_fullscreen_orientation_lock_enabled);
1076 WebRuntimeFeatures::enableVideoFullscreenDetection(
1077 prefs.video_fullscreen_detection_enabled);
1076 settings->setEmbeddedMediaExperienceEnabled( 1078 settings->setEmbeddedMediaExperienceEnabled(
1077 prefs.embedded_media_experience_enabled); 1079 prefs.embedded_media_experience_enabled);
1078 #else // defined(OS_ANDROID) 1080 #else // defined(OS_ANDROID)
1079 settings->setCrossOriginMediaPlaybackRequiresUserGesture( 1081 settings->setCrossOriginMediaPlaybackRequiresUserGesture(
1080 prefs.cross_origin_media_playback_requires_user_gesture); 1082 prefs.cross_origin_media_playback_requires_user_gesture);
1081 #endif // defined(OS_ANDROID) 1083 #endif // defined(OS_ANDROID)
1082 1084
1083 settings->setViewportEnabled(prefs.viewport_enabled); 1085 settings->setViewportEnabled(prefs.viewport_enabled);
1084 settings->setViewportMetaEnabled(prefs.viewport_meta_enabled); 1086 settings->setViewportMetaEnabled(prefs.viewport_meta_enabled);
1085 settings->setShrinksViewportContentToFit( 1087 settings->setShrinksViewportContentToFit(
(...skipping 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after
2719 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); 2721 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
2720 } 2722 }
2721 2723
2722 std::unique_ptr<InputEventAck> ack( 2724 std::unique_ptr<InputEventAck> ack(
2723 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(), 2725 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(),
2724 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); 2726 INPUT_EVENT_ACK_STATE_NOT_CONSUMED));
2725 OnInputEventAck(std::move(ack)); 2727 OnInputEventAck(std::move(ack));
2726 } 2728 }
2727 2729
2728 } // namespace content 2730 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698