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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 38793007: Experimental viewport meta tag support for desktop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/renderer/web_preferences.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 3559 matching lines...) Expand 10 before | Expand all | Expand 10 after
3570 navigation_state->set_allow_download(params.allow_download); 3570 navigation_state->set_allow_download(params.allow_download);
3571 navigation_state->set_extra_headers(params.extra_headers); 3571 navigation_state->set_extra_headers(params.extra_headers);
3572 } else { 3572 } else {
3573 navigation_state = NavigationState::CreateContentInitiated(); 3573 navigation_state = NavigationState::CreateContentInitiated();
3574 } 3574 }
3575 return navigation_state; 3575 return navigation_state;
3576 } 3576 }
3577 3577
3578 void RenderViewImpl::ProcessViewLayoutFlags(const CommandLine& command_line) { 3578 void RenderViewImpl::ProcessViewLayoutFlags(const CommandLine& command_line) {
3579 bool enable_viewport = 3579 bool enable_viewport =
3580 command_line.HasSwitch(switches::kEnableViewport); 3580 command_line.HasSwitch(switches::kEnableViewport) ||
3581 command_line.HasSwitch(switches::kEnableViewportMeta);
3581 3582
3582 // If viewport tag is enabled, then the WebKit side will take care 3583 // If viewport tag is enabled, then the WebKit side will take care
3583 // of setting the fixed layout size and page scale limits. 3584 // of setting the fixed layout size and page scale limits.
3584 if (enable_viewport) 3585 if (enable_viewport)
3585 return; 3586 return;
3586 3587
3587 // When navigating to a new page, reset the page scale factor to be 1.0. 3588 // When navigating to a new page, reset the page scale factor to be 1.0.
3588 webview()->setInitialPageScaleOverride(1.f); 3589 webview()->setInitialPageScaleOverride(1.f);
3589 3590
3590 float maxPageScaleFactor = 3591 float maxPageScaleFactor =
(...skipping 3067 matching lines...) Expand 10 before | Expand all | Expand 10 after
6658 for (size_t i = 0; i < icon_urls.size(); i++) { 6659 for (size_t i = 0; i < icon_urls.size(); i++) {
6659 WebURL url = icon_urls[i].iconURL(); 6660 WebURL url = icon_urls[i].iconURL();
6660 if (!url.isEmpty()) 6661 if (!url.isEmpty())
6661 urls.push_back(FaviconURL(url, 6662 urls.push_back(FaviconURL(url,
6662 ToFaviconType(icon_urls[i].iconType()))); 6663 ToFaviconType(icon_urls[i].iconType())));
6663 } 6664 }
6664 SendUpdateFaviconURL(urls); 6665 SendUpdateFaviconURL(urls);
6665 } 6666 }
6666 6667
6667 } // namespace content 6668 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/renderer/web_preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698