| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/renderer/render_view.h" | 5 #include "chrome/renderer/render_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1796 GURL referrer(request.httpHeaderField(WebString::fromUTF8("Referer"))); | 1796 GURL referrer(request.httpHeaderField(WebString::fromUTF8("Referer"))); |
| 1797 if (policy == WebKit::WebNavigationPolicyDownload) { | 1797 if (policy == WebKit::WebNavigationPolicyDownload) { |
| 1798 Send(new ViewHostMsg_DownloadUrl(routing_id_, request.url(), referrer)); | 1798 Send(new ViewHostMsg_DownloadUrl(routing_id_, request.url(), referrer)); |
| 1799 } else { | 1799 } else { |
| 1800 OpenURL(request.url(), referrer, policy); | 1800 OpenURL(request.url(), referrer, policy); |
| 1801 } | 1801 } |
| 1802 } | 1802 } |
| 1803 | 1803 |
| 1804 WebNavigationPolicy RenderView::decidePolicyForNavigation( | 1804 WebNavigationPolicy RenderView::decidePolicyForNavigation( |
| 1805 WebFrame* frame, const WebURLRequest& request, WebNavigationType type, | 1805 WebFrame* frame, const WebURLRequest& request, WebNavigationType type, |
| 1806 WebNavigationPolicy default_policy, bool is_redirect) { | 1806 const WebNode&, WebNavigationPolicy default_policy, bool is_redirect) { |
| 1807 // Webkit is asking whether to navigate to a new URL. | 1807 // Webkit is asking whether to navigate to a new URL. |
| 1808 // This is fine normally, except if we're showing UI from one security | 1808 // This is fine normally, except if we're showing UI from one security |
| 1809 // context and they're trying to navigate to a different context. | 1809 // context and they're trying to navigate to a different context. |
| 1810 const GURL& url = request.url(); | 1810 const GURL& url = request.url(); |
| 1811 | 1811 |
| 1812 // If the browser is interested, then give it a chance to look at top level | 1812 // If the browser is interested, then give it a chance to look at top level |
| 1813 // navigations | 1813 // navigations |
| 1814 if (renderer_preferences_.browser_handles_top_level_requests && | 1814 if (renderer_preferences_.browser_handles_top_level_requests && |
| 1815 // Only send once. | 1815 // Only send once. |
| 1816 last_top_level_navigation_page_id_ != page_id_ && | 1816 last_top_level_navigation_page_id_ != page_id_ && |
| (...skipping 1819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3636 new PluginMsg_SignalModalDialogEvent(host_window_)); | 3636 new PluginMsg_SignalModalDialogEvent(host_window_)); |
| 3637 | 3637 |
| 3638 message->EnableMessagePumping(); // Runs a nested message loop. | 3638 message->EnableMessagePumping(); // Runs a nested message loop. |
| 3639 bool rv = Send(message); | 3639 bool rv = Send(message); |
| 3640 | 3640 |
| 3641 PluginChannelHost::Broadcast( | 3641 PluginChannelHost::Broadcast( |
| 3642 new PluginMsg_ResetModalDialogEvent(host_window_)); | 3642 new PluginMsg_ResetModalDialogEvent(host_window_)); |
| 3643 | 3643 |
| 3644 return rv; | 3644 return rv; |
| 3645 } | 3645 } |
| OLD | NEW |