OLD | NEW |
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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "content/browser/frame_host/navigation_entry_impl.h" | 12 #include "content/browser/frame_host/navigation_entry_impl.h" |
13 #include "content/browser/loader/navigation_url_loader_delegate.h" | 13 #include "content/browser/loader/navigation_url_loader_delegate.h" |
14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
15 #include "content/common/frame_message_enums.h" | 15 #include "content/common/frame_message_enums.h" |
16 #include "content/common/navigation_params.h" | 16 #include "content/common/navigation_params.h" |
17 #include "content/public/browser/navigation_throttle.h" | 17 #include "content/public/browser/navigation_throttle.h" |
| 18 #include "content/public/common/previews_state.h" |
18 | 19 |
19 namespace content { | 20 namespace content { |
20 | 21 |
21 class FrameNavigationEntry; | 22 class FrameNavigationEntry; |
22 class FrameTreeNode; | 23 class FrameTreeNode; |
23 class NavigationControllerImpl; | 24 class NavigationControllerImpl; |
24 class NavigationHandleImpl; | 25 class NavigationHandleImpl; |
25 class NavigationURLLoader; | 26 class NavigationURLLoader; |
26 class NavigationData; | 27 class NavigationData; |
27 class ResourceRequestBody; | 28 class ResourceRequestBody; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 }; | 70 }; |
70 | 71 |
71 // Creates a request for a browser-intiated navigation. | 72 // Creates a request for a browser-intiated navigation. |
72 static std::unique_ptr<NavigationRequest> CreateBrowserInitiated( | 73 static std::unique_ptr<NavigationRequest> CreateBrowserInitiated( |
73 FrameTreeNode* frame_tree_node, | 74 FrameTreeNode* frame_tree_node, |
74 const GURL& dest_url, | 75 const GURL& dest_url, |
75 const Referrer& dest_referrer, | 76 const Referrer& dest_referrer, |
76 const FrameNavigationEntry& frame_entry, | 77 const FrameNavigationEntry& frame_entry, |
77 const NavigationEntryImpl& entry, | 78 const NavigationEntryImpl& entry, |
78 FrameMsg_Navigate_Type::Value navigation_type, | 79 FrameMsg_Navigate_Type::Value navigation_type, |
79 LoFiState lofi_state, | 80 PreviewsState previews_state, |
80 bool is_same_document_history_load, | 81 bool is_same_document_history_load, |
81 bool is_history_navigation_in_new_child, | 82 bool is_history_navigation_in_new_child, |
82 const base::TimeTicks& navigation_start, | 83 const base::TimeTicks& navigation_start, |
83 NavigationControllerImpl* controller); | 84 NavigationControllerImpl* controller); |
84 | 85 |
85 // Creates a request for a renderer-intiated navigation. | 86 // Creates a request for a renderer-intiated navigation. |
86 // Note: |body| is sent to the IO thread when calling BeginNavigation, and | 87 // Note: |body| is sent to the IO thread when calling BeginNavigation, and |
87 // should no longer be manipulated afterwards on the UI thread. | 88 // should no longer be manipulated afterwards on the UI thread. |
88 // TODO(clamy): see if ResourceRequestBody could be un-refcounted to avoid | 89 // TODO(clamy): see if ResourceRequestBody could be un-refcounted to avoid |
89 // threading subtleties. | 90 // threading subtleties. |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 // the WillProcessResponse checks are performed by the NavigationHandle. | 230 // the WillProcessResponse checks are performed by the NavigationHandle. |
230 scoped_refptr<ResourceResponse> response_; | 231 scoped_refptr<ResourceResponse> response_; |
231 std::unique_ptr<StreamHandle> body_; | 232 std::unique_ptr<StreamHandle> body_; |
232 | 233 |
233 DISALLOW_COPY_AND_ASSIGN(NavigationRequest); | 234 DISALLOW_COPY_AND_ASSIGN(NavigationRequest); |
234 }; | 235 }; |
235 | 236 |
236 } // namespace content | 237 } // namespace content |
237 | 238 |
238 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ | 239 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ |
OLD | NEW |