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

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, 11 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 // Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 4 // found in the LICENSE file.
4 5
5 #include "content/child/runtime_features.h" 6 #include "content/child/runtime_features.h"
6 7
7 #include "base/command_line.h" 8 #include "base/command_line.h"
8 #include "content/public/common/content_switches.h" 9 #include "content/public/common/content_switches.h"
9 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" 10 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
10 11
11 #if defined(OS_ANDROID) 12 #if defined(OS_ANDROID)
(...skipping 13 matching lines...) Expand all
25 WebRuntimeFeatures::enableWebKitMediaSource(false); 26 WebRuntimeFeatures::enableWebKitMediaSource(false);
26 WebRuntimeFeatures::enableMediaSource(false); 27 WebRuntimeFeatures::enableMediaSource(false);
27 WebRuntimeFeatures::enablePrefixedEncryptedMedia(false); 28 WebRuntimeFeatures::enablePrefixedEncryptedMedia(false);
28 } 29 }
29 #endif // !defined(GOOGLE_TV) 30 #endif // !defined(GOOGLE_TV)
30 // WebAudio is enabled by default only on ARM and only when the 31 // WebAudio is enabled by default only on ARM and only when the
31 // MediaCodec API is available. 32 // MediaCodec API is available.
32 WebRuntimeFeatures::enableWebAudio( 33 WebRuntimeFeatures::enableWebAudio(
33 media::MediaCodecBridge::IsAvailable() && 34 media::MediaCodecBridge::IsAvailable() &&
34 (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM)); 35 (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM));
35 // Android does not support the Gamepad API. 36 // Enable Gamepad at runtime as Android supports the Gamepad API
36 WebRuntimeFeatures::enableGamepad(false); 37 WebRuntimeFeatures::enableGamepad(true);
37 // Android does not have support for PagePopup 38 // Android does not have support for PagePopup
38 WebRuntimeFeatures::enablePagePopup(false); 39 WebRuntimeFeatures::enablePagePopup(false);
39 // Android does not yet support the Web Notification API. crbug.com/115320 40 // Android does not yet support the Web Notification API. crbug.com/115320
40 WebRuntimeFeatures::enableNotifications(false); 41 WebRuntimeFeatures::enableNotifications(false);
41 // Android does not yet support SharedWorker. crbug.com/154571 42 // Android does not yet support SharedWorker. crbug.com/154571
42 WebRuntimeFeatures::enableSharedWorker(false); 43 WebRuntimeFeatures::enableSharedWorker(false);
43 // Android does not yet support NavigatorContentUtils. 44 // Android does not yet support NavigatorContentUtils.
44 WebRuntimeFeatures::enableNavigatorContentUtils(false); 45 WebRuntimeFeatures::enableNavigatorContentUtils(false);
45 #else 46 #else
46 WebRuntimeFeatures::enableNavigatorContentUtils(true); 47 WebRuntimeFeatures::enableNavigatorContentUtils(true);
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 WebRuntimeFeatures::enableInputModeAttribute(true); 181 WebRuntimeFeatures::enableInputModeAttribute(true);
181 182
182 if (command_line.HasSwitch(switches::kEnableFastTextAutosizing)) 183 if (command_line.HasSwitch(switches::kEnableFastTextAutosizing))
183 WebRuntimeFeatures::enableFastTextAutosizing(true); 184 WebRuntimeFeatures::enableFastTextAutosizing(true);
184 185
185 if (command_line.HasSwitch(switches::kEnableRepaintAfterLayout)) 186 if (command_line.HasSwitch(switches::kEnableRepaintAfterLayout))
186 WebRuntimeFeatures::enableRepaintAfterLayout(true); 187 WebRuntimeFeatures::enableRepaintAfterLayout(true);
187 } 188 }
188 189
189 } // namespace content 190 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698