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 1585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1596 WebNavigationPolicy policy, | 1596 WebNavigationPolicy policy, |
1597 bool suppress_opener) { | 1597 bool suppress_opener) { |
1598 ViewHostMsg_CreateWindow_Params params; | 1598 ViewHostMsg_CreateWindow_Params params; |
1599 params.opener_id = routing_id_; | 1599 params.opener_id = routing_id_; |
1600 params.user_gesture = WebUserGestureIndicator::isProcessingUserGesture(); | 1600 params.user_gesture = WebUserGestureIndicator::isProcessingUserGesture(); |
1601 if (GetContentClient()->renderer()->AllowPopup()) | 1601 if (GetContentClient()->renderer()->AllowPopup()) |
1602 params.user_gesture = true; | 1602 params.user_gesture = true; |
1603 params.window_container_type = WindowFeaturesToContainerType(features); | 1603 params.window_container_type = WindowFeaturesToContainerType(features); |
1604 params.session_storage_namespace_id = session_storage_namespace_id_; | 1604 params.session_storage_namespace_id = session_storage_namespace_id_; |
1605 if (frame_name != "_blank") | 1605 if (frame_name != "_blank") |
1606 params.frame_name = base::UTF16ToUTF8(frame_name); | 1606 params.frame_name = base::UTF16ToUTF8(base::StringPiece16(frame_name)); |
1607 params.opener_render_frame_id = | 1607 params.opener_render_frame_id = |
1608 RenderFrameImpl::FromWebFrame(creator)->GetRoutingID(); | 1608 RenderFrameImpl::FromWebFrame(creator)->GetRoutingID(); |
1609 params.opener_url = creator->document().url(); | 1609 params.opener_url = creator->document().url(); |
1610 | 1610 |
1611 // The browser process uses the top frame's URL for a content settings check | 1611 // The browser process uses the top frame's URL for a content settings check |
1612 // to determine whether the popup is allowed. If the top frame is remote, | 1612 // to determine whether the popup is allowed. If the top frame is remote, |
1613 // its URL is not available, so use its replicated origin instead. | 1613 // its URL is not available, so use its replicated origin instead. |
1614 // | 1614 // |
1615 // TODO(alexmos): This works fine for regular origins but may break path | 1615 // TODO(alexmos): This works fine for regular origins but may break path |
1616 // matching for file URLs with OOP subframes that open popups. This should | 1616 // matching for file URLs with OOP subframes that open popups. This should |
(...skipping 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3824 std::vector<gfx::Size> sizes; | 3824 std::vector<gfx::Size> sizes; |
3825 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 3825 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
3826 if (!url.isEmpty()) | 3826 if (!url.isEmpty()) |
3827 urls.push_back( | 3827 urls.push_back( |
3828 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 3828 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
3829 } | 3829 } |
3830 SendUpdateFaviconURL(urls); | 3830 SendUpdateFaviconURL(urls); |
3831 } | 3831 } |
3832 | 3832 |
3833 } // namespace content | 3833 } // namespace content |
OLD | NEW |