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/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 3587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3598 navigation_state->set_allow_download(params.allow_download); | 3598 navigation_state->set_allow_download(params.allow_download); |
3599 navigation_state->set_extra_headers(params.extra_headers); | 3599 navigation_state->set_extra_headers(params.extra_headers); |
3600 } else { | 3600 } else { |
3601 navigation_state = NavigationState::CreateContentInitiated(); | 3601 navigation_state = NavigationState::CreateContentInitiated(); |
3602 } | 3602 } |
3603 return navigation_state; | 3603 return navigation_state; |
3604 } | 3604 } |
3605 | 3605 |
3606 void RenderViewImpl::ProcessViewLayoutFlags(const CommandLine& command_line) { | 3606 void RenderViewImpl::ProcessViewLayoutFlags(const CommandLine& command_line) { |
3607 bool enable_viewport = | 3607 bool enable_viewport = |
3608 command_line.HasSwitch(switches::kEnableViewport); | 3608 command_line.HasSwitch(switches::kEnableViewport) || |
| 3609 command_line.HasSwitch(switches::kEnableViewportMeta); |
3609 | 3610 |
3610 // If viewport tag is enabled, then the WebKit side will take care | 3611 // If viewport tag is enabled, then the WebKit side will take care |
3611 // of setting the fixed layout size and page scale limits. | 3612 // of setting the fixed layout size and page scale limits. |
3612 if (enable_viewport) | 3613 if (enable_viewport) |
3613 return; | 3614 return; |
3614 | 3615 |
3615 // When navigating to a new page, reset the page scale factor to be 1.0. | 3616 // When navigating to a new page, reset the page scale factor to be 1.0. |
3616 webview()->setInitialPageScaleOverride(1.f); | 3617 webview()->setInitialPageScaleOverride(1.f); |
3617 | 3618 |
3618 float maxPageScaleFactor = | 3619 float maxPageScaleFactor = |
(...skipping 2964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6583 for (size_t i = 0; i < icon_urls.size(); i++) { | 6584 for (size_t i = 0; i < icon_urls.size(); i++) { |
6584 WebURL url = icon_urls[i].iconURL(); | 6585 WebURL url = icon_urls[i].iconURL(); |
6585 if (!url.isEmpty()) | 6586 if (!url.isEmpty()) |
6586 urls.push_back(FaviconURL(url, | 6587 urls.push_back(FaviconURL(url, |
6587 ToFaviconType(icon_urls[i].iconType()))); | 6588 ToFaviconType(icon_urls[i].iconType()))); |
6588 } | 6589 } |
6589 SendUpdateFaviconURL(urls); | 6590 SendUpdateFaviconURL(urls); |
6590 } | 6591 } |
6591 | 6592 |
6592 } // namespace content | 6593 } // namespace content |
OLD | NEW |