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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 if (command_line.HasSwitch(switches::kMaxUntiledLayerHeight)) | 581 if (command_line.HasSwitch(switches::kMaxUntiledLayerHeight)) |
582 prefs.max_untiled_layer_height = | 582 prefs.max_untiled_layer_height = |
583 GetSwitchValueAsInt(command_line, switches::kMaxUntiledLayerHeight, 1); | 583 GetSwitchValueAsInt(command_line, switches::kMaxUntiledLayerHeight, 1); |
584 | 584 |
585 if (gfx::Screen::IsDIPEnabled()) { | 585 if (gfx::Screen::IsDIPEnabled()) { |
586 // Only apply when using DIP coordinate system as this setting interferes | 586 // Only apply when using DIP coordinate system as this setting interferes |
587 // with fixed layout mode. | 587 // with fixed layout mode. |
588 prefs.apply_default_device_scale_factor_in_compositor = true; | 588 prefs.apply_default_device_scale_factor_in_compositor = true; |
589 } | 589 } |
590 | 590 |
591 prefs.fixed_position_creates_stacking_context = | 591 prefs.fixed_position_creates_stacking_context = !command_line.HasSwitch( |
592 command_line.HasSwitch(switches::kFixedPositionCreatesStackingContext); | 592 switches::kDisableFixedPositionCreatesStackingContext); |
593 | 593 |
594 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); | 594 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); |
595 | 595 |
596 content::GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs); | 596 content::GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs); |
597 | 597 |
598 return prefs; | 598 return prefs; |
599 } | 599 } |
600 | 600 |
601 NavigationControllerImpl& WebContentsImpl::GetControllerImpl() { | 601 NavigationControllerImpl& WebContentsImpl::GetControllerImpl() { |
602 return controller_; | 602 return controller_; |
(...skipping 2519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3122 browser_plugin_host()->embedder_render_process_host(); | 3122 browser_plugin_host()->embedder_render_process_host(); |
3123 *embedder_container_id = browser_plugin_host()->instance_id(); | 3123 *embedder_container_id = browser_plugin_host()->instance_id(); |
3124 int embedder_process_id = | 3124 int embedder_process_id = |
3125 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; | 3125 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; |
3126 if (embedder_process_id != -1) { | 3126 if (embedder_process_id != -1) { |
3127 *embedder_channel_name = | 3127 *embedder_channel_name = |
3128 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), | 3128 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), |
3129 embedder_process_id); | 3129 embedder_process_id); |
3130 } | 3130 } |
3131 } | 3131 } |
OLD | NEW |