| 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" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 // The response started on the IO thread and is ready to be committed. This | 48 // The response started on the IO thread and is ready to be committed. This |
| 49 // is one of the two final states for the request. | 49 // is one of the two final states for the request. |
| 50 RESPONSE_STARTED, | 50 RESPONSE_STARTED, |
| 51 | 51 |
| 52 // The request failed on the IO thread and an error page should be | 52 // The request failed on the IO thread and an error page should be |
| 53 // displayed. This is one of the two final states for the request. | 53 // displayed. This is one of the two final states for the request. |
| 54 FAILED, | 54 FAILED, |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 // Helper function to determine if the navigation request to |url| should be | |
| 58 // sent to the network stack. It will not be sent for data URLs or JavaScript | |
| 59 // URLs, cases where no network request needs to be made. | |
| 60 static bool ShouldMakeNetworkRequest(const GURL& url); | |
| 61 | |
| 62 // Creates a request for a browser-intiated navigation. | 57 // Creates a request for a browser-intiated navigation. |
| 63 static scoped_ptr<NavigationRequest> CreateBrowserInitiated( | 58 static scoped_ptr<NavigationRequest> CreateBrowserInitiated( |
| 64 FrameTreeNode* frame_tree_node, | 59 FrameTreeNode* frame_tree_node, |
| 65 const FrameNavigationEntry& frame_entry, | 60 const FrameNavigationEntry& frame_entry, |
| 66 const NavigationEntryImpl& entry, | 61 const NavigationEntryImpl& entry, |
| 67 FrameMsg_Navigate_Type::Value navigation_type, | 62 FrameMsg_Navigate_Type::Value navigation_type, |
| 68 bool is_same_document_history_load, | 63 bool is_same_document_history_load, |
| 69 base::TimeTicks navigation_start, | 64 base::TimeTicks navigation_start, |
| 70 NavigationControllerImpl* controller); | 65 NavigationControllerImpl* controller); |
| 71 | 66 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 NavigationEntryImpl::RestoreType restore_type_; | 166 NavigationEntryImpl::RestoreType restore_type_; |
| 172 bool is_view_source_; | 167 bool is_view_source_; |
| 173 int bindings_; | 168 int bindings_; |
| 174 | 169 |
| 175 DISALLOW_COPY_AND_ASSIGN(NavigationRequest); | 170 DISALLOW_COPY_AND_ASSIGN(NavigationRequest); |
| 176 }; | 171 }; |
| 177 | 172 |
| 178 } // namespace content | 173 } // namespace content |
| 179 | 174 |
| 180 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ | 175 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_ |
| OLD | NEW |