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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 14241027: Disable the Gamepad API run-time flag for Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 7 years, 8 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
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 743
744 WebRuntimeFeatures::enableDeviceOrientation( 744 WebRuntimeFeatures::enableDeviceOrientation(
745 !command_line.HasSwitch(switches::kDisableDeviceOrientation)); 745 !command_line.HasSwitch(switches::kDisableDeviceOrientation));
746 746
747 WebRuntimeFeatures::enableSpeechInput( 747 WebRuntimeFeatures::enableSpeechInput(
748 !command_line.HasSwitch(switches::kDisableSpeechInput)); 748 !command_line.HasSwitch(switches::kDisableSpeechInput));
749 749
750 #if defined(OS_ANDROID) 750 #if defined(OS_ANDROID)
751 // Web Speech API Speech recognition is not implemented on Android yet. 751 // Web Speech API Speech recognition is not implemented on Android yet.
752 WebRuntimeFeatures::enableScriptedSpeech(false); 752 WebRuntimeFeatures::enableScriptedSpeech(false);
753
754 // Android does not support the Gamepad API.
755 WebRuntimeFeatures::enableGamepad(false);
753 #else 756 #else
754 WebRuntimeFeatures::enableScriptedSpeech(true); 757 WebRuntimeFeatures::enableScriptedSpeech(true);
758
759 WebRuntimeFeatures::enableGamepad(true);
755 #endif 760 #endif
756 761
757 #if defined(OS_ANDROID) 762 #if defined(OS_ANDROID)
758 // input[type=week] in Android is incomplete. crbug.com/135938 763 // input[type=week] in Android is incomplete. crbug.com/135938
759 WebRuntimeFeatures::enableInputTypeWeek(false); 764 WebRuntimeFeatures::enableInputTypeWeek(false);
760 #endif 765 #endif
761 766
762 WebRuntimeFeatures::enableFileSystem( 767 WebRuntimeFeatures::enableFileSystem(
763 !command_line.HasSwitch(switches::kDisableFileSystem)); 768 !command_line.HasSwitch(switches::kDisableFileSystem));
764 769
765 WebRuntimeFeatures::enableJavaScriptI18NAPI( 770 WebRuntimeFeatures::enableJavaScriptI18NAPI(
766 !command_line.HasSwitch(switches::kDisableJavaScriptI18NAPI)); 771 !command_line.HasSwitch(switches::kDisableJavaScriptI18NAPI));
767 772
768 WebRuntimeFeatures::enableGamepad(true);
769
770 WebRuntimeFeatures::enableQuota(true); 773 WebRuntimeFeatures::enableQuota(true);
771 774
772 WebRuntimeFeatures::enableShadowDOM(true); 775 WebRuntimeFeatures::enableShadowDOM(true);
773 776
774 if (command_line.HasSwitch(switches::kEnableExperimentalWebKitFeatures)) { 777 if (command_line.HasSwitch(switches::kEnableExperimentalWebKitFeatures)) {
775 WebRuntimeFeatures::enableStyleScoped(true); 778 WebRuntimeFeatures::enableStyleScoped(true);
776 WebRuntimeFeatures::enableCustomDOMElements(true); 779 WebRuntimeFeatures::enableCustomDOMElements(true);
777 WebRuntimeFeatures::enableCSSExclusions(true); 780 WebRuntimeFeatures::enableCSSExclusions(true);
778 WebRuntimeFeatures::enableExperimentalContentSecurityPolicyFeatures(true); 781 WebRuntimeFeatures::enableExperimentalContentSecurityPolicyFeatures(true);
779 WebRuntimeFeatures::enableCSSRegions(true); 782 WebRuntimeFeatures::enableCSSRegions(true);
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
1309 1312
1310 void RenderThreadImpl::SetFlingCurveParameters( 1313 void RenderThreadImpl::SetFlingCurveParameters(
1311 const std::vector<float>& new_touchpad, 1314 const std::vector<float>& new_touchpad,
1312 const std::vector<float>& new_touchscreen) { 1315 const std::vector<float>& new_touchscreen) {
1313 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, 1316 webkit_platform_support_->SetFlingCurveParameters(new_touchpad,
1314 new_touchscreen); 1317 new_touchscreen);
1315 1318
1316 } 1319 }
1317 1320
1318 } // namespace content 1321 } // namespace content
OLDNEW
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698