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

Side by Side Diff: content/public/browser/navigation_controller.h

Issue 49003011: Handle should_replace_current_entry in prerender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content::kAboutBlankURL Created 7 years 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 // one should be empty (just created). 401 // one should be empty (just created).
402 virtual void CopyStateFrom(const NavigationController& source) = 0; 402 virtual void CopyStateFrom(const NavigationController& source) = 0;
403 403
404 // A variant of CopyStateFrom. Removes all entries from this except the last 404 // A variant of CopyStateFrom. Removes all entries from this except the last
405 // committed entry, and inserts all entries from |source| before and including 405 // committed entry, and inserts all entries from |source| before and including
406 // its last committed entry. For example: 406 // its last committed entry. For example:
407 // source: A B *C* D 407 // source: A B *C* D
408 // this: E F *G* 408 // this: E F *G*
409 // result: A B C *G* 409 // result: A B C *G*
410 // If there is a pending entry after *G* in |this|, it is also preserved. 410 // If there is a pending entry after *G* in |this|, it is also preserved.
411 // If |replace_entry| is true, the current entry in |source| is replaced. So
412 // the result above would be A B *G*.
411 // This ignores any pending or transient entries in |source|. Callers must 413 // This ignores any pending or transient entries in |source|. Callers must
412 // ensure that |CanPruneAllButLastCommitted| returns true before calling this, 414 // ensure that |CanPruneAllButLastCommitted| returns true before calling this,
413 // or it will crash. 415 // or it will crash.
414 virtual void CopyStateFromAndPrune(NavigationController* source) = 0; 416 virtual void CopyStateFromAndPrune(NavigationController* source,
417 bool replace_entry) = 0;
415 418
416 // Returns whether it is safe to call PruneAllButLastCommitted or 419 // Returns whether it is safe to call PruneAllButLastCommitted or
417 // CopyStateFromAndPrune. There must be a last committed entry, no transient 420 // CopyStateFromAndPrune. There must be a last committed entry, no transient
418 // entry, and if there is a pending entry, it must be new and not an existing 421 // entry, and if there is a pending entry, it must be new and not an existing
419 // entry. 422 // entry.
420 // 423 //
421 // If there were no last committed entry, the pending entry might not commit, 424 // If there were no last committed entry, the pending entry might not commit,
422 // leaving us with a blank page. This is unsafe when used with 425 // leaving us with a blank page. This is unsafe when used with
423 // |CopyStateFromAndPrune|, which would show an existing entry above the blank 426 // |CopyStateFromAndPrune|, which would show an existing entry above the blank
424 // page. 427 // page.
(...skipping 18 matching lines...) Expand all
443 446
444 private: 447 private:
445 // This interface should only be implemented inside content. 448 // This interface should only be implemented inside content.
446 friend class NavigationControllerImpl; 449 friend class NavigationControllerImpl;
447 NavigationController() {} 450 NavigationController() {}
448 }; 451 };
449 452
450 } // namespace content 453 } // namespace content
451 454
452 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ 455 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698