nsIAboutNewTabService.idl 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. #include "nsISupports.idl"
  5. /**
  6. * Allows to override about:newtab to point to a different location
  7. * than the one specified within AboutRedirector.cpp
  8. */
  9. [scriptable, uuid(dfcd2adc-7867-4d3a-ba70-17501f208142)]
  10. interface nsIAboutNewTabService : nsISupports
  11. {
  12. /**
  13. * Returns the url of the resource for the newtab page if not overridden,
  14. * otherwise a string represenation of the new URL.
  15. */
  16. attribute ACString newTabURL;
  17. /**
  18. * Returns the default URL (local or activity stream depending on pref)
  19. */
  20. attribute ACString defaultURL;
  21. /**
  22. * Returns the about:welcome URL.
  23. */
  24. attribute ACString welcomeURL;
  25. /**
  26. * Returns true if opening the New Tab page will notify the user of a change.
  27. */
  28. attribute bool willNotifyUser;
  29. /**
  30. * Returns true if the default resource got overridden.
  31. */
  32. readonly attribute bool overridden;
  33. /**
  34. * Returns true if the default resource is activity stream and isn't
  35. * overridden
  36. */
  37. readonly attribute bool activityStreamEnabled;
  38. /**
  39. * Returns true if the the debug pref for activity stream is true
  40. */
  41. readonly attribute bool activityStreamDebug;
  42. /**
  43. * Returns the locale of the activity stream interface
  44. */
  45. readonly attribute ACString activityStreamLocale;
  46. /**
  47. * Resets to the default resource and also resets the
  48. * overridden attribute to false.
  49. */
  50. void resetNewTabURL();
  51. /**
  52. * Records a scalar metric for how long it takes to pain Top Sites, this will
  53. * only record the first timestamp, all the subsequent calls will be ignored.
  54. */
  55. void maybeRecordTopsitesPainted(in unsigned long long timestamp);
  56. };