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

Side by Side Diff: android_webview/lib/main/aw_main_delegate.cc

Issue 2613133003: Disable MediaSession API for WebView (Closed)
Patch Set: Created 3 years, 11 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 (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 "android_webview/lib/main/aw_main_delegate.h" 5 #include "android_webview/lib/main/aw_main_delegate.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "android_webview/browser/aw_content_browser_client.h" 9 #include "android_webview/browser/aw_content_browser_client.h"
10 #include "android_webview/browser/browser_view_renderer.h" 10 #include "android_webview/browser/browser_view_renderer.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 cl->AppendSwitch(switches::kEnableAggressiveDOMStorageFlushing); 105 cl->AppendSwitch(switches::kEnableAggressiveDOMStorageFlushing);
106 106
107 // Webview does not currently support the Presentation API, see 107 // Webview does not currently support the Presentation API, see
108 // https://crbug.com/521319 108 // https://crbug.com/521319
109 cl->AppendSwitch(switches::kDisablePresentationAPI); 109 cl->AppendSwitch(switches::kDisablePresentationAPI);
110 110
111 // WebView doesn't support Remote Playback API for the same reason as the 111 // WebView doesn't support Remote Playback API for the same reason as the
112 // Presentation API, see https://crbug.com/521319. 112 // Presentation API, see https://crbug.com/521319.
113 cl->AppendSwitch(switches::kDisableRemotePlaybackAPI); 113 cl->AppendSwitch(switches::kDisableRemotePlaybackAPI);
114 114
115 // WebView does not support MediaSession API since there's no UI for media
116 // metadata and controls.
117 cl->AppendSwitchASCII(switches::kDisableBlinkFeatures, "MediaSession");
Torne 2017/01/09 11:47:06 I'm not too familiar with how command line manipul
Zhiqiang Zhang (Slow) 2017/01/09 14:29:21 You are right, they will conflict. Now I just foll
118
115 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) 119 #if defined(V8_USE_EXTERNAL_STARTUP_DATA)
116 if (cl->GetSwitchValueASCII(switches::kProcessType).empty()) { 120 if (cl->GetSwitchValueASCII(switches::kProcessType).empty()) {
117 // Browser process (no type specified). 121 // Browser process (no type specified).
118 122
119 content::RegisterMediaUrlInterceptor(new AwMediaUrlInterceptor()); 123 content::RegisterMediaUrlInterceptor(new AwMediaUrlInterceptor());
120 BrowserViewRenderer::CalculateTileMemoryPolicy(); 124 BrowserViewRenderer::CalculateTileMemoryPolicy();
121 // WebView apps can override WebView#computeScroll to achieve custom 125 // WebView apps can override WebView#computeScroll to achieve custom
122 // scroll/fling. As a result, fling animations may not be ticked, 126 // scroll/fling. As a result, fling animations may not be ticked,
123 // potentially 127 // potentially
124 // confusing the tap suppression controller. Simply disable it for WebView 128 // confusing the tap suppression controller. Simply disable it for WebView
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 268
265 AwWebPreferencesPopulater* AwMainDelegate::CreateWebPreferencesPopulater() { 269 AwWebPreferencesPopulater* AwMainDelegate::CreateWebPreferencesPopulater() {
266 return new AwWebPreferencesPopulaterImpl(); 270 return new AwWebPreferencesPopulaterImpl();
267 } 271 }
268 272
269 AwLocaleManager* AwMainDelegate::CreateAwLocaleManager() { 273 AwLocaleManager* AwMainDelegate::CreateAwLocaleManager() {
270 return new AwLocaleManagerImpl(); 274 return new AwLocaleManagerImpl();
271 } 275 }
272 276
273 } // namespace android_webview 277 } // namespace android_webview
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