OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 2525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2536 // about:blank to clear a tab, and we want to still allow that. | 2536 // about:blank to clear a tab, and we want to still allow that. |
2537 // | 2537 // |
2538 // Note: this is known to break POST submissions when crossing process | 2538 // Note: this is known to break POST submissions when crossing process |
2539 // boundaries until http://crbug.com/101395 is fixed. This is better for | 2539 // boundaries until http://crbug.com/101395 is fixed. This is better for |
2540 // security than loading a WebUI, extension or app page in the wrong process. | 2540 // security than loading a WebUI, extension or app page in the wrong process. |
2541 // POST requests don't work because this mechanism does not preserve form | 2541 // POST requests don't work because this mechanism does not preserve form |
2542 // POST data. We will need to send the request's httpBody data up to the | 2542 // POST data. We will need to send the request's httpBody data up to the |
2543 // browser process, and issue a special POST navigation in WebKit (via | 2543 // browser process, and issue a special POST navigation in WebKit (via |
2544 // FrameLoader::loadFrameRequest). See ResourceDispatcher and WebURLLoaderImpl | 2544 // FrameLoader::loadFrameRequest). See ResourceDispatcher and WebURLLoaderImpl |
2545 // for examples of how to send the httpBody data. | 2545 // for examples of how to send the httpBody data. |
2546 if (!frame->parent() && is_content_initiated && | 2546 if (!frame->parent() && is_content_initiated && !url.SchemeIs(kAboutScheme)) { |
2547 !url.SchemeIs(chrome::kAboutScheme)) { | |
2548 bool send_referrer = false; | 2547 bool send_referrer = false; |
2549 | 2548 |
2550 // All navigations to or from WebUI URLs or within WebUI-enabled | 2549 // All navigations to or from WebUI URLs or within WebUI-enabled |
2551 // RenderProcesses must be handled by the browser process so that the | 2550 // RenderProcesses must be handled by the browser process so that the |
2552 // correct bindings and data sources can be registered. | 2551 // correct bindings and data sources can be registered. |
2553 // Similarly, navigations to view-source URLs or within ViewSource mode | 2552 // Similarly, navigations to view-source URLs or within ViewSource mode |
2554 // must be handled by the browser process (except for reloads - those are | 2553 // must be handled by the browser process (except for reloads - those are |
2555 // safe to leave within the renderer). | 2554 // safe to leave within the renderer). |
2556 // Lastly, access to file:// URLs from non-file:// URL pages must be | 2555 // Lastly, access to file:// URLs from non-file:// URL pages must be |
2557 // handled by the browser so that ordinary renderer processes don't get | 2556 // handled by the browser so that ordinary renderer processes don't get |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2665 policy == blink::WebNavigationPolicyNewForegroundTab || | 2664 policy == blink::WebNavigationPolicyNewForegroundTab || |
2666 policy == blink::WebNavigationPolicyNewWindow || | 2665 policy == blink::WebNavigationPolicyNewWindow || |
2667 policy == blink::WebNavigationPolicyNewPopup) { | 2666 policy == blink::WebNavigationPolicyNewPopup) { |
2668 WebUserGestureIndicator::consumeUserGesture(); | 2667 WebUserGestureIndicator::consumeUserGesture(); |
2669 } | 2668 } |
2670 | 2669 |
2671 Send(new FrameHostMsg_OpenURL(routing_id_, params)); | 2670 Send(new FrameHostMsg_OpenURL(routing_id_, params)); |
2672 } | 2671 } |
2673 | 2672 |
2674 } // namespace content | 2673 } // namespace content |
OLD | NEW |