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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 10810034: disable web audio by default on android and add switches to enable it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
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 "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 !command_line.HasSwitch(switches::kDisableRemoteFonts); 417 !command_line.HasSwitch(switches::kDisableRemoteFonts);
418 prefs.xss_auditor_enabled = 418 prefs.xss_auditor_enabled =
419 !command_line.HasSwitch(switches::kDisableXSSAuditor); 419 !command_line.HasSwitch(switches::kDisableXSSAuditor);
420 prefs.application_cache_enabled = 420 prefs.application_cache_enabled =
421 !command_line.HasSwitch(switches::kDisableApplicationCache); 421 !command_line.HasSwitch(switches::kDisableApplicationCache);
422 422
423 prefs.local_storage_enabled = 423 prefs.local_storage_enabled =
424 !command_line.HasSwitch(switches::kDisableLocalStorage); 424 !command_line.HasSwitch(switches::kDisableLocalStorage);
425 prefs.databases_enabled = 425 prefs.databases_enabled =
426 !command_line.HasSwitch(switches::kDisableDatabases); 426 !command_line.HasSwitch(switches::kDisableDatabases);
427 #if defined(OS_ANDROID)
428 prefs.webaudio_enabled =
429 command_line.HasSwitch(switches::kEnableWebAudio);
430 #else
427 prefs.webaudio_enabled = 431 prefs.webaudio_enabled =
428 !command_line.HasSwitch(switches::kDisableWebAudio); 432 !command_line.HasSwitch(switches::kDisableWebAudio);
433 #endif
429 434
430 prefs.experimental_webgl_enabled = 435 prefs.experimental_webgl_enabled =
431 GpuProcessHost::gpu_enabled() && 436 GpuProcessHost::gpu_enabled() &&
432 !command_line.HasSwitch(switches::kDisable3DAPIs) && 437 !command_line.HasSwitch(switches::kDisable3DAPIs) &&
433 !command_line.HasSwitch(switches::kDisableExperimentalWebGL); 438 !command_line.HasSwitch(switches::kDisableExperimentalWebGL);
434 439
435 prefs.flash_3d_enabled = 440 prefs.flash_3d_enabled =
436 GpuProcessHost::gpu_enabled() && 441 GpuProcessHost::gpu_enabled() &&
437 !command_line.HasSwitch(switches::kDisableFlash3d); 442 !command_line.HasSwitch(switches::kDisableFlash3d);
438 prefs.flash_stage3d_enabled = 443 prefs.flash_stage3d_enabled =
(...skipping 2648 matching lines...) Expand 10 before | Expand all | Expand 10 after
3087 browser_plugin_host()->embedder_render_process_host(); 3092 browser_plugin_host()->embedder_render_process_host();
3088 *embedder_container_id = browser_plugin_host()->instance_id(); 3093 *embedder_container_id = browser_plugin_host()->instance_id();
3089 int embedder_process_id = 3094 int embedder_process_id =
3090 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; 3095 embedder_render_process_host ? embedder_render_process_host->GetID() : -1;
3091 if (embedder_process_id != -1) { 3096 if (embedder_process_id != -1) {
3092 *embedder_channel_name = 3097 *embedder_channel_name =
3093 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), 3098 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(),
3094 embedder_process_id); 3099 embedder_process_id);
3095 } 3100 }
3096 } 3101 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698