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

Side by Side Diff: content/child/runtime_features.cc

Issue 24220002: Enable Device Motion API on all platforms by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/child/runtime_features.h" 5 #include "content/child/runtime_features.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "content/public/common/content_switches.h" 8 #include "content/public/common/content_switches.h"
9 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" 9 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 if (command_line.HasSwitch(switches::kEnableWebAnimationsCSS)) 102 if (command_line.HasSwitch(switches::kEnableWebAnimationsCSS))
103 WebRuntimeFeatures::enableWebAnimationsCSS(); 103 WebRuntimeFeatures::enableWebAnimationsCSS();
104 104
105 if (command_line.HasSwitch(switches::kEnableWebAnimationsSVG)) 105 if (command_line.HasSwitch(switches::kEnableWebAnimationsSVG))
106 WebRuntimeFeatures::enableWebAnimationsSVG(); 106 WebRuntimeFeatures::enableWebAnimationsSVG();
107 107
108 if (command_line.HasSwitch(switches::kEnableWebMIDI)) 108 if (command_line.HasSwitch(switches::kEnableWebMIDI))
109 WebRuntimeFeatures::enableWebMIDI(true); 109 WebRuntimeFeatures::enableWebMIDI(true);
110 110
111 #if defined(OS_ANDROID) 111 if (command_line.HasSwitch(switches::kDisableDeviceMotion))
112 // Enable Device Motion on Android by default. 112 WebRuntimeFeatures::enableDeviceMotion(false);
113 WebRuntimeFeatures::enableDeviceMotion(
114 !command_line.HasSwitch(switches::kDisableDeviceMotion));
115 #else
116 if (command_line.HasSwitch(switches::kEnableDeviceMotion))
117 WebRuntimeFeatures::enableDeviceMotion(true);
118 #endif
119 113
120 if (command_line.HasSwitch(switches::kDisableDeviceOrientation)) 114 if (command_line.HasSwitch(switches::kDisableDeviceOrientation))
121 WebRuntimeFeatures::enableDeviceOrientation(false); 115 WebRuntimeFeatures::enableDeviceOrientation(false);
122 116
123 if (command_line.HasSwitch(switches::kDisableSpeechInput)) 117 if (command_line.HasSwitch(switches::kDisableSpeechInput))
124 WebRuntimeFeatures::enableSpeechInput(false); 118 WebRuntimeFeatures::enableSpeechInput(false);
125 119
126 if (command_line.HasSwitch(switches::kDisableFileSystem)) 120 if (command_line.HasSwitch(switches::kDisableFileSystem))
127 WebRuntimeFeatures::enableFileSystem(false); 121 WebRuntimeFeatures::enableFileSystem(false);
128 122
(...skipping 10 matching lines...) Expand all
139 WebRuntimeFeatures::enableHTMLImports(true); 133 WebRuntimeFeatures::enableHTMLImports(true);
140 134
141 if (command_line.HasSwitch(switches::kEnableOverlayScrollbars)) 135 if (command_line.HasSwitch(switches::kEnableOverlayScrollbars))
142 WebRuntimeFeatures::enableOverlayScrollbars(true); 136 WebRuntimeFeatures::enableOverlayScrollbars(true);
143 137
144 if (command_line.HasSwitch(switches::kEnableInputModeAttribute)) 138 if (command_line.HasSwitch(switches::kEnableInputModeAttribute))
145 WebRuntimeFeatures::enableInputModeAttribute(true); 139 WebRuntimeFeatures::enableInputModeAttribute(true);
146 } 140 }
147 141
148 } // namespace content 142 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698