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 3561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |