| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ |
| 6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/memory/linked_ptr.h" | 14 #include "base/memory/linked_ptr.h" |
| 15 #include "base/time.h" | 15 #include "base/time.h" |
| 16 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
| 17 #include "content/browser/renderer_host/global_request_id.h" | 17 #include "content/browser/renderer_host/global_request_id.h" |
| 18 #include "content/browser/ssl/ssl_manager.h" | 18 #include "content/browser/ssl/ssl_manager.h" |
| 19 #include "content/common/content_export.h" | 19 #include "content/common/content_export.h" |
| 20 #include "content/public/browser/navigation_type.h" | 20 #include "content/public/browser/navigation_type.h" |
| 21 #include "content/public/common/page_transition_types.h" | 21 #include "content/public/common/page_transition_types.h" |
| 22 #include "content/public/common/referrer.h" |
| 22 | 23 |
| 23 class NavigationEntry; | 24 class NavigationEntry; |
| 24 class SessionStorageNamespace; | 25 class SessionStorageNamespace; |
| 25 class SiteInstance; | 26 class SiteInstance; |
| 26 class TabContents; | 27 class TabContents; |
| 27 struct ViewHostMsg_FrameNavigate_Params; | 28 struct ViewHostMsg_FrameNavigate_Params; |
| 28 | 29 |
| 29 namespace content { | 30 namespace content { |
| 30 class BrowserContext; | 31 class BrowserContext; |
| 31 struct LoadCommittedDetails; | 32 struct LoadCommittedDetails; |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 | 171 |
| 171 // Returns the transient entry if any. Note that the returned entry is owned | 172 // Returns the transient entry if any. Note that the returned entry is owned |
| 172 // by the navigation controller and may be deleted at any time. | 173 // by the navigation controller and may be deleted at any time. |
| 173 NavigationEntry* GetTransientEntry() const; | 174 NavigationEntry* GetTransientEntry() const; |
| 174 | 175 |
| 175 // New navigations ----------------------------------------------------------- | 176 // New navigations ----------------------------------------------------------- |
| 176 | 177 |
| 177 // Loads the specified URL, specifying extra http headers to add to the | 178 // Loads the specified URL, specifying extra http headers to add to the |
| 178 // request. Extra headers are separated by \n. | 179 // request. Extra headers are separated by \n. |
| 179 void LoadURL(const GURL& url, | 180 void LoadURL(const GURL& url, |
| 180 const GURL& referrer, | 181 const content::Referrer& referrer, |
| 181 content::PageTransition type, | 182 content::PageTransition type, |
| 182 const std::string& extra_headers); | 183 const std::string& extra_headers); |
| 183 | 184 |
| 184 // Same as LoadURL, but for renderer-initiated navigations. This state is | 185 // Same as LoadURL, but for renderer-initiated navigations. This state is |
| 185 // important for tracking whether to display pending URLs. | 186 // important for tracking whether to display pending URLs. |
| 186 void LoadURLFromRenderer(const GURL& url, | 187 void LoadURLFromRenderer(const GURL& url, |
| 187 const GURL& referrer, | 188 const content::Referrer& referrer, |
| 188 content::PageTransition type, | 189 content::PageTransition type, |
| 189 const std::string& extra_headers); | 190 const std::string& extra_headers); |
| 190 | 191 |
| 191 // Behaves like LoadURL() and LoadURLFromRenderer() but marks the new | 192 // Behaves like LoadURL() and LoadURLFromRenderer() but marks the new |
| 192 // navigation as being transferred from one RVH to another. In this case the | 193 // navigation as being transferred from one RVH to another. In this case the |
| 193 // browser can recycle the old request once the new renderer wants to | 194 // browser can recycle the old request once the new renderer wants to |
| 194 // navigate. | 195 // navigate. |
| 195 // |transferred_global_request_id| identifies the request ID of the old | 196 // |transferred_global_request_id| identifies the request ID of the old |
| 196 // request. | 197 // request. |
| 197 void TransferURL( | 198 void TransferURL( |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 static size_t max_entry_count_; | 503 static size_t max_entry_count_; |
| 503 | 504 |
| 504 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), | 505 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), |
| 505 // NO_RELOAD otherwise. | 506 // NO_RELOAD otherwise. |
| 506 ReloadType pending_reload_; | 507 ReloadType pending_reload_; |
| 507 | 508 |
| 508 DISALLOW_COPY_AND_ASSIGN(NavigationController); | 509 DISALLOW_COPY_AND_ASSIGN(NavigationController); |
| 509 }; | 510 }; |
| 510 | 511 |
| 511 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ | 512 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ |
| OLD | NEW |