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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 GpuDataManagerImpl::GetInstance()->UpdateRendererWebPrefs(&prefs); | 485 GpuDataManagerImpl::GetInstance()->UpdateRendererWebPrefs(&prefs); |
486 | 486 |
487 if (ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( | 487 if (ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( |
488 GetProcess()->GetID())) { | 488 GetProcess()->GetID())) { |
489 prefs.loads_images_automatically = true; | 489 prefs.loads_images_automatically = true; |
490 prefs.javascript_enabled = true; | 490 prefs.javascript_enabled = true; |
491 } | 491 } |
492 | 492 |
493 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); | 493 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); |
494 | 494 |
495 prefs.viewport_enabled = | 495 prefs.viewport_enabled = command_line.HasSwitch(switches::kEnableViewport); |
496 command_line.HasSwitch(switches::kEnableViewport) || | 496 |
497 prefs.viewport_meta_enabled; | 497 if (delegate_ && delegate_->IsOverridingUserAgent()) |
| 498 prefs.viewport_meta_enabled = false; |
498 | 499 |
499 prefs.main_frame_resizes_are_orientation_changes = | 500 prefs.main_frame_resizes_are_orientation_changes = |
500 command_line.HasSwitch(switches::kMainFrameResizesAreOrientationChanges); | 501 command_line.HasSwitch(switches::kMainFrameResizesAreOrientationChanges); |
501 | 502 |
502 prefs.image_color_profiles_enabled = | 503 prefs.image_color_profiles_enabled = |
503 command_line.HasSwitch(switches::kEnableImageColorProfiles); | 504 command_line.HasSwitch(switches::kEnableImageColorProfiles); |
504 | 505 |
505 prefs.spatial_navigation_enabled = command_line.HasSwitch( | 506 prefs.spatial_navigation_enabled = command_line.HasSwitch( |
506 switches::kEnableSpatialNavigation); | 507 switches::kEnableSpatialNavigation); |
507 | 508 |
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1353 } else { | 1354 } else { |
1354 render_view_ready_on_process_launch_ = true; | 1355 render_view_ready_on_process_launch_ = true; |
1355 } | 1356 } |
1356 } | 1357 } |
1357 | 1358 |
1358 void RenderViewHostImpl::RenderViewReady() { | 1359 void RenderViewHostImpl::RenderViewReady() { |
1359 delegate_->RenderViewReady(this); | 1360 delegate_->RenderViewReady(this); |
1360 } | 1361 } |
1361 | 1362 |
1362 } // namespace content | 1363 } // namespace content |
OLD | NEW |