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 |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 class NavigationEntry; | 24 class NavigationEntry; |
25 class SessionStorageNamespace; | 25 class SessionStorageNamespace; |
26 class SiteInstance; | 26 class SiteInstance; |
27 class TabContents; | 27 class TabContents; |
28 struct ViewHostMsg_FrameNavigate_Params; | 28 struct ViewHostMsg_FrameNavigate_Params; |
29 | 29 |
30 namespace content { | 30 namespace content { |
31 class BrowserContext; | 31 class BrowserContext; |
32 struct LoadCommittedDetails; | 32 struct LoadCommittedDetails; |
| 33 struct Referrer; |
33 } | 34 } |
34 | 35 |
35 // A NavigationController maintains the back-forward list for a single tab and | 36 // A NavigationController maintains the back-forward list for a single tab and |
36 // manages all navigation within that list. | 37 // manages all navigation within that list. |
37 // | 38 // |
38 // The NavigationController also owns all TabContents for the tab. This is to | 39 // The NavigationController also owns all TabContents for the tab. This is to |
39 // make sure that we have at most one TabContents instance per type. | 40 // make sure that we have at most one TabContents instance per type. |
40 class CONTENT_EXPORT NavigationController { | 41 class CONTENT_EXPORT NavigationController { |
41 public: | 42 public: |
42 | 43 |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 void ContinuePendingReload(); | 346 void ContinuePendingReload(); |
346 | 347 |
347 // Returns true if we are navigating to the URL the tab is opened with. | 348 // Returns true if we are navigating to the URL the tab is opened with. |
348 bool IsInitialNavigation(); | 349 bool IsInitialNavigation(); |
349 | 350 |
350 // Creates navigation entry and translates the virtual url to a real one. | 351 // Creates navigation entry and translates the virtual url to a real one. |
351 // Used when navigating to a new URL using LoadURL. Extra headers are | 352 // Used when navigating to a new URL using LoadURL. Extra headers are |
352 // separated by \n. | 353 // separated by \n. |
353 static NavigationEntry* CreateNavigationEntry( | 354 static NavigationEntry* CreateNavigationEntry( |
354 const GURL& url, | 355 const GURL& url, |
355 const GURL& referrer, | 356 const content::Referrer& referrer, |
356 content::PageTransition transition, | 357 content::PageTransition transition, |
357 bool is_renderer_initiated, | 358 bool is_renderer_initiated, |
358 const std::string& extra_headers, | 359 const std::string& extra_headers, |
359 content::BrowserContext* browser_context); | 360 content::BrowserContext* browser_context); |
360 | 361 |
361 private: | 362 private: |
362 class RestoreHelper; | 363 class RestoreHelper; |
363 friend class RestoreHelper; | 364 friend class RestoreHelper; |
364 friend class TabContents; // For invoking OnReservedPageIDRange. | 365 friend class TabContents; // For invoking OnReservedPageIDRange. |
365 | 366 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 static size_t max_entry_count_; | 504 static size_t max_entry_count_; |
504 | 505 |
505 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), | 506 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), |
506 // NO_RELOAD otherwise. | 507 // NO_RELOAD otherwise. |
507 ReloadType pending_reload_; | 508 ReloadType pending_reload_; |
508 | 509 |
509 DISALLOW_COPY_AND_ASSIGN(NavigationController); | 510 DISALLOW_COPY_AND_ASSIGN(NavigationController); |
510 }; | 511 }; |
511 | 512 |
512 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ | 513 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ |
OLD | NEW |