| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 struct Referrer; | 25 struct Referrer; |
| 26 | 26 |
| 27 // A NavigationController maintains the back-forward list for a WebContents and | 27 // A NavigationController maintains the back-forward list for a WebContents and |
| 28 // manages all navigation within that list. | 28 // manages all navigation within that list. |
| 29 // | 29 // |
| 30 // Each NavigationController belongs to one WebContents; each WebContents has | 30 // Each NavigationController belongs to one WebContents; each WebContents has |
| 31 // exactly one NavigationController. | 31 // exactly one NavigationController. |
| 32 class NavigationController { | 32 class NavigationController { |
| 33 public: | 33 public: |
| 34 enum ReloadType { | 34 enum ReloadType { |
| 35 NO_RELOAD, // Normal load. | 35 NO_RELOAD, // Normal load. |
| 36 RELOAD, // Normal (cache-validating) reload. | 36 RELOAD, // Normal (cache-validating) reload. |
| 37 RELOAD_IGNORING_CACHE // Reload bypassing the cache, aka shift-reload. | 37 RELOAD_IGNORING_CACHE, // Reload bypassing the cache (shift-reload). |
| 38 RELOAD_ORIGINAL_REQUEST_URL // Reload using the original request URL. |
| 38 }; | 39 }; |
| 39 | 40 |
| 40 // Creates a navigation entry and translates the virtual url to a real one. | 41 // Creates a navigation entry and translates the virtual url to a real one. |
| 41 // This is a general call; prefer LoadURL[FromRenderer]/TransferURL below. | 42 // This is a general call; prefer LoadURL[FromRenderer]/TransferURL below. |
| 42 // Extra headers are separated by \n. | 43 // Extra headers are separated by \n. |
| 43 CONTENT_EXPORT static NavigationEntry* CreateNavigationEntry( | 44 CONTENT_EXPORT static NavigationEntry* CreateNavigationEntry( |
| 44 const GURL& url, | 45 const GURL& url, |
| 45 const Referrer& referrer, | 46 const Referrer& referrer, |
| 46 PageTransition transition, | 47 PageTransition transition, |
| 47 bool is_renderer_initiated, | 48 bool is_renderer_initiated, |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 virtual void CopyStateFromAndPrune(NavigationController* source) = 0; | 272 virtual void CopyStateFromAndPrune(NavigationController* source) = 0; |
| 272 | 273 |
| 273 // Removes all the entries except the active entry. If there is a new pending | 274 // Removes all the entries except the active entry. If there is a new pending |
| 274 // navigation it is preserved. | 275 // navigation it is preserved. |
| 275 virtual void PruneAllButActive() = 0; | 276 virtual void PruneAllButActive() = 0; |
| 276 }; | 277 }; |
| 277 | 278 |
| 278 } // namespace content | 279 } // namespace content |
| 279 | 280 |
| 280 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ | 281 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ |
| OLD | NEW |