Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 1785953002: Ignore viewport meta tags when Request Desktop Site is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix more tests Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 GpuDataManagerImpl::GetInstance()->UpdateRendererWebPrefs(&prefs); 486 GpuDataManagerImpl::GetInstance()->UpdateRendererWebPrefs(&prefs);
487 487
488 if (ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( 488 if (ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings(
489 GetProcess()->GetID())) { 489 GetProcess()->GetID())) {
490 prefs.loads_images_automatically = true; 490 prefs.loads_images_automatically = true;
491 prefs.javascript_enabled = true; 491 prefs.javascript_enabled = true;
492 } 492 }
493 493
494 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); 494 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors();
495 495
496 prefs.viewport_enabled = 496 prefs.viewport_enabled = command_line.HasSwitch(switches::kEnableViewport);
497 command_line.HasSwitch(switches::kEnableViewport) || 497
498 prefs.viewport_meta_enabled; 498 if (delegate_ && delegate_->IsOverridingUserAgent())
499 prefs.viewport_meta_enabled = false;
499 500
500 prefs.main_frame_resizes_are_orientation_changes = 501 prefs.main_frame_resizes_are_orientation_changes =
501 command_line.HasSwitch(switches::kMainFrameResizesAreOrientationChanges); 502 command_line.HasSwitch(switches::kMainFrameResizesAreOrientationChanges);
502 503
503 prefs.image_color_profiles_enabled = 504 prefs.image_color_profiles_enabled =
504 command_line.HasSwitch(switches::kEnableImageColorProfiles); 505 command_line.HasSwitch(switches::kEnableImageColorProfiles);
505 506
506 prefs.spatial_navigation_enabled = command_line.HasSwitch( 507 prefs.spatial_navigation_enabled = command_line.HasSwitch(
507 switches::kEnableSpatialNavigation); 508 switches::kEnableSpatialNavigation);
508 509
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
1354 } else { 1355 } else {
1355 render_view_ready_on_process_launch_ = true; 1356 render_view_ready_on_process_launch_ = true;
1356 } 1357 }
1357 } 1358 }
1358 1359
1359 void RenderViewHostImpl::RenderViewReady() { 1360 void RenderViewHostImpl::RenderViewReady() {
1360 delegate_->RenderViewReady(this); 1361 delegate_->RenderViewReady(this);
1361 } 1362 }
1362 1363
1363 } // namespace content 1364 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698