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

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

Issue 10501006: Connect up flash blacklist entries to GetSettingInt (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clarify comments Created 8 years, 6 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
« no previous file with comments | « no previous file | content/common/view_messages.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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 prefs.databases_enabled = 421 prefs.databases_enabled =
422 !command_line.HasSwitch(switches::kDisableDatabases); 422 !command_line.HasSwitch(switches::kDisableDatabases);
423 prefs.webaudio_enabled = 423 prefs.webaudio_enabled =
424 !command_line.HasSwitch(switches::kDisableWebAudio); 424 !command_line.HasSwitch(switches::kDisableWebAudio);
425 425
426 prefs.experimental_webgl_enabled = 426 prefs.experimental_webgl_enabled =
427 GpuProcessHost::gpu_enabled() && 427 GpuProcessHost::gpu_enabled() &&
428 !command_line.HasSwitch(switches::kDisable3DAPIs) && 428 !command_line.HasSwitch(switches::kDisable3DAPIs) &&
429 !command_line.HasSwitch(switches::kDisableExperimentalWebGL); 429 !command_line.HasSwitch(switches::kDisableExperimentalWebGL);
430 430
431 prefs.flash_3d_enabled = prefs.flash_stage3d_enabled =
432 GpuProcessHost::gpu_enabled();
433
431 prefs.gl_multisampling_enabled = 434 prefs.gl_multisampling_enabled =
432 !command_line.HasSwitch(switches::kDisableGLMultisampling); 435 !command_line.HasSwitch(switches::kDisableGLMultisampling);
433 prefs.privileged_webgl_extensions_enabled = 436 prefs.privileged_webgl_extensions_enabled =
434 command_line.HasSwitch(switches::kEnablePrivilegedWebGLExtensions); 437 command_line.HasSwitch(switches::kEnablePrivilegedWebGLExtensions);
435 prefs.site_specific_quirks_enabled = 438 prefs.site_specific_quirks_enabled =
436 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks); 439 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks);
437 prefs.allow_file_access_from_file_urls = 440 prefs.allow_file_access_from_file_urls =
438 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); 441 command_line.HasSwitch(switches::kAllowFileAccessFromFiles);
439 prefs.show_composited_layer_borders = 442 prefs.show_composited_layer_borders =
440 command_line.HasSwitch(switches::kShowCompositedLayerBorders); 443 command_line.HasSwitch(switches::kShowCompositedLayerBorders);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 command_line.HasSwitch(switches::kEnablePerTilePainting); 505 command_line.HasSwitch(switches::kEnablePerTilePainting);
503 506
504 { // Certain GPU features might have been blacklisted. 507 { // Certain GPU features might have been blacklisted.
505 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); 508 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance();
506 DCHECK(gpu_data_manager); 509 DCHECK(gpu_data_manager);
507 uint32 blacklist_type = gpu_data_manager->GetGpuFeatureType(); 510 uint32 blacklist_type = gpu_data_manager->GetGpuFeatureType();
508 if (blacklist_type & content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING) 511 if (blacklist_type & content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING)
509 prefs.accelerated_compositing_enabled = false; 512 prefs.accelerated_compositing_enabled = false;
510 if (blacklist_type & content::GPU_FEATURE_TYPE_WEBGL) 513 if (blacklist_type & content::GPU_FEATURE_TYPE_WEBGL)
511 prefs.experimental_webgl_enabled = false; 514 prefs.experimental_webgl_enabled = false;
515 if (blacklist_type & content::GPU_FEATURE_TYPE_FLASH3D)
516 prefs.flash_3d_enabled = false;
517 if (blacklist_type & content::GPU_FEATURE_TYPE_FLASH_STAGE3D)
518 prefs.flash_stage3d_enabled = false;
512 if (blacklist_type & content::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS) 519 if (blacklist_type & content::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS)
513 prefs.accelerated_2d_canvas_enabled = false; 520 prefs.accelerated_2d_canvas_enabled = false;
514 if (blacklist_type & content::GPU_FEATURE_TYPE_MULTISAMPLING) 521 if (blacklist_type & content::GPU_FEATURE_TYPE_MULTISAMPLING)
515 prefs.gl_multisampling_enabled = false; 522 prefs.gl_multisampling_enabled = false;
516 523
517 // Accelerated video and animation are slower than regular when using a 524 // Accelerated video and animation are slower than regular when using a
518 // software 3d rasterizer. 3D CSS may also be too slow to be worthwhile. 525 // software 3d rasterizer. 3D CSS may also be too slow to be worthwhile.
519 if (gpu_data_manager->ShouldUseSoftwareRendering()) { 526 if (gpu_data_manager->ShouldUseSoftwareRendering()) {
520 prefs.accelerated_video_enabled = false; 527 prefs.accelerated_video_enabled = false;
521 prefs.accelerated_animation_enabled = false; 528 prefs.accelerated_animation_enabled = false;
(...skipping 2548 matching lines...) Expand 10 before | Expand all | Expand 10 after
3070 browser_plugin_host()->embedder_render_process_host(); 3077 browser_plugin_host()->embedder_render_process_host();
3071 *embedder_container_id = browser_plugin_host()->instance_id(); 3078 *embedder_container_id = browser_plugin_host()->instance_id();
3072 int embedder_process_id = 3079 int embedder_process_id =
3073 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; 3080 embedder_render_process_host ? embedder_render_process_host->GetID() : -1;
3074 if (embedder_process_id != -1) { 3081 if (embedder_process_id != -1) {
3075 *embedder_channel_name = 3082 *embedder_channel_name =
3076 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), 3083 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(),
3077 embedder_process_id); 3084 embedder_process_id);
3078 } 3085 }
3079 } 3086 }
OLDNEW
« no previous file with comments | « no previous file | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698