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

Side by Side Diff: content/browser/frame_host/navigator.h

Issue 958083002: PlzNavigate: Show error pages when the navigation failed before commit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@support-data-urls
Patch Set: Updated test Created 5 years, 8 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 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 scoped_refptr<ResourceRequestBody> body); 136 scoped_refptr<ResourceRequestBody> body);
137 137
138 // PlzNavigate 138 // PlzNavigate
139 // Signal |render_frame_host| that a navigation is ready to commit (the 139 // Signal |render_frame_host| that a navigation is ready to commit (the
140 // response to the navigation request has been received). 140 // response to the navigation request has been received).
141 virtual void CommitNavigation(FrameTreeNode* frame_tree_node, 141 virtual void CommitNavigation(FrameTreeNode* frame_tree_node,
142 ResourceResponse* response, 142 ResourceResponse* response,
143 scoped_ptr<StreamHandle> body); 143 scoped_ptr<StreamHandle> body);
144 144
145 // PlzNavigate 145 // PlzNavigate
146 // Called when a NavigationRequest for |frame_tree_node| failed. An
147 // appropriate RenderFrameHost should be selected and asked to show an error
148 // page. |has_stale_copy_in_cache| is true if there is a stale copy of the
149 // unreachable page in cache.
150 virtual void FailedNavigation(FrameTreeNode* frame_tree_node,
151 bool has_stale_copy_in_cache,
152 int error_code) {}
153
154 // PlzNavigate
146 // Cancel a NavigationRequest for |frame_tree_node|. Called when 155 // Cancel a NavigationRequest for |frame_tree_node|. Called when
147 // |frame_tree_node| is destroyed. 156 // |frame_tree_node| is destroyed.
148 virtual void CancelNavigation(FrameTreeNode* frame_tree_node) {} 157 virtual void CancelNavigation(FrameTreeNode* frame_tree_node) {}
149 158
150 // Called when the network stack started handling the navigation request 159 // Called when the network stack started handling the navigation request
151 // so that the |timestamp| when it happened can be recorded into an histogram. 160 // so that the |timestamp| when it happened can be recorded into an histogram.
152 // The |url| is used to verify we're tracking the correct navigation. 161 // The |url| is used to verify we're tracking the correct navigation.
153 // TODO(carlosk): once PlzNavigate is the only navigation implementation 162 // TODO(carlosk): once PlzNavigate is the only navigation implementation
154 // remove the URL parameter and rename this method to better suit its naming 163 // remove the URL parameter and rename this method to better suit its naming
155 // conventions. 164 // conventions.
(...skipping 12 matching lines...) Expand all
168 virtual bool IsWaitingForBeforeUnloadACK(FrameTreeNode* frame_tree_node); 177 virtual bool IsWaitingForBeforeUnloadACK(FrameTreeNode* frame_tree_node);
169 178
170 protected: 179 protected:
171 friend class base::RefCounted<Navigator>; 180 friend class base::RefCounted<Navigator>;
172 virtual ~Navigator() {} 181 virtual ~Navigator() {}
173 }; 182 };
174 183
175 } // namespace content 184 } // namespace content
176 185
177 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ 186 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_request.cc ('k') | content/browser/frame_host/navigator_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698