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

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

Issue 2778693004: Remove navigator.vibrate without user gesture. (Closed)
Patch Set: Move the flag name/description to const char* 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
« no previous file with comments | « chrome/browser/flag_descriptions.cc ('k') | content/public/common/content_features.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 287
288 WebRuntimeFeatures::enableFeatureFromString( 288 WebRuntimeFeatures::enableFeatureFromString(
289 "FontCacheScaling", 289 "FontCacheScaling",
290 base::FeatureList::IsEnabled(features::kFontCacheScaling)); 290 base::FeatureList::IsEnabled(features::kFontCacheScaling));
291 291
292 WebRuntimeFeatures::enableFeatureFromString( 292 WebRuntimeFeatures::enableFeatureFromString(
293 "FramebustingNeedsSameOriginOrUserGesture", 293 "FramebustingNeedsSameOriginOrUserGesture",
294 base::FeatureList::IsEnabled( 294 base::FeatureList::IsEnabled(
295 features::kFramebustingNeedsSameOriginOrUserGesture)); 295 features::kFramebustingNeedsSameOriginOrUserGesture));
296 296
297 WebRuntimeFeatures::enableFeatureFromString(
298 "VibrateRequiresUserGesture",
299 base::FeatureList::IsEnabled(features::kVibrateRequiresUserGesture));
300
297 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling)) 301 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling))
298 WebRuntimeFeatures::enableTimerThrottlingForBackgroundTabs(false); 302 WebRuntimeFeatures::enableTimerThrottlingForBackgroundTabs(false);
299 303
300 WebRuntimeFeatures::enableExpensiveBackgroundTimerThrottling( 304 WebRuntimeFeatures::enableExpensiveBackgroundTimerThrottling(
301 base::FeatureList::IsEnabled( 305 base::FeatureList::IsEnabled(
302 features::kExpensiveBackgroundTimerThrottling)); 306 features::kExpensiveBackgroundTimerThrottling));
303 307
304 if (base::FeatureList::IsEnabled(features::kHeapCompaction)) 308 if (base::FeatureList::IsEnabled(features::kHeapCompaction))
305 WebRuntimeFeatures::enableHeapCompaction(true); 309 WebRuntimeFeatures::enableHeapCompaction(true);
306 310
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 387 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
384 std::vector<std::string> disabled_features = base::SplitString( 388 std::vector<std::string> disabled_features = base::SplitString(
385 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 389 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
386 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 390 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
387 for (const std::string& feature : disabled_features) 391 for (const std::string& feature : disabled_features)
388 WebRuntimeFeatures::enableFeatureFromString(feature, false); 392 WebRuntimeFeatures::enableFeatureFromString(feature, false);
389 } 393 }
390 } 394 }
391 395
392 } // namespace content 396 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/flag_descriptions.cc ('k') | content/public/common/content_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698