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

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

Issue 2778693004: Remove navigator.vibrate without user gesture. (Closed)
Patch Set: rebase Created 3 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
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 <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 297
298 WebRuntimeFeatures::EnableFeatureFromString( 298 WebRuntimeFeatures::EnableFeatureFromString(
299 "FontCacheScaling", 299 "FontCacheScaling",
300 base::FeatureList::IsEnabled(features::kFontCacheScaling)); 300 base::FeatureList::IsEnabled(features::kFontCacheScaling));
301 301
302 WebRuntimeFeatures::EnableFeatureFromString( 302 WebRuntimeFeatures::EnableFeatureFromString(
303 "FramebustingNeedsSameOriginOrUserGesture", 303 "FramebustingNeedsSameOriginOrUserGesture",
304 base::FeatureList::IsEnabled( 304 base::FeatureList::IsEnabled(
305 features::kFramebustingNeedsSameOriginOrUserGesture)); 305 features::kFramebustingNeedsSameOriginOrUserGesture));
306 306
307 WebRuntimeFeatures::EnableFeatureFromString(
308 "VibrateRequiresUserGesture",
309 base::FeatureList::IsEnabled(features::kVibrateRequiresUserGesture));
310
307 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling)) 311 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling))
308 WebRuntimeFeatures::EnableTimerThrottlingForBackgroundTabs(false); 312 WebRuntimeFeatures::EnableTimerThrottlingForBackgroundTabs(false);
309 313
310 WebRuntimeFeatures::EnableExpensiveBackgroundTimerThrottling( 314 WebRuntimeFeatures::EnableExpensiveBackgroundTimerThrottling(
311 base::FeatureList::IsEnabled( 315 base::FeatureList::IsEnabled(
312 features::kExpensiveBackgroundTimerThrottling)); 316 features::kExpensiveBackgroundTimerThrottling));
313 317
314 if (base::FeatureList::IsEnabled(features::kHeapCompaction)) 318 if (base::FeatureList::IsEnabled(features::kHeapCompaction))
315 WebRuntimeFeatures::EnableHeapCompaction(true); 319 WebRuntimeFeatures::EnableHeapCompaction(true);
316 320
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 385 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
382 std::vector<std::string> disabled_features = base::SplitString( 386 std::vector<std::string> disabled_features = base::SplitString(
383 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 387 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
384 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 388 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
385 for (const std::string& feature : disabled_features) 389 for (const std::string& feature : disabled_features)
386 WebRuntimeFeatures::EnableFeatureFromString(feature, false); 390 WebRuntimeFeatures::EnableFeatureFromString(feature, false);
387 } 391 }
388 } 392 }
389 393
390 } // namespace content 394 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698