PrincipalChangeObserver.h 885 B

123456789101112131415161718192021222324252627282930
  1. /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  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. #ifndef MOZILLA_PRINCIPALCHANGEOBSERVER_H_
  6. #define MOZILLA_PRINCIPALCHANGEOBSERVER_H_
  7. namespace mozilla {
  8. namespace dom {
  9. /**
  10. * A PrincipalChangeObserver for any type, but originating from DOMMediaStream,
  11. * then expanded to MediaStreamTrack.
  12. *
  13. * Used to learn about dynamic changes to an object's principal.
  14. * Operations relating to these observers must be confined to the main thread.
  15. */
  16. template<typename T>
  17. class PrincipalChangeObserver
  18. {
  19. public:
  20. virtual void PrincipalChanged(T* aArg) = 0;
  21. };
  22. } // namespace dom
  23. } // namespace mozilla
  24. #endif /* MOZILLA_PRINCIPALCHANGEOBSERVER_H_ */