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 <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1300 // For a top-level frame, there are potential security concerns associated | 1300 // For a top-level frame, there are potential security concerns associated |
1301 // with displaying graphics from a previously loaded page after the URL in | 1301 // with displaying graphics from a previously loaded page after the URL in |
1302 // the omnibar has been changed. It is unappealing to clear the page | 1302 // the omnibar has been changed. It is unappealing to clear the page |
1303 // immediately, but if the renderer is taking a long time to issue any | 1303 // immediately, but if the renderer is taking a long time to issue any |
1304 // compositor output (possibly because of script deliberately creating this | 1304 // compositor output (possibly because of script deliberately creating this |
1305 // situation) then we clear it after a while anyway. | 1305 // situation) then we clear it after a while anyway. |
1306 // See https://crbug.com/497588. | 1306 // See https://crbug.com/497588. |
1307 if (frame_tree_node_->IsMainFrame() && GetView() && | 1307 if (frame_tree_node_->IsMainFrame() && GetView() && |
1308 !validated_params.was_within_same_page) { | 1308 !validated_params.was_within_same_page) { |
1309 RenderWidgetHostImpl::From(GetView()->GetRenderWidgetHost()) | 1309 RenderWidgetHostImpl::From(GetView()->GetRenderWidgetHost()) |
1310 ->StartNewContentRenderingTimeout(); | 1310 ->StartNewContentRenderingTimeout(validated_params.content_source_id); |
1311 } | 1311 } |
1312 } | 1312 } |
1313 | 1313 |
1314 void RenderFrameHostImpl::OnUpdateState(const PageState& state) { | 1314 void RenderFrameHostImpl::OnUpdateState(const PageState& state) { |
1315 // TODO(creis): Verify the state's ISN matches the last committed FNE. | 1315 // TODO(creis): Verify the state's ISN matches the last committed FNE. |
1316 | 1316 |
1317 // Without this check, the renderer can trick the browser into using | 1317 // Without this check, the renderer can trick the browser into using |
1318 // filenames it can't access in a future session restore. | 1318 // filenames it can't access in a future session restore. |
1319 if (!CanAccessFilesOfPageState(state)) { | 1319 if (!CanAccessFilesOfPageState(state)) { |
1320 bad_message::ReceivedBadMessage( | 1320 bad_message::ReceivedBadMessage( |
(...skipping 2126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3447 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3447 // There is no pending NavigationEntry in these cases, so pass 0 as the |
3448 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3448 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
3449 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3449 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
3450 return NavigationHandleImpl::Create( | 3450 return NavigationHandleImpl::Create( |
3451 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, | 3451 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, |
3452 params.was_within_same_page, base::TimeTicks::Now(), | 3452 params.was_within_same_page, base::TimeTicks::Now(), |
3453 entry_id_for_data_nav, false); // started_from_context_menu | 3453 entry_id_for_data_nav, false); // started_from_context_menu |
3454 } | 3454 } |
3455 | 3455 |
3456 } // namespace content | 3456 } // namespace content |
OLD | NEW |