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

Side by Side Diff: chromecast/browser/cast_browser_main_parts.cc

Issue 2843913003: Rename kDisableGestureRequirementForMediaPlayback and make it a test-only flag. (Closed)
Patch Set: Created 3 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromecast/browser/cast_browser_main_parts.h" 5 #include "chromecast/browser/cast_browser_main_parts.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 DISALLOW_COPY_AND_ASSIGN(CastGeolocationDelegate); 209 DISALLOW_COPY_AND_ASSIGN(CastGeolocationDelegate);
210 }; 210 };
211 211
212 struct DefaultCommandLineSwitch { 212 struct DefaultCommandLineSwitch {
213 const char* const switch_name; 213 const char* const switch_name;
214 const char* const switch_value; 214 const char* const switch_value;
215 }; 215 };
216 216
217 DefaultCommandLineSwitch g_default_switches[] = { 217 DefaultCommandLineSwitch g_default_switches[] = {
218 #if defined(OS_ANDROID) 218 #if defined(OS_ANDROID)
219 // Disables Chromecast-specific WiFi-related features on ATV for now. 219 // Disables Chromecast-specific WiFi-related features on ATV for now.
220 { switches::kNoWifi, "" }, 220 {switches::kNoWifi, ""},
221 { switches::kDisableGestureRequirementForMediaPlayback, ""}, 221 // TODO(714676): this should probably set the no restrictions autoplay
DaleCurtis 2017/04/26 19:39:21 Ditto on TODO formatting, also re-wrap comment.
mlamouri (slow - plz ping) 2017/04/27 12:17:36 Done. I will blame `git cl format` for the insane
222 { switches::kDisableMediaSuspend, ""}, 222 // policy
223 // instead.
224 {switches::kIgnoreAutoplayRestrictionsForTests, ""},
225 {switches::kDisableMediaSuspend, ""},
223 #else 226 #else
224 // GPU shader disk cache disabling is largely to conserve disk space. 227 // GPU shader disk cache disabling is largely to conserve disk space.
225 { switches::kDisableGpuShaderDiskCache, "" }, 228 {switches::kDisableGpuShaderDiskCache, ""},
226 // Enable media sessions by default (even on non-Android platforms). 229 // Enable media sessions by default (even on non-Android platforms).
227 { switches::kEnableDefaultMediaSession, "" }, 230 {switches::kEnableDefaultMediaSession, ""},
228 #endif 231 #endif
229 #if BUILDFLAG(IS_CAST_AUDIO_ONLY) 232 #if BUILDFLAG(IS_CAST_AUDIO_ONLY)
230 #if defined(OS_ANDROID) 233 #if defined(OS_ANDROID)
231 { switches::kDisableGLDrawingForTests, "" }, 234 {switches::kDisableGLDrawingForTests, ""},
232 #else 235 #else
233 { switches::kDisableGpu, "" }, 236 {switches::kDisableGpu, ""},
234 #endif // defined(OS_ANDROID) 237 #endif // defined(OS_ANDROID)
235 #endif // BUILDFLAG(IS_CAST_AUDIO_ONLY) 238 #endif // BUILDFLAG(IS_CAST_AUDIO_ONLY)
236 #if defined(OS_LINUX) 239 #if defined(OS_LINUX)
237 #if defined(ARCH_CPU_X86_FAMILY) 240 #if defined(ARCH_CPU_X86_FAMILY)
238 // This is needed for now to enable the x11 Ozone platform to work with 241 // This is needed for now to enable the x11 Ozone platform to work with
239 // current Linux/NVidia OpenGL drivers. 242 // current Linux/NVidia OpenGL drivers.
240 { switches::kIgnoreGpuBlacklist, ""}, 243 {switches::kIgnoreGpuBlacklist, ""},
241 #elif defined(ARCH_CPU_ARM_FAMILY) 244 #elif defined(ARCH_CPU_ARM_FAMILY)
242 #if !BUILDFLAG(IS_CAST_AUDIO_ONLY) 245 #if !BUILDFLAG(IS_CAST_AUDIO_ONLY)
243 {switches::kEnableHardwareOverlays, "cast"}, 246 {switches::kEnableHardwareOverlays, "cast"},
244 #endif 247 #endif
245 #endif 248 #endif
246 #endif // defined(OS_LINUX) 249 #endif // defined(OS_LINUX)
247 // Needed so that our call to GpuDataManager::SetGLStrings doesn't race 250 // Needed so that our call to GpuDataManager::SetGLStrings doesn't race
248 // against GPU process creation (which is otherwise triggered from 251 // against GPU process creation (which is otherwise triggered from
249 // BrowserThreadsStarted). The GPU process will be created as soon as a 252 // BrowserThreadsStarted). The GPU process will be created as soon as a
250 // renderer needs it, which always happens after main loop starts. 253 // renderer needs it, which always happens after main loop starts.
251 { switches::kDisableGpuEarlyInit, "" }, 254 {switches::kDisableGpuEarlyInit, ""},
252 // TODO(halliwell): Cast builds don't support ES3. Remove this switch when 255 // TODO(halliwell): Cast builds don't support ES3. Remove this switch when
253 // support is added (crbug.com/659395) 256 // support is added (crbug.com/659395)
254 { switches::kDisableES3GLContext, "" }, 257 {switches::kDisableES3GLContext, ""},
255 // Enable navigator.connection API. 258 // Enable navigator.connection API.
256 // TODO(derekjchow): Remove this switch when enabled by default. 259 // TODO(derekjchow): Remove this switch when enabled by default.
257 { switches::kEnableNetworkInformation, "" }, 260 {switches::kEnableNetworkInformation, ""},
258 // TODO(halliwell): Remove after fixing b/35422666. 261 // TODO(halliwell): Remove after fixing b/35422666.
259 { switches::kEnableUseZoomForDSF, "false" }, 262 {switches::kEnableUseZoomForDSF, "false"},
260 { NULL, NULL }, // Termination 263 {NULL, NULL}, // Termination
DaleCurtis 2017/04/26 19:39:21 Might as well make it nullptr, nullptr while you'r
mlamouri (slow - plz ping) 2017/04/27 12:17:36 Done. I will again blame `git cl format` for re-fo
261 }; 264 };
262 265
263 void AddDefaultCommandLineSwitches(base::CommandLine* command_line) { 266 void AddDefaultCommandLineSwitches(base::CommandLine* command_line) {
264 int i = 0; 267 int i = 0;
265 while (g_default_switches[i].switch_name != NULL) { 268 while (g_default_switches[i].switch_name != NULL) {
266 command_line->AppendSwitchASCII( 269 command_line->AppendSwitchASCII(
267 std::string(g_default_switches[i].switch_name), 270 std::string(g_default_switches[i].switch_name),
268 std::string(g_default_switches[i].switch_value)); 271 std::string(g_default_switches[i].switch_value));
269 ++i; 272 ++i;
270 } 273 }
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 567
565 void CastBrowserMainParts::PostDestroyThreads() { 568 void CastBrowserMainParts::PostDestroyThreads() {
566 #if !defined(OS_ANDROID) 569 #if !defined(OS_ANDROID)
567 media_resource_tracker_->FinalizeAndDestroy(); 570 media_resource_tracker_->FinalizeAndDestroy();
568 media_resource_tracker_ = nullptr; 571 media_resource_tracker_ = nullptr;
569 #endif 572 #endif
570 } 573 }
571 574
572 } // namespace shell 575 } // namespace shell
573 } // namespace chromecast 576 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698