Index: content/browser/frame_host/navigation_request.h |
diff --git a/content/browser/frame_host/navigation_request.h b/content/browser/frame_host/navigation_request.h |
index eb5372113741e6ee9bb5e6d2eefd21ef957c76d7..ab3e9477afebd9fa3f2fdcfc554ecc50950fcf1c 100644 |
--- a/content/browser/frame_host/navigation_request.h |
+++ b/content/browser/frame_host/navigation_request.h |
@@ -27,6 +27,14 @@ struct NavigationRequestInfo; |
// the navigation following its refactoring. |
class CONTENT_EXPORT NavigationRequest : public NavigationURLLoaderDelegate { |
public: |
+ enum NavigationState { |
clamy
2014/12/15 17:01:39
I actually plan to use this enum for things other
nasko
2014/12/16 01:40:26
Let's put a comment explaining the goal/usage of i
clamy
2014/12/17 15:47:57
Done.
|
+ NOT_STARTED = 0, |
+ WAITING_FOR_RENDERER_RESPONSE, |
+ STARTED, |
+ RESPONSE_STARTED, |
+ FAILED, |
+ }; |
+ |
NavigationRequest(FrameTreeNode* frame_tree_node, |
const CommonNavigationParams& common_params, |
const CommitNavigationParams& commit_params); |
@@ -45,6 +53,12 @@ class CONTENT_EXPORT NavigationRequest : public NavigationURLLoaderDelegate { |
NavigationURLLoader* loader_for_testing() const { return loader_.get(); } |
+ NavigationState state() const { return state_; } |
+ |
+ void SetWaitingForRendererResponse() { |
nasko
2014/12/16 01:40:26
Do we not expect to have other states being set ex
clamy
2014/12/16 19:19:05
No the other states are set because of the interac
nasko
2014/12/17 00:55:02
Acknowledged.
|
+ state_ = WAITING_FOR_RENDERER_RESPONSE; |
+ } |
+ |
private: |
// NavigationURLLoaderDelegate implementation. |
void OnRequestRedirected( |
@@ -64,6 +78,8 @@ class CONTENT_EXPORT NavigationRequest : public NavigationURLLoaderDelegate { |
CommonNavigationParams common_params_; |
const CommitNavigationParams commit_params_; |
+ NavigationState state_; |
+ |
scoped_ptr<NavigationURLLoader> loader_; |
DISALLOW_COPY_AND_ASSIGN(NavigationRequest); |