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

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
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 3561 matching lines...) Expand 10 before | Expand all | Expand 10 after
3572 navigation_state->set_allow_download(params.allow_download); 3572 navigation_state->set_allow_download(params.allow_download);
3573 navigation_state->set_extra_headers(params.extra_headers); 3573 navigation_state->set_extra_headers(params.extra_headers);
3574 } else { 3574 } else {
3575 navigation_state = NavigationState::CreateContentInitiated(); 3575 navigation_state = NavigationState::CreateContentInitiated();
3576 } 3576 }
3577 return navigation_state; 3577 return navigation_state;
3578 } 3578 }
3579 3579
3580 void RenderViewImpl::ProcessViewLayoutFlags(const CommandLine& command_line) { 3580 void RenderViewImpl::ProcessViewLayoutFlags(const CommandLine& command_line) {
3581 bool enable_viewport = 3581 bool enable_viewport =
3582 command_line.HasSwitch(switches::kEnableViewport); 3582 command_line.HasSwitch(switches::kEnableViewport) ||
3583 command_line.HasSwitch(switches::kEnableViewportMeta);
3583 3584
3584 // If viewport tag is enabled, then the WebKit side will take care 3585 // If viewport tag is enabled, then the WebKit side will take care
3585 // of setting the fixed layout size and page scale limits. 3586 // of setting the fixed layout size and page scale limits.
3586 if (enable_viewport) 3587 if (enable_viewport)
3587 return; 3588 return;
3588 3589
3589 // When navigating to a new page, reset the page scale factor to be 1.0. 3590 // When navigating to a new page, reset the page scale factor to be 1.0.
3590 webview()->setInitialPageScaleOverride(1.f); 3591 webview()->setInitialPageScaleOverride(1.f);
3591 3592
3592 float maxPageScaleFactor = 3593 float maxPageScaleFactor =
(...skipping 3063 matching lines...) Expand 10 before | Expand all | Expand 10 after
6656 for (size_t i = 0; i < icon_urls.size(); i++) { 6657 for (size_t i = 0; i < icon_urls.size(); i++) {
6657 WebURL url = icon_urls[i].iconURL(); 6658 WebURL url = icon_urls[i].iconURL();
6658 if (!url.isEmpty()) 6659 if (!url.isEmpty())
6659 urls.push_back(FaviconURL(url, 6660 urls.push_back(FaviconURL(url,
6660 ToFaviconType(icon_urls[i].iconType()))); 6661 ToFaviconType(icon_urls[i].iconType())));
6661 } 6662 }
6662 SendUpdateFaviconURL(urls); 6663 SendUpdateFaviconURL(urls);
6663 } 6664 }
6664 6665
6665 } // namespace content 6666 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698