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

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: Change loop style Created 4 years, 8 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 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_delegate.cc ('k') | content/browser/web_contents/web_contents_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698