ShadowTreeDelegate.h 736 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #pragma once
  8. #include <react/mounting/MountingCoordinator.h>
  9. namespace facebook {
  10. namespace react {
  11. class ShadowTree;
  12. /*
  13. * Abstract class for ShadowTree's delegate.
  14. */
  15. class ShadowTreeDelegate {
  16. public:
  17. /*
  18. * Called right after Shadow Tree commit a new state of the tree.
  19. */
  20. virtual void shadowTreeDidFinishTransaction(
  21. ShadowTree const &shadowTree,
  22. MountingCoordinator::Shared const &mountingCoordinator) const = 0;
  23. virtual ~ShadowTreeDelegate() noexcept = default;
  24. };
  25. } // namespace react
  26. } // namespace facebook