| 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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 prefs.show_composited_layer_tree = | 450 prefs.show_composited_layer_tree = |
| 451 command_line.HasSwitch(switches::kShowCompositedLayerTree); | 451 command_line.HasSwitch(switches::kShowCompositedLayerTree); |
| 452 prefs.show_fps_counter = | 452 prefs.show_fps_counter = |
| 453 command_line.HasSwitch(switches::kShowFPSCounter); | 453 command_line.HasSwitch(switches::kShowFPSCounter); |
| 454 prefs.show_paint_rects = | 454 prefs.show_paint_rects = |
| 455 command_line.HasSwitch(switches::kShowPaintRects); | 455 command_line.HasSwitch(switches::kShowPaintRects); |
| 456 prefs.accelerated_compositing_enabled = | 456 prefs.accelerated_compositing_enabled = |
| 457 GpuProcessHost::gpu_enabled() && | 457 GpuProcessHost::gpu_enabled() && |
| 458 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); | 458 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); |
| 459 prefs.force_compositing_mode = | 459 prefs.force_compositing_mode = |
| 460 command_line.HasSwitch(switches::kForceCompositingMode); | 460 command_line.HasSwitch(switches::kForceCompositingMode) && |
| 461 !command_line.HasSwitch(switches::kDisableForceCompositingMode); |
| 461 prefs.fixed_position_compositing_enabled = | 462 prefs.fixed_position_compositing_enabled = |
| 462 command_line.HasSwitch(switches::kEnableCompositingForFixedPosition); | 463 command_line.HasSwitch(switches::kEnableCompositingForFixedPosition); |
| 463 prefs.accelerated_2d_canvas_enabled = | 464 prefs.accelerated_2d_canvas_enabled = |
| 464 GpuProcessHost::gpu_enabled() && | 465 GpuProcessHost::gpu_enabled() && |
| 465 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); | 466 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); |
| 466 prefs.deferred_2d_canvas_enabled = | 467 prefs.deferred_2d_canvas_enabled = |
| 467 !command_line.HasSwitch(switches::kDisableDeferred2dCanvas); | 468 !command_line.HasSwitch(switches::kDisableDeferred2dCanvas); |
| 468 prefs.accelerated_painting_enabled = | 469 prefs.accelerated_painting_enabled = |
| 469 GpuProcessHost::gpu_enabled() && | 470 GpuProcessHost::gpu_enabled() && |
| 470 command_line.HasSwitch(switches::kEnableAcceleratedPainting); | 471 command_line.HasSwitch(switches::kEnableAcceleratedPainting); |
| (...skipping 2562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3033 browser_plugin_host()->embedder_render_process_host(); | 3034 browser_plugin_host()->embedder_render_process_host(); |
| 3034 *embedder_container_id = browser_plugin_host()->instance_id(); | 3035 *embedder_container_id = browser_plugin_host()->instance_id(); |
| 3035 int embedder_process_id = | 3036 int embedder_process_id = |
| 3036 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; | 3037 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; |
| 3037 if (embedder_process_id != -1) { | 3038 if (embedder_process_id != -1) { |
| 3038 *embedder_channel_name = | 3039 *embedder_channel_name = |
| 3039 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), | 3040 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), |
| 3040 embedder_process_id); | 3041 embedder_process_id); |
| 3041 } | 3042 } |
| 3042 } | 3043 } |
| OLD | NEW |