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

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

Issue 1007563004: [Icons NTP] Enable Touch Icon parsing, so Chrome gets URL (no fetch or storage). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | content/renderer/render_view_impl.cc » ('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/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 11 matching lines...) Expand all
22 #include "media/base/android/media_codec_bridge.h" 22 #include "media/base/android/media_codec_bridge.h"
23 #elif defined(OS_WIN) 23 #elif defined(OS_WIN)
24 #include "base/win/windows_version.h" 24 #include "base/win/windows_version.h"
25 #endif 25 #endif
26 26
27 using blink::WebRuntimeFeatures; 27 using blink::WebRuntimeFeatures;
28 28
29 namespace content { 29 namespace content {
30 30
31 static void SetRuntimeFeatureDefaultsForPlatform() { 31 static void SetRuntimeFeatureDefaultsForPlatform() {
32 // Enable non-standard "apple-touch-icon" and "apple-touch-icon-precomposed".
33 WebRuntimeFeatures::enableTouchIconLoading(true);
34
32 #if defined(OS_ANDROID) 35 #if defined(OS_ANDROID)
33 // MSE/EME implementation needs Android MediaCodec API. 36 // MSE/EME implementation needs Android MediaCodec API.
34 if (!media::MediaCodecBridge::IsAvailable()) { 37 if (!media::MediaCodecBridge::IsAvailable()) {
35 WebRuntimeFeatures::enableMediaSource(false); 38 WebRuntimeFeatures::enableMediaSource(false);
36 WebRuntimeFeatures::enablePrefixedEncryptedMedia(false); 39 WebRuntimeFeatures::enablePrefixedEncryptedMedia(false);
37 WebRuntimeFeatures::enableEncryptedMedia(false); 40 WebRuntimeFeatures::enableEncryptedMedia(false);
38 } 41 }
39 // WebAudio is enabled by default but only when the MediaCodec API 42 // WebAudio is enabled by default but only when the MediaCodec API
40 // is available. 43 // is available.
41 AndroidCpuFamily cpu_family = android_getCpuFamily(); 44 AndroidCpuFamily cpu_family = android_getCpuFamily();
42 WebRuntimeFeatures::enableWebAudio( 45 WebRuntimeFeatures::enableWebAudio(
43 media::MediaCodecBridge::IsAvailable() && 46 media::MediaCodecBridge::IsAvailable() &&
44 ((cpu_family == ANDROID_CPU_FAMILY_ARM) || 47 ((cpu_family == ANDROID_CPU_FAMILY_ARM) ||
45 (cpu_family == ANDROID_CPU_FAMILY_ARM64) || 48 (cpu_family == ANDROID_CPU_FAMILY_ARM64) ||
46 (cpu_family == ANDROID_CPU_FAMILY_X86) || 49 (cpu_family == ANDROID_CPU_FAMILY_X86) ||
47 (cpu_family == ANDROID_CPU_FAMILY_MIPS))); 50 (cpu_family == ANDROID_CPU_FAMILY_MIPS)));
48 51
49 // Android does not have support for PagePopup 52 // Android does not have support for PagePopup
50 WebRuntimeFeatures::enablePagePopup(false); 53 WebRuntimeFeatures::enablePagePopup(false);
51 // Android does not yet support SharedWorker. crbug.com/154571 54 // Android does not yet support SharedWorker. crbug.com/154571
52 WebRuntimeFeatures::enableSharedWorker(false); 55 WebRuntimeFeatures::enableSharedWorker(false);
53 // Android does not yet support NavigatorContentUtils. 56 // Android does not yet support NavigatorContentUtils.
54 WebRuntimeFeatures::enableNavigatorContentUtils(false); 57 WebRuntimeFeatures::enableNavigatorContentUtils(false);
55 WebRuntimeFeatures::enableTouchIconLoading(true);
56 WebRuntimeFeatures::enableOrientationEvent(true); 58 WebRuntimeFeatures::enableOrientationEvent(true);
57 WebRuntimeFeatures::enableFastMobileScrolling(true); 59 WebRuntimeFeatures::enableFastMobileScrolling(true);
58 WebRuntimeFeatures::enableMediaCapture(true); 60 WebRuntimeFeatures::enableMediaCapture(true);
59 WebRuntimeFeatures::enableCompositedSelectionUpdate(true); 61 WebRuntimeFeatures::enableCompositedSelectionUpdate(true);
60 // If navigation transitions gets activated via field trial, enable it in 62 // If navigation transitions gets activated via field trial, enable it in
61 // 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
62 // the feature via experimental web platform features. 64 // the feature via experimental web platform features.
63 if (base::FieldTrialList::FindFullName("NavigationTransitions") == "Enabled") 65 if (base::FieldTrialList::FindFullName("NavigationTransitions") == "Enabled")
64 WebRuntimeFeatures::enableNavigationTransitions(true); 66 WebRuntimeFeatures::enableNavigationTransitions(true);
65 // Android won't be able to reliably support non-persistent notifications, the 67 // Android won't be able to reliably support non-persistent notifications, the
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', 222 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',',
221 &disabled_features); 223 &disabled_features);
222 for (const std::string& feature : disabled_features) { 224 for (const std::string& feature : disabled_features) {
223 WebRuntimeFeatures::enableFeatureFromString( 225 WebRuntimeFeatures::enableFeatureFromString(
224 blink::WebString::fromLatin1(feature), false); 226 blink::WebString::fromLatin1(feature), false);
225 } 227 }
226 } 228 }
227 } 229 }
228 230
229 } // namespace content 231 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698