// Copyright 2019 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_CORE_PAGE_SCROLLING_FRAGMENT_ANCHOR_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_SCROLLING_FRAGMENT_ANCHOR_H_ #include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/scroll/scroll_types.h" #include "third_party/blink/renderer/platform/heap/garbage_collected.h" #include "third_party/blink/renderer/platform/heap/member.h" namespace blink { class Element; class KURL; class LocalFrame; class ScrollIntoViewOptions; // This class is an interface for the concept of a "fragment anchor". A // fragment anchor allows a page to link to a specific part of a page by using // the URL fragment. The fragment is the part after the '#' character. E.g. // navigating to www.example.com/index.html#section3 will find the element with // id "section3" and focus and scroll it into view. // // This class provides an interface that different types of fragment anchors // can implement, allowing fragments to specify different kinds of anchors. // Callers should use the TryCreate static method to create and return the // appropriate type of base class. class CORE_EXPORT FragmentAnchor : public GarbageCollected<FragmentAnchor> { … }; } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_SCROLLING_FRAGMENT_ANCHOR_H_