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

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

Issue 133943002: Gamepad API support for chrome on android (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 10 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/common/content_switches_internal.h" 8 #include "content/common/content_switches_internal.h"
9 #include "content/public/common/content_switches.h" 9 #include "content/public/common/content_switches.h"
10 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" 10 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
(...skipping 13 matching lines...) Expand all
24 if (!media::MediaCodecBridge::IsAvailable()) { 24 if (!media::MediaCodecBridge::IsAvailable()) {
25 WebRuntimeFeatures::enableWebKitMediaSource(false); 25 WebRuntimeFeatures::enableWebKitMediaSource(false);
26 WebRuntimeFeatures::enableMediaSource(false); 26 WebRuntimeFeatures::enableMediaSource(false);
27 WebRuntimeFeatures::enablePrefixedEncryptedMedia(false); 27 WebRuntimeFeatures::enablePrefixedEncryptedMedia(false);
28 } 28 }
29 // WebAudio is enabled by default only on ARM and only when the 29 // WebAudio is enabled by default only on ARM and only when the
30 // MediaCodec API is available. 30 // MediaCodec API is available.
31 WebRuntimeFeatures::enableWebAudio( 31 WebRuntimeFeatures::enableWebAudio(
32 media::MediaCodecBridge::IsAvailable() && 32 media::MediaCodecBridge::IsAvailable() &&
33 (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM)); 33 (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM));
34 // Android does not support the Gamepad API. 34 // Enable Gamepad at runtime as Android supports the Gamepad API
35 WebRuntimeFeatures::enableGamepad(false); 35 WebRuntimeFeatures::enableGamepad(true);
kbalazs 2014/02/20 00:48:24 No need for turning it on, you can simply remove t
36 // Android does not have support for PagePopup 36 // Android does not have support for PagePopup
37 WebRuntimeFeatures::enablePagePopup(false); 37 WebRuntimeFeatures::enablePagePopup(false);
38 // Android does not yet support the Web Notification API. crbug.com/115320 38 // Android does not yet support the Web Notification API. crbug.com/115320
39 WebRuntimeFeatures::enableNotifications(false); 39 WebRuntimeFeatures::enableNotifications(false);
40 // Android does not yet support SharedWorker. crbug.com/154571 40 // Android does not yet support SharedWorker. crbug.com/154571
41 WebRuntimeFeatures::enableSharedWorker(false); 41 WebRuntimeFeatures::enableSharedWorker(false);
42 // Android does not yet support NavigatorContentUtils. 42 // Android does not yet support NavigatorContentUtils.
43 WebRuntimeFeatures::enableNavigatorContentUtils(false); 43 WebRuntimeFeatures::enableNavigatorContentUtils(false);
44 WebRuntimeFeatures::enableTouchIconLoading(true); 44 WebRuntimeFeatures::enableTouchIconLoading(true);
45 WebRuntimeFeatures::enableOrientationEvent(true); 45 WebRuntimeFeatures::enableOrientationEvent(true);
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 WebRuntimeFeatures::enableFastTextAutosizing(true); 184 WebRuntimeFeatures::enableFastTextAutosizing(true);
185 185
186 if (command_line.HasSwitch(switches::kEnableRepaintAfterLayout)) 186 if (command_line.HasSwitch(switches::kEnableRepaintAfterLayout))
187 WebRuntimeFeatures::enableRepaintAfterLayout(true); 187 WebRuntimeFeatures::enableRepaintAfterLayout(true);
188 188
189 if (command_line.HasSwitch(switches::kEnableTargetedStyleRecalc)) 189 if (command_line.HasSwitch(switches::kEnableTargetedStyleRecalc))
190 WebRuntimeFeatures::enableTargetedStyleRecalc(true); 190 WebRuntimeFeatures::enableTargetedStyleRecalc(true);
191 } 191 }
192 192
193 } // namespace content 193 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698