blob: 0e2eda6e83e1b6e0264704db4ede5371a304af84 [file] [log] [blame]
// Copyright 2015 The Chromium Authors. All rights reserved.
// 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_CORE_INSPECTOR_INSPECTED_FRAMES_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_INSPECTOR_INSPECTED_FRAMES_H_
#include "base/macros.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
#include "third_party/blink/renderer/platform/wtf/forward.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
namespace blink {
class LocalFrame;
class CORE_EXPORT InspectedFrames final
: public GarbageCollectedFinalized<InspectedFrames> {
public:
class CORE_EXPORT Iterator {
STACK_ALLOCATED();
public:
Iterator operator++(int);
Iterator& operator++();
bool operator==(const Iterator& other);
bool operator!=(const Iterator& other);
LocalFrame* operator*() { return current_; }
LocalFrame* operator->() { return current_; }
private:
friend class InspectedFrames;
Iterator(LocalFrame* root, LocalFrame* current);
Member<LocalFrame> root_;
Member<LocalFrame> current_;
};
explicit InspectedFrames(LocalFrame*);
LocalFrame* Root() { return root_; }
bool Contains(LocalFrame*) const;
LocalFrame* FrameWithSecurityOrigin(const String& origin_raw_string);
Iterator begin();
Iterator end();
virtual void Trace(blink::Visitor*);
private:
Member<LocalFrame> root_;
DISALLOW_COPY_AND_ASSIGN(InspectedFrames);
};
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_CORE_INSPECTOR_INSPECTED_FRAMES_H_