#include "third_party/blink/renderer/core/html/lazy_load_frame_observer.h"
#include <limits>
#include "base/trace_event/trace_event.h"
#include "third_party/blink/public/platform/web_effective_connection_type.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/node_computed_style.h"
#include "third_party/blink/renderer/core/frame/frame.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/local_frame_client.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/html/html_frame_owner_element.h"
#include "third_party/blink/renderer/core/html/loading_attribute.h"
#include "third_party/blink/renderer/core/intersection_observer/intersection_observer.h"
#include "third_party/blink/renderer/core/intersection_observer/intersection_observer_entry.h"
#include "third_party/blink/renderer/core/loader/frame_load_request.h"
#include "third_party/blink/renderer/core/loader/frame_loader.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
#include "third_party/blink/renderer/platform/geometry/length.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_request.h"
#include "third_party/blink/renderer/platform/network/network_state_notifier.h"
#include "third_party/blink/renderer/platform/weborigin/security_origin.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
namespace blink {
namespace {
bool IsFrameProbablyHidden(const gfx::RectF& bounding_client_rect,
const Element& element) { … }
int GetLazyLoadingFrameMarginPx(const Document& document) { … }
}
struct LazyLoadFrameObserver::LazyLoadRequestInfo { … };
LazyLoadFrameObserver::LazyLoadFrameObserver(HTMLFrameOwnerElement& element,
LoadType load_type)
: … { … }
LazyLoadFrameObserver::~LazyLoadFrameObserver() = default;
void LazyLoadFrameObserver::DeferLoadUntilNearViewport(
const ResourceRequestHead& resource_request,
WebFrameLoadType frame_load_type) { … }
void LazyLoadFrameObserver::CancelPendingLazyLoad() { … }
void LazyLoadFrameObserver::LoadIfHiddenOrNearViewport(
const HeapVector<Member<IntersectionObserverEntry>>& entries) { … }
void LazyLoadFrameObserver::LoadImmediately() { … }
void LazyLoadFrameObserver::Trace(Visitor* visitor) const { … }
}