OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |