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

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

Issue 10830011: Disable WebGL on Android by default (but allow it to be enabled) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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 | « content/browser/gpu/gpu_data_manager_impl.cc ('k') | content/public/common/content_switches.h » ('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 (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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 prefs.local_storage_enabled = 427 prefs.local_storage_enabled =
428 !command_line.HasSwitch(switches::kDisableLocalStorage); 428 !command_line.HasSwitch(switches::kDisableLocalStorage);
429 prefs.databases_enabled = 429 prefs.databases_enabled =
430 !command_line.HasSwitch(switches::kDisableDatabases); 430 !command_line.HasSwitch(switches::kDisableDatabases);
431 prefs.webaudio_enabled = 431 prefs.webaudio_enabled =
432 !command_line.HasSwitch(switches::kDisableWebAudio); 432 !command_line.HasSwitch(switches::kDisableWebAudio);
433 433
434 prefs.experimental_webgl_enabled = 434 prefs.experimental_webgl_enabled =
435 GpuProcessHost::gpu_enabled() && 435 GpuProcessHost::gpu_enabled() &&
436 !command_line.HasSwitch(switches::kDisable3DAPIs) && 436 !command_line.HasSwitch(switches::kDisable3DAPIs) &&
437 #if defined(OS_ANDROID)
438 command_line.HasSwitch(switches::kEnableExperimentalWebGL);
439 #else
437 !command_line.HasSwitch(switches::kDisableExperimentalWebGL); 440 !command_line.HasSwitch(switches::kDisableExperimentalWebGL);
441 #endif
438 442
439 prefs.flash_3d_enabled = 443 prefs.flash_3d_enabled =
440 GpuProcessHost::gpu_enabled() && 444 GpuProcessHost::gpu_enabled() &&
441 !command_line.HasSwitch(switches::kDisableFlash3d); 445 !command_line.HasSwitch(switches::kDisableFlash3d);
442 prefs.flash_stage3d_enabled = 446 prefs.flash_stage3d_enabled =
443 GpuProcessHost::gpu_enabled() && 447 GpuProcessHost::gpu_enabled() &&
444 !command_line.HasSwitch(switches::kDisableFlashStage3d); 448 !command_line.HasSwitch(switches::kDisableFlashStage3d);
445 449
446 prefs.gl_multisampling_enabled = 450 prefs.gl_multisampling_enabled =
447 !command_line.HasSwitch(switches::kDisableGLMultisampling); 451 !command_line.HasSwitch(switches::kDisableGLMultisampling);
(...skipping 2674 matching lines...) Expand 10 before | Expand all | Expand 10 after
3122 browser_plugin_host()->embedder_render_process_host(); 3126 browser_plugin_host()->embedder_render_process_host();
3123 *embedder_container_id = browser_plugin_host()->instance_id(); 3127 *embedder_container_id = browser_plugin_host()->instance_id();
3124 int embedder_process_id = 3128 int embedder_process_id =
3125 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; 3129 embedder_render_process_host ? embedder_render_process_host->GetID() : -1;
3126 if (embedder_process_id != -1) { 3130 if (embedder_process_id != -1) {
3127 *embedder_channel_name = 3131 *embedder_channel_name =
3128 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), 3132 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(),
3129 embedder_process_id); 3133 embedder_process_id);
3130 } 3134 }
3131 } 3135 }
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698