chromium/third_party/blink/renderer/modules/accessibility/ax_object_cache_lifecycle.h

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_ACCESSIBILITY_AX_OBJECT_CACHE_LIFECYCLE_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_ACCESSIBILITY_AX_OBJECT_CACHE_LIFECYCLE_H_

#include "base/check_op.h"
#include "base/dcheck_is_on.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"

namespace WTF {
class String;
}  // namespace WTF

namespace blink {

// AXObjectCacheLifecycle describes which step of the a11y tree update algorithm
// is currently running. It borrows concepts from DocumentLifecycle. Benefits:
// - Ensure that code paths do not attempt to access data, such as layout or
//   style, when it is unsafe to do so or when the data would not be correct.
// - Ensure completeness of generated data, such as the tree structure and
//   cached properties, as appropriate for the given stage.

class AXObjectCacheLifecycle {};

inline bool AXObjectCacheLifecycle::StateAllowsDeferTreeUpdates() const {}

inline bool AXObjectCacheLifecycle::StateAllowsImmediateTreeUpdates() const {}

inline bool AXObjectCacheLifecycle::StateAllowsRemovingAXObjects() const {}

inline bool AXObjectCacheLifecycle::StateAllowsReparentingAXObjects() const {}

inline bool AXObjectCacheLifecycle::StateAllowsSerialization() const {}

inline bool AXObjectCacheLifecycle::StateAllowsAXObjectsToBeDirtied() const {}

inline bool
AXObjectCacheLifecycle::StateAllowsAXObjectsToGainFinalizationNeededBit()
    const {}

inline bool AXObjectCacheLifecycle::StateAllowsQueueingEventsForSerialization()
    const {}

inline bool
AXObjectCacheLifecycle::StateAllowsQueueingAXObjectsForSerialization() const {}

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_MODULES_ACCESSIBILITY_AX_OBJECT_CACHE_LIFECYCLE_H_