Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Side by Side Diff: content/browser/web_contents/navigation_controller_impl.h

Issue 12001002: InstantExtended: Transient naventry for preview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 virtual NavigationEntry* GetLastCommittedEntry() const OVERRIDE; 51 virtual NavigationEntry* GetLastCommittedEntry() const OVERRIDE;
52 virtual int GetLastCommittedEntryIndex() const OVERRIDE; 52 virtual int GetLastCommittedEntryIndex() const OVERRIDE;
53 virtual bool CanViewSource() const OVERRIDE; 53 virtual bool CanViewSource() const OVERRIDE;
54 virtual int GetEntryCount() const OVERRIDE; 54 virtual int GetEntryCount() const OVERRIDE;
55 virtual NavigationEntry* GetEntryAtIndex(int index) const OVERRIDE; 55 virtual NavigationEntry* GetEntryAtIndex(int index) const OVERRIDE;
56 virtual NavigationEntry* GetEntryAtOffset(int offset) const OVERRIDE; 56 virtual NavigationEntry* GetEntryAtOffset(int offset) const OVERRIDE;
57 virtual void DiscardNonCommittedEntries() OVERRIDE; 57 virtual void DiscardNonCommittedEntries() OVERRIDE;
58 virtual NavigationEntry* GetPendingEntry() const OVERRIDE; 58 virtual NavigationEntry* GetPendingEntry() const OVERRIDE;
59 virtual int GetPendingEntryIndex() const OVERRIDE; 59 virtual int GetPendingEntryIndex() const OVERRIDE;
60 virtual NavigationEntry* GetTransientEntry() const OVERRIDE; 60 virtual NavigationEntry* GetTransientEntry() const OVERRIDE;
61 virtual void AddTransientEntry(NavigationEntry* entry) OVERRIDE;
61 virtual void LoadURL(const GURL& url, 62 virtual void LoadURL(const GURL& url,
62 const Referrer& referrer, 63 const Referrer& referrer,
63 PageTransition type, 64 PageTransition type,
64 const std::string& extra_headers) OVERRIDE; 65 const std::string& extra_headers) OVERRIDE;
65 virtual void LoadURLWithParams(const LoadURLParams& params) OVERRIDE; 66 virtual void LoadURLWithParams(const LoadURLParams& params) OVERRIDE;
66 virtual void LoadIfNecessary() OVERRIDE; 67 virtual void LoadIfNecessary() OVERRIDE;
67 virtual bool CanGoBack() const OVERRIDE; 68 virtual bool CanGoBack() const OVERRIDE;
68 virtual bool CanGoForward() const OVERRIDE; 69 virtual bool CanGoForward() const OVERRIDE;
69 virtual bool CanGoToOffset(int offset) const OVERRIDE; 70 virtual bool CanGoToOffset(int offset) const OVERRIDE;
70 virtual void GoBack() OVERRIDE; 71 virtual void GoBack() OVERRIDE;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // or -1 if not found. 107 // or -1 if not found.
107 int GetEntryIndexWithPageID(SiteInstance* instance, 108 int GetEntryIndexWithPageID(SiteInstance* instance,
108 int32 page_id) const; 109 int32 page_id) const;
109 110
110 // Return the entry with the corresponding instance and page_id, or NULL if 111 // Return the entry with the corresponding instance and page_id, or NULL if
111 // not found. 112 // not found.
112 NavigationEntryImpl* GetEntryWithPageID( 113 NavigationEntryImpl* GetEntryWithPageID(
113 SiteInstance* instance, 114 SiteInstance* instance,
114 int32 page_id) const; 115 int32 page_id) const;
115 116
116 // Transient entry -----------------------------------------------------------
117
118 // Adds an entry that is returned by GetActiveEntry(). The entry is
119 // transient: any navigation causes it to be removed and discarded.
120 // The NavigationController becomes the owner of |entry| and deletes it when
121 // it discards it. This is useful with interstitial page that need to be
122 // represented as an entry, but should go away when the user navigates away
123 // from them.
124 // Note that adding a transient entry does not change the active contents.
125 void AddTransientEntry(NavigationEntryImpl* entry);
126
127 // WebContentsImpl ----------------------------------------------------------- 117 // WebContentsImpl -----------------------------------------------------------
128 118
129 WebContentsImpl* web_contents() const { 119 WebContentsImpl* web_contents() const {
130 return web_contents_; 120 return web_contents_;
131 } 121 }
132 122
133 // Called when a document has been loaded in a frame. 123 // Called when a document has been loaded in a frame.
134 void DocumentLoadedInFrame(); 124 void DocumentLoadedInFrame();
135 125
136 // For use by WebContentsImpl ------------------------------------------------ 126 // For use by WebContentsImpl ------------------------------------------------
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 // the timer resolution, leading to things sometimes showing up in 410 // the timer resolution, leading to things sometimes showing up in
421 // the wrong order in the history view. 411 // the wrong order in the history view.
422 TimeSmoother time_smoother_; 412 TimeSmoother time_smoother_;
423 413
424 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); 414 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl);
425 }; 415 };
426 416
427 } // namespace content 417 } // namespace content
428 418
429 #endif // CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ 419 #endif // CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698