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/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 GpuDataManagerImpl::GetInstance()->UpdateRendererWebPrefs(&prefs); | 484 GpuDataManagerImpl::GetInstance()->UpdateRendererWebPrefs(&prefs); |
485 | 485 |
486 if (ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( | 486 if (ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( |
487 GetProcess()->GetID())) { | 487 GetProcess()->GetID())) { |
488 prefs.loads_images_automatically = true; | 488 prefs.loads_images_automatically = true; |
489 prefs.javascript_enabled = true; | 489 prefs.javascript_enabled = true; |
490 } | 490 } |
491 | 491 |
492 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); | 492 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); |
493 | 493 |
494 prefs.viewport_enabled = | 494 prefs.viewport_enabled = command_line.HasSwitch(switches::kEnableViewport); |
495 command_line.HasSwitch(switches::kEnableViewport) || | 495 |
496 prefs.viewport_meta_enabled; | 496 if (delegate_ && delegate_->IsOverridingUserAgent()) |
| 497 prefs.viewport_meta_enabled = false; |
497 | 498 |
498 prefs.main_frame_resizes_are_orientation_changes = | 499 prefs.main_frame_resizes_are_orientation_changes = |
499 command_line.HasSwitch(switches::kMainFrameResizesAreOrientationChanges); | 500 command_line.HasSwitch(switches::kMainFrameResizesAreOrientationChanges); |
500 | 501 |
501 prefs.image_color_profiles_enabled = | 502 prefs.image_color_profiles_enabled = |
502 command_line.HasSwitch(switches::kEnableImageColorProfiles); | 503 command_line.HasSwitch(switches::kEnableImageColorProfiles); |
503 | 504 |
504 prefs.spatial_navigation_enabled = command_line.HasSwitch( | 505 prefs.spatial_navigation_enabled = command_line.HasSwitch( |
505 switches::kEnableSpatialNavigation); | 506 switches::kEnableSpatialNavigation); |
506 | 507 |
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1347 } else { | 1348 } else { |
1348 render_view_ready_on_process_launch_ = true; | 1349 render_view_ready_on_process_launch_ = true; |
1349 } | 1350 } |
1350 } | 1351 } |
1351 | 1352 |
1352 void RenderViewHostImpl::RenderViewReady() { | 1353 void RenderViewHostImpl::RenderViewReady() { |
1353 delegate_->RenderViewReady(this); | 1354 delegate_->RenderViewReady(this); |
1354 } | 1355 } |
1355 | 1356 |
1356 } // namespace content | 1357 } // namespace content |
OLD | NEW |