| 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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "content/browser/frame_host/navigation_entry_impl.h" | 11 #include "content/browser/frame_host/navigation_entry_impl.h" |
| 12 #include "content/browser/loader/navigation_url_loader_delegate.h" | 12 #include "content/browser/loader/navigation_url_loader_delegate.h" |
| 13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 14 #include "content/common/frame_message_enums.h" | 14 #include "content/common/frame_message_enums.h" |
| 15 #include "content/common/navigation_params.h" | 15 #include "content/common/navigation_params.h" |
| 16 | 16 |
| 17 namespace content { | 17 namespace content { |
| 18 | 18 |
| 19 class FrameTreeNode; | 19 class FrameTreeNode; |
| 20 class NavigationController; |
| 20 class NavigationURLLoader; | 21 class NavigationURLLoader; |
| 21 class ResourceRequestBody; | 22 class ResourceRequestBody; |
| 22 class SiteInstanceImpl; | 23 class SiteInstanceImpl; |
| 23 struct NavigationRequestInfo; | 24 struct NavigationRequestInfo; |
| 24 | 25 |
| 25 // PlzNavigate | 26 // PlzNavigate |
| 26 // A UI thread object that owns a navigation request until it commits. It | 27 // A UI thread object that owns a navigation request until it commits. It |
| 27 // ensures the UI thread can start a navigation request in the | 28 // ensures the UI thread can start a navigation request in the |
| 28 // ResourceDispatcherHost (that lives on the IO thread). | 29 // ResourceDispatcherHost (that lives on the IO thread). |
| 29 // TODO(clamy): Describe the interactions between the UI and IO thread during | 30 // TODO(clamy): Describe the interactions between the UI and IO thread during |
| (...skipping 25 matching lines...) Expand all Loading... |
| 55 // Helper function to determine if the navigation request to |url| should be | 56 // Helper function to determine if the navigation request to |url| should be |
| 56 // sent to the network stack. | 57 // sent to the network stack. |
| 57 static bool ShouldMakeNetworkRequest(const GURL& url); | 58 static bool ShouldMakeNetworkRequest(const GURL& url); |
| 58 | 59 |
| 59 // Creates a request for a browser-intiated navigation. | 60 // Creates a request for a browser-intiated navigation. |
| 60 static scoped_ptr<NavigationRequest> CreateBrowserInitiated( | 61 static scoped_ptr<NavigationRequest> CreateBrowserInitiated( |
| 61 FrameTreeNode* frame_tree_node, | 62 FrameTreeNode* frame_tree_node, |
| 62 const NavigationEntryImpl& entry, | 63 const NavigationEntryImpl& entry, |
| 63 FrameMsg_Navigate_Type::Value navigation_type, | 64 FrameMsg_Navigate_Type::Value navigation_type, |
| 64 base::TimeTicks navigation_start, | 65 base::TimeTicks navigation_start, |
| 65 const HistoryNavigationParams& history_params); | 66 NavigationControllerImpl* controller); |
| 66 | 67 |
| 67 // Creates a request for a renderer-intiated navigation. | 68 // Creates a request for a renderer-intiated navigation. |
| 68 // Note: |body| is sent to the IO thread when calling BeginNavigation, and | 69 // Note: |body| is sent to the IO thread when calling BeginNavigation, and |
| 69 // should no longer be manipulated afterwards on the UI thread. | 70 // should no longer be manipulated afterwards on the UI thread. |
| 70 static scoped_ptr<NavigationRequest> CreateRendererInitiated( | 71 static scoped_ptr<NavigationRequest> CreateRendererInitiated( |
| 71 FrameTreeNode* frame_tree_node, | 72 FrameTreeNode* frame_tree_node, |
| 72 const CommonNavigationParams& common_params, | 73 const CommonNavigationParams& common_params, |
| 73 const BeginNavigationParams& begin_params, | 74 const BeginNavigationParams& begin_params, |
| 74 scoped_refptr<ResourceRequestBody> body, | 75 scoped_refptr<ResourceRequestBody> body, |
| 75 int current_history_list_offset, | 76 int current_history_list_offset, |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 NavigationEntryImpl::RestoreType restore_type_; | 170 NavigationEntryImpl::RestoreType restore_type_; |
| 170 bool is_view_source_; | 171 bool is_view_source_; |
| 171 int bindings_; | 172 int bindings_; |
| 172 | 173 |
| 173 DISALLOW_COPY_AND_ASSIGN(NavigationRequest); | 174 DISALLOW_COPY_AND_ASSIGN(NavigationRequest); |
| 174 }; | 175 }; |
| 175 | 176 |
| 176 } // namespace content | 177 } // namespace content |
| 177 | 178 |
| 178 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ | 179 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ |
| OLD | NEW |