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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 2573983002: Media: do not lock the screen orientation when a video goes fullscreen on a tablet. (Closed)
Patch Set: rebase Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index f5be8d59d28b97e081294c902be760872526373b..a205f4656d6153e76aa3b6565b378c099630915f 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -85,6 +85,7 @@
#include "net/url_request/url_request_context_getter.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/clipboard/clipboard.h"
+#include "ui/base/device_form_factor.h"
#include "ui/base/touch/touch_device.h"
#include "ui/base/ui_base_switches.h"
#include "ui/gfx/animation/animation.h"
@@ -469,7 +470,8 @@ WebPreferences RenderViewHostImpl::ComputeWebkitPrefs() {
prefs.device_supports_mouse = false;
prefs.video_fullscreen_orientation_lock_enabled =
- base::FeatureList::IsEnabled(media::kVideoFullscreenOrientationLock);
+ base::FeatureList::IsEnabled(media::kVideoFullscreenOrientationLock) &&
+ ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_PHONE;
#endif
prefs.pointer_events_max_touch_points = ui::MaxTouchPoints();

Powered by Google App Engine
This is Rietveld 408576698