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