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

Unified Diff: content/child/runtime_features.cc

Issue 456623003: Disable Screen Orientation API on Win8. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compilation Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/screen_orientation/screen_orientation_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/runtime_features.cc
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc
index 29820b90ff5b6a191d76eb1508637b6302dce512..6345f3724c17583c6a33b168c8a470804fbb30f9 100644
--- a/content/child/runtime_features.cc
+++ b/content/child/runtime_features.cc
@@ -15,6 +15,8 @@
#include "base/android/build_info.h"
#include "base/metrics/field_trial.h"
#include "media/base/android/media_codec_bridge.h"
+#elif defined(OS_WIN)
+#include "base/win/windows_version.h"
#endif
using blink::WebRuntimeFeatures;
@@ -67,6 +69,15 @@ static void SetRuntimeFeatureDefaultsForPlatform() {
// Only Android, ChromeOS, and IOS support NetInfo right now.
WebRuntimeFeatures::enableNetworkInformation(false);
#endif
+
+#if defined(OS_WIN)
+ // Screen Orientation API is currently broken on Windows 8 Metro mode and
+ // until we can find how to disable it only for Blink instances running in a
+ // renderer process in Metro, we need to disable the API altogether for Win8.
+ // See http://crbug.com/400846
+ if (base::win::OSInfo::GetInstance()->version() >= base::win::VERSION_WIN8)
+ WebRuntimeFeatures::enableScreenOrientation(false);
+#endif // OS_WIN
}
void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
« no previous file with comments | « content/browser/screen_orientation/screen_orientation_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698