| 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_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ |
| 6 #define CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 virtual NavigationEntry* GetLastCommittedEntry() const OVERRIDE; | 48 virtual NavigationEntry* GetLastCommittedEntry() const OVERRIDE; |
| 49 virtual int GetLastCommittedEntryIndex() const OVERRIDE; | 49 virtual int GetLastCommittedEntryIndex() const OVERRIDE; |
| 50 virtual bool CanViewSource() const OVERRIDE; | 50 virtual bool CanViewSource() const OVERRIDE; |
| 51 virtual int GetEntryCount() const OVERRIDE; | 51 virtual int GetEntryCount() const OVERRIDE; |
| 52 virtual NavigationEntry* GetEntryAtIndex(int index) const OVERRIDE; | 52 virtual NavigationEntry* GetEntryAtIndex(int index) const OVERRIDE; |
| 53 virtual NavigationEntry* GetEntryAtOffset(int offset) const OVERRIDE; | 53 virtual NavigationEntry* GetEntryAtOffset(int offset) const OVERRIDE; |
| 54 virtual void DiscardNonCommittedEntries() OVERRIDE; | 54 virtual void DiscardNonCommittedEntries() OVERRIDE; |
| 55 virtual NavigationEntry* GetPendingEntry() const OVERRIDE; | 55 virtual NavigationEntry* GetPendingEntry() const OVERRIDE; |
| 56 virtual int GetPendingEntryIndex() const OVERRIDE; | 56 virtual int GetPendingEntryIndex() const OVERRIDE; |
| 57 virtual NavigationEntry* GetTransientEntry() const OVERRIDE; | 57 virtual NavigationEntry* GetTransientEntry() const OVERRIDE; |
| 58 virtual void AddTransientEntry(NavigationEntry* entry) OVERRIDE; |
| 58 virtual void LoadURL(const GURL& url, | 59 virtual void LoadURL(const GURL& url, |
| 59 const Referrer& referrer, | 60 const Referrer& referrer, |
| 60 PageTransition type, | 61 PageTransition type, |
| 61 const std::string& extra_headers) OVERRIDE; | 62 const std::string& extra_headers) OVERRIDE; |
| 62 virtual void LoadURLWithParams(const LoadURLParams& params) OVERRIDE; | 63 virtual void LoadURLWithParams(const LoadURLParams& params) OVERRIDE; |
| 63 virtual void LoadIfNecessary() OVERRIDE; | 64 virtual void LoadIfNecessary() OVERRIDE; |
| 64 virtual bool CanGoBack() const OVERRIDE; | 65 virtual bool CanGoBack() const OVERRIDE; |
| 65 virtual bool CanGoForward() const OVERRIDE; | 66 virtual bool CanGoForward() const OVERRIDE; |
| 66 virtual bool CanGoToOffset(int offset) const OVERRIDE; | 67 virtual bool CanGoToOffset(int offset) const OVERRIDE; |
| 67 virtual void GoBack() OVERRIDE; | 68 virtual void GoBack() OVERRIDE; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // or -1 if not found. | 105 // or -1 if not found. |
| 105 int GetEntryIndexWithPageID(SiteInstance* instance, | 106 int GetEntryIndexWithPageID(SiteInstance* instance, |
| 106 int32 page_id) const; | 107 int32 page_id) const; |
| 107 | 108 |
| 108 // Return the entry with the corresponding instance and page_id, or NULL if | 109 // Return the entry with the corresponding instance and page_id, or NULL if |
| 109 // not found. | 110 // not found. |
| 110 NavigationEntryImpl* GetEntryWithPageID( | 111 NavigationEntryImpl* GetEntryWithPageID( |
| 111 SiteInstance* instance, | 112 SiteInstance* instance, |
| 112 int32 page_id) const; | 113 int32 page_id) const; |
| 113 | 114 |
| 114 // Transient entry ----------------------------------------------------------- | |
| 115 | |
| 116 // Adds an entry that is returned by GetActiveEntry(). The entry is | |
| 117 // transient: any navigation causes it to be removed and discarded. | |
| 118 // The NavigationController becomes the owner of |entry| and deletes it when | |
| 119 // it discards it. This is useful with interstitial page that need to be | |
| 120 // represented as an entry, but should go away when the user navigates away | |
| 121 // from them. | |
| 122 // Note that adding a transient entry does not change the active contents. | |
| 123 void AddTransientEntry(NavigationEntryImpl* entry); | |
| 124 | |
| 125 // WebContentsImpl ----------------------------------------------------------- | 115 // WebContentsImpl ----------------------------------------------------------- |
| 126 | 116 |
| 127 WebContentsImpl* web_contents() const { | 117 WebContentsImpl* web_contents() const { |
| 128 return web_contents_; | 118 return web_contents_; |
| 129 } | 119 } |
| 130 | 120 |
| 131 // Called when a document has been loaded in a frame. | 121 // Called when a document has been loaded in a frame. |
| 132 void DocumentLoadedInFrame(); | 122 void DocumentLoadedInFrame(); |
| 133 | 123 |
| 134 // For use by WebContentsImpl ------------------------------------------------ | 124 // For use by WebContentsImpl ------------------------------------------------ |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 // the timer resolution, leading to things sometimes showing up in | 412 // the timer resolution, leading to things sometimes showing up in |
| 423 // the wrong order in the history view. | 413 // the wrong order in the history view. |
| 424 TimeSmoother time_smoother_; | 414 TimeSmoother time_smoother_; |
| 425 | 415 |
| 426 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); | 416 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); |
| 427 }; | 417 }; |
| 428 | 418 |
| 429 } // namespace content | 419 } // namespace content |
| 430 | 420 |
| 431 #endif // CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ | 421 #endif // CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ |
| OLD | NEW |