| 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/browser/frame_host/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1660 // | 1660 // |
| 1661 // Blink doesn't send throb notifications for JavaScript URLs, so it is not | 1661 // Blink doesn't send throb notifications for JavaScript URLs, so it is not |
| 1662 // done here either. | 1662 // done here either. |
| 1663 if (!common_params.url.SchemeIs(url::kJavaScriptScheme)) | 1663 if (!common_params.url.SchemeIs(url::kJavaScriptScheme)) |
| 1664 frame_tree_node_->DidStartLoading(true); | 1664 frame_tree_node_->DidStartLoading(true); |
| 1665 } | 1665 } |
| 1666 | 1666 |
| 1667 void RenderFrameHostImpl::NavigateToURL(const GURL& url) { | 1667 void RenderFrameHostImpl::NavigateToURL(const GURL& url) { |
| 1668 CommonNavigationParams common_params( | 1668 CommonNavigationParams common_params( |
| 1669 url, Referrer(), ui::PAGE_TRANSITION_LINK, FrameMsg_Navigate_Type::NORMAL, | 1669 url, Referrer(), ui::PAGE_TRANSITION_LINK, FrameMsg_Navigate_Type::NORMAL, |
| 1670 true, base::TimeTicks::Now(), FrameMsg_UILoadMetricsReportType::NO_REPORT, | 1670 true, false, base::TimeTicks::Now(), |
| 1671 GURL(), GURL()); | 1671 FrameMsg_UILoadMetricsReportType::NO_REPORT, GURL(), GURL()); |
| 1672 Navigate(common_params, StartNavigationParams(), RequestNavigationParams()); | 1672 Navigate(common_params, StartNavigationParams(), RequestNavigationParams()); |
| 1673 } | 1673 } |
| 1674 | 1674 |
| 1675 void RenderFrameHostImpl::OpenURL(const FrameHostMsg_OpenURL_Params& params, | 1675 void RenderFrameHostImpl::OpenURL(const FrameHostMsg_OpenURL_Params& params, |
| 1676 SiteInstance* source_site_instance) { | 1676 SiteInstance* source_site_instance) { |
| 1677 GURL validated_url(params.url); | 1677 GURL validated_url(params.url); |
| 1678 GetProcess()->FilterURL(false, &validated_url); | 1678 GetProcess()->FilterURL(false, &validated_url); |
| 1679 | 1679 |
| 1680 TRACE_EVENT1("navigation", "RenderFrameHostImpl::OpenURL", "url", | 1680 TRACE_EVENT1("navigation", "RenderFrameHostImpl::OpenURL", "url", |
| 1681 validated_url.possibly_invalid_spec()); | 1681 validated_url.possibly_invalid_spec()); |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2092 // We may be returning to an existing NavigationEntry that had been granted | 2092 // We may be returning to an existing NavigationEntry that had been granted |
| 2093 // file access. If this is a different process, we will need to grant the | 2093 // file access. If this is a different process, we will need to grant the |
| 2094 // access again. The files listed in the page state are validated when they | 2094 // access again. The files listed in the page state are validated when they |
| 2095 // are received from the renderer to prevent abuse. | 2095 // are received from the renderer to prevent abuse. |
| 2096 if (request_params.page_state.IsValid()) { | 2096 if (request_params.page_state.IsValid()) { |
| 2097 render_view_host_->GrantFileAccessFromPageState(request_params.page_state); | 2097 render_view_host_->GrantFileAccessFromPageState(request_params.page_state); |
| 2098 } | 2098 } |
| 2099 } | 2099 } |
| 2100 | 2100 |
| 2101 } // namespace content | 2101 } // namespace content |
| OLD | NEW |