debug_utils.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef ASH_PUBLIC_CPP_DEBUG_UTILS_H_
  5. #define ASH_PUBLIC_CPP_DEBUG_UTILS_H_
  6. #include <sstream>
  7. #include <string>
  8. #include <vector>
  9. #include "ash/ash_export.h"
  10. namespace ash {
  11. namespace debug {
  12. // Prints all windows layer hierarchy to |out|.
  13. ASH_EXPORT void PrintLayerHierarchy(std::ostringstream* out);
  14. // Prints current active window's view hierarchy to |out|.
  15. ASH_EXPORT void PrintViewHierarchy(std::ostringstream* out);
  16. // Prints all windows hierarchy to |out|. If |scrub_data| is true, we
  17. // may skip some data fields that are not very important for debugging. Returns
  18. // a list of window titles. Window titles will be removed from |out| if
  19. // |scrub_data| is true.
  20. ASH_EXPORT std::vector<std::string> PrintWindowHierarchy(
  21. std::ostringstream* out,
  22. bool scrub_data);
  23. } // namespace debug
  24. } // namespace ash
  25. #endif // ASH_PUBLIC_CPP_DEBUG_UTILS_H_