nsIGroupedSHistory.idl 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #include "nsISupports.idl"
  6. interface nsIFrameLoader;
  7. interface nsIPartialSHistory;
  8. /**
  9. * nsIGroupedSHistory represent a combined session history across multiple
  10. * root docshells (usually browser tabs). The participating nsISHistory can
  11. * either be in chrome process or in content process, but nsIGroupedSHistory
  12. * itself lives in chrome process. The communication is proxyed through
  13. * nsIPartialSHistory.
  14. */
  15. [scriptable, builtinclass, uuid(813e498d-73a8-449a-be09-6187e62c5352)]
  16. interface nsIGroupedSHistory : nsISupports
  17. {
  18. // The total number of entries of all its partial session histories.
  19. [infallible] readonly attribute unsigned long count;
  20. /**
  21. * Remove all partial histories after currently active one (if any) and then
  22. * append the given partial session history to the end of the list.
  23. */
  24. void appendPartialSessionHistory(in nsIPartialSHistory aPartialHistory);
  25. /**
  26. * Notify the grouped session history that the active partial session history
  27. * has been modified. All partial session histories after the active one
  28. * will be removed and destroy.
  29. */
  30. void onPartialSessionHistoryChange(in nsIPartialSHistory aPartialHistory);
  31. /**
  32. * Find the proper partial session history and navigate to the entry
  33. * corresponding to the given global index. Note it doesn't swap frameloaders,
  34. * but rather return the target loader for the caller to swap.
  35. *
  36. * @param aGlobalIndex The global index to navigate to.
  37. * @param aTargetLoaderToSwap The owner frameloader of the to-be-navigate
  38. * partial session history.
  39. */
  40. void gotoIndex(in unsigned long aGlobalIndex, out nsIFrameLoader aTargetLoaderToSwap);
  41. };