#ifndef UI_VIEWS_DEBUG_DEBUGGER_UTILS_H_
#define UI_VIEWS_DEBUG_DEBUGGER_UTILS_H_
#include <ostream>
#include <string>
#include <tuple>
#include <vector>
#include "base/functional/callback.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
namespace views::debug {
class ViewDebugWrapper {
public:
using BoundsTuple = std::tuple<int, int, int, int>;
using PropCallback =
base::RepeatingCallback<void(const std::string&, const std::string&)>;
ViewDebugWrapper() = default;
virtual ~ViewDebugWrapper() = default;
virtual std::string GetViewClassName() = 0;
virtual int GetID() = 0;
virtual BoundsTuple GetBounds() = 0;
virtual bool GetVisible() = 0;
virtual bool GetNeedsLayout() = 0;
virtual bool GetEnabled() = 0;
virtual std::vector<ViewDebugWrapper*> GetChildren() = 0;
virtual void ForAllProperties(PropCallback callback) {}
virtual absl::optional<intptr_t> GetAddress();
};
void PrintViewHierarchy(std::ostream* out,
ViewDebugWrapper* view,
bool verbose = false,
int depth = -1,
size_t column_limit = 240);
}
#endif