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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); | 460 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); |
461 prefs.force_compositing_mode = | 461 prefs.force_compositing_mode = |
462 command_line.HasSwitch(switches::kForceCompositingMode) && | 462 command_line.HasSwitch(switches::kForceCompositingMode) && |
463 !command_line.HasSwitch(switches::kDisableForceCompositingMode); | 463 !command_line.HasSwitch(switches::kDisableForceCompositingMode); |
464 prefs.fixed_position_compositing_enabled = | 464 prefs.fixed_position_compositing_enabled = |
465 command_line.HasSwitch(switches::kEnableCompositingForFixedPosition); | 465 command_line.HasSwitch(switches::kEnableCompositingForFixedPosition); |
466 prefs.accelerated_2d_canvas_enabled = | 466 prefs.accelerated_2d_canvas_enabled = |
467 GpuProcessHost::gpu_enabled() && | 467 GpuProcessHost::gpu_enabled() && |
468 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); | 468 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); |
469 prefs.deferred_2d_canvas_enabled = | 469 prefs.deferred_2d_canvas_enabled = |
470 !command_line.HasSwitch(switches::kDisableDeferred2dCanvas); | 470 command_line.HasSwitch(switches::kEnableDeferred2dCanvas); |
471 prefs.accelerated_painting_enabled = | 471 prefs.accelerated_painting_enabled = |
472 GpuProcessHost::gpu_enabled() && | 472 GpuProcessHost::gpu_enabled() && |
473 command_line.HasSwitch(switches::kEnableAcceleratedPainting); | 473 command_line.HasSwitch(switches::kEnableAcceleratedPainting); |
474 prefs.accelerated_filters_enabled = | 474 prefs.accelerated_filters_enabled = |
475 GpuProcessHost::gpu_enabled() && | 475 GpuProcessHost::gpu_enabled() && |
476 command_line.HasSwitch(switches::kEnableAcceleratedFilters); | 476 command_line.HasSwitch(switches::kEnableAcceleratedFilters); |
477 prefs.accelerated_layers_enabled = | 477 prefs.accelerated_layers_enabled = |
478 prefs.accelerated_animation_enabled = | 478 prefs.accelerated_animation_enabled = |
479 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); | 479 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); |
480 prefs.accelerated_plugins_enabled = | 480 prefs.accelerated_plugins_enabled = |
(...skipping 2599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3080 browser_plugin_host()->embedder_render_process_host(); | 3080 browser_plugin_host()->embedder_render_process_host(); |
3081 *embedder_container_id = browser_plugin_host()->instance_id(); | 3081 *embedder_container_id = browser_plugin_host()->instance_id(); |
3082 int embedder_process_id = | 3082 int embedder_process_id = |
3083 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; | 3083 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; |
3084 if (embedder_process_id != -1) { | 3084 if (embedder_process_id != -1) { |
3085 *embedder_channel_name = | 3085 *embedder_channel_name = |
3086 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), | 3086 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), |
3087 embedder_process_id); | 3087 embedder_process_id); |
3088 } | 3088 } |
3089 } | 3089 } |
OLD | NEW |