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

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

Issue 475783002: PlzNavigate: add cancel navigation logic for uncommitted requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added tests for the navigation request ID Created 6 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_NAVIGATION_REQUEST_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "content/browser/frame_host/navigation_request_info.h" 10 #include "content/browser/frame_host/navigation_request_info.h"
(...skipping 13 matching lines...) Expand all
24 ~NavigationRequest(); 24 ~NavigationRequest();
25 25
26 const NavigationRequestInfo& info_for_testing() const { return info_; } 26 const NavigationRequestInfo& info_for_testing() const { return info_; }
27 int64 frame_node_id() const { return frame_node_id_; } 27 int64 frame_node_id() const { return frame_node_id_; }
28 28
29 // Called on the UI thread by the RenderFrameHostManager which owns the 29 // Called on the UI thread by the RenderFrameHostManager which owns the
30 // NavigationRequest. After calling this function, |body| can no longer be 30 // NavigationRequest. After calling this function, |body| can no longer be
31 // manipulated on the UI thread. 31 // manipulated on the UI thread.
32 void BeginNavigation(scoped_refptr<ResourceRequestBody> body); 32 void BeginNavigation(scoped_refptr<ResourceRequestBody> body);
33 33
34 int64 navigation_request_id() const { return navigation_request_id_; }
35
34 private: 36 private:
37 // The next available browser-global navigation request ID.
38 static int64 next_navigation_request_id_;
39
40 const int64 navigation_request_id_;
35 const NavigationRequestInfo info_; 41 const NavigationRequestInfo info_;
36 const int64 frame_node_id_; 42 const int64 frame_node_id_;
37 43
38 DISALLOW_COPY_AND_ASSIGN(NavigationRequest); 44 DISALLOW_COPY_AND_ASSIGN(NavigationRequest);
39 }; 45 };
40 46
41 } // namespace content 47 } // namespace content
42 48
43 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ 49 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698