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

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

Issue 920153002: Disable the Notification JavaScript constructor for Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | 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 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/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 WebRuntimeFeatures::enableTouchIconLoading(true); 57 WebRuntimeFeatures::enableTouchIconLoading(true);
58 WebRuntimeFeatures::enableOrientationEvent(true); 58 WebRuntimeFeatures::enableOrientationEvent(true);
59 WebRuntimeFeatures::enableFastMobileScrolling(true); 59 WebRuntimeFeatures::enableFastMobileScrolling(true);
60 WebRuntimeFeatures::enableMediaCapture(true); 60 WebRuntimeFeatures::enableMediaCapture(true);
61 WebRuntimeFeatures::enableCompositedSelectionUpdate(true); 61 WebRuntimeFeatures::enableCompositedSelectionUpdate(true);
62 // If navigation transitions gets activated via field trial, enable it in 62 // If navigation transitions gets activated via field trial, enable it in
63 // blink. We don't set this to false in case the user has manually enabled 63 // blink. We don't set this to false in case the user has manually enabled
64 // the feature via experimental web platform features. 64 // the feature via experimental web platform features.
65 if (base::FieldTrialList::FindFullName("NavigationTransitions") == "Enabled") 65 if (base::FieldTrialList::FindFullName("NavigationTransitions") == "Enabled")
66 WebRuntimeFeatures::enableNavigationTransitions(true); 66 WebRuntimeFeatures::enableNavigationTransitions(true);
67 // Android won't be able to reliably support non-persistent notifications, the
68 // intended behavior for which is in flux by itself.
69 WebRuntimeFeatures::enableNotificationConstructor(false);
67 #else 70 #else
68 WebRuntimeFeatures::enableNavigatorContentUtils(true); 71 WebRuntimeFeatures::enableNavigatorContentUtils(true);
69 #endif // defined(OS_ANDROID) 72 #endif // defined(OS_ANDROID)
70 73
71 #if !(defined OS_ANDROID || defined OS_CHROMEOS || defined OS_IOS) 74 #if !(defined OS_ANDROID || defined OS_CHROMEOS || defined OS_IOS)
72 // Only Android, ChromeOS, and IOS support NetInfo right now. 75 // Only Android, ChromeOS, and IOS support NetInfo right now.
73 WebRuntimeFeatures::enableNetworkInformation(false); 76 WebRuntimeFeatures::enableNetworkInformation(false);
74 #endif 77 #endif
75 78
76 #if defined(OS_WIN) 79 #if defined(OS_WIN)
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', 215 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',',
213 &disabled_features); 216 &disabled_features);
214 for (const std::string& feature : disabled_features) { 217 for (const std::string& feature : disabled_features) {
215 WebRuntimeFeatures::enableFeatureFromString( 218 WebRuntimeFeatures::enableFeatureFromString(
216 blink::WebString::fromLatin1(feature), false); 219 blink::WebString::fromLatin1(feature), false);
217 } 220 }
218 } 221 }
219 } 222 }
220 223
221 } // namespace content 224 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698