Implement SSLKEYLOGFILE for OpenSSL.
[chromium-blink-merge.git] / content / browser / frame_host / navigation_request.h
blob44bbc309ba99e09e2eae6b87a2cf6d25639091cd
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_
8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10 #include "content/browser/frame_host/navigation_request_info.h"
11 #include "content/common/content_export.h"
13 namespace content {
14 class ResourceRequestBody;
16 // PlzNavigate
17 // A UI thread object that owns a navigation request until it commits. It
18 // ensures the UI thread can start a navigation request in the
19 // ResourceDispatcherHost (that lives on the IO thread).
20 // TODO(clamy): Describe the interactions between the UI and IO thread during
21 // the navigation following its refactoring.
22 class NavigationRequest {
23 public:
24 NavigationRequest(const NavigationRequestInfo& info,
25 int64 frame_tree_node_id);
27 ~NavigationRequest();
29 // Called on the UI thread by the RenderFrameHostManager which owns the
30 // NavigationRequest. After calling this function, |body| can no longer be
31 // manipulated on the UI thread.
32 void BeginNavigation(scoped_refptr<ResourceRequestBody> body);
34 // Called on the UI thread by the RenderFrameHostManager which owns the
35 // NavigationRequest whenever this navigation request should be canceled.
36 void CancelNavigation();
38 const NavigationRequestInfo& info() const { return info_; }
40 int64 frame_tree_node_id() const { return frame_tree_node_id_; }
42 int64 navigation_request_id() const { return navigation_request_id_; }
44 private:
45 const int64 navigation_request_id_;
46 const NavigationRequestInfo info_;
47 const int64 frame_tree_node_id_;
49 DISALLOW_COPY_AND_ASSIGN(NavigationRequest);
52 } // namespace content
54 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_