Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1339803002: Clear page display after navigation if no rendered output arrives (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made ClearCompositorFrame pure virtual Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 // message. 908 // message.
909 if (!navigation_handle_) { 909 if (!navigation_handle_) {
910 navigation_handle_ = NavigationHandleImpl::Create( 910 navigation_handle_ = NavigationHandleImpl::Create(
911 validated_params.url, frame_tree_node_->IsMainFrame(), 911 validated_params.url, frame_tree_node_->IsMainFrame(),
912 frame_tree_node_->navigator()->GetDelegate()); 912 frame_tree_node_->navigator()->GetDelegate());
913 } 913 }
914 914
915 accessibility_reset_count_ = 0; 915 accessibility_reset_count_ = 0;
916 frame_tree_node()->navigator()->DidNavigate(this, validated_params); 916 frame_tree_node()->navigator()->DidNavigate(this, validated_params);
917 917
918 // For a top-level frame, there are potential security concerns associated
919 // with displaying graphics from a previously loaded page after the URL in
920 // the omnibar has been changed. It is unappealing to clear the page
921 // immediately, but if the renderer is taking a long time to issue any
922 // compositor output (possibly because of script deliberately creating this
923 // situation) then we clear it after a while anyway.
924 // See https://crbug.com/497588.
925 if (frame_tree_node_->IsMainFrame() && GetView()) {
926 RenderWidgetHostImpl::From(GetView()->GetRenderWidgetHost())
927 ->StartNewContentRenderingTimeout();
928 }
929
918 // PlzNavigate 930 // PlzNavigate
919 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 931 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
920 switches::kEnableBrowserSideNavigation)) { 932 switches::kEnableBrowserSideNavigation)) {
921 pending_commit_ = false; 933 pending_commit_ = false;
922 } 934 }
923 } 935 }
924 936
925 void RenderFrameHostImpl::OnDidDropNavigation() { 937 void RenderFrameHostImpl::OnDidDropNavigation() {
926 // At the end of Navigate(), the FrameTreeNode's DidStartLoading is called to 938 // At the end of Navigate(), the FrameTreeNode's DidStartLoading is called to
927 // force the spinner to start, even if the renderer didn't yet begin the load. 939 // force the spinner to start, even if the renderer didn't yet begin the load.
(...skipping 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after
2225 BrowserPluginInstanceIDToAXTreeID(value))); 2237 BrowserPluginInstanceIDToAXTreeID(value)));
2226 break; 2238 break;
2227 case AX_CONTENT_INT_ATTRIBUTE_LAST: 2239 case AX_CONTENT_INT_ATTRIBUTE_LAST:
2228 NOTREACHED(); 2240 NOTREACHED();
2229 break; 2241 break;
2230 } 2242 }
2231 } 2243 }
2232 } 2244 }
2233 2245
2234 } // namespace content 2246 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/delegated_frame_host.cc ('k') | content/browser/frame_host/render_widget_host_view_child_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698