#include "third_party/blink/renderer/core/frame/history.h"
#include <optional>
#include "base/metrics/histogram_functions.h"
#include "third_party/blink/public/common/scheduler/task_attribution_id.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h"
#include "third_party/blink/renderer/bindings/core/v8/to_v8_traits.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/frame/history_util.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.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/inspector/console_message.h"
#include "third_party/blink/renderer/core/loader/document_loader.h"
#include "third_party/blink/renderer/core/loader/history_item.h"
#include "third_party/blink/renderer/core/navigation_api/navigation_api.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/core/timing/soft_navigation_heuristics.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
#include "third_party/blink/renderer/platform/bindings/v8_private_property.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/scheduler/public/task_attribution_info.h"
#include "third_party/blink/renderer/platform/scheduler/public/task_attribution_tracker.h"
#include "third_party/blink/renderer/platform/weborigin/kurl.h"
#include "third_party/blink/renderer/platform/weborigin/security_origin.h"
#include "third_party/blink/renderer/platform/wtf/text/string_view.h"
namespace blink {
History::History(LocalDOMWindow* window)
: … { … }
void History::Trace(Visitor* visitor) const { … }
unsigned History::length(ExceptionState& exception_state) const { … }
ScriptValue History::state(ScriptState* script_state,
ExceptionState& exception_state) { … }
SerializedScriptValue* History::StateInternal() const { … }
void History::setScrollRestoration(const String& value,
ExceptionState& exception_state) { … }
String History::scrollRestoration(ExceptionState& exception_state) { … }
mojom::blink::ScrollRestorationType History::ScrollRestorationInternal() const { … }
HistoryItem* History::GetHistoryItem() const { … }
bool History::IsSameAsCurrentState(SerializedScriptValue* state) const { … }
void History::back(ScriptState* script_state, ExceptionState& exception_state) { … }
void History::forward(ScriptState* script_state,
ExceptionState& exception_state) { … }
void History::go(ScriptState* script_state,
int delta,
ExceptionState& exception_state) { … }
void History::pushState(ScriptState* script_state,
const ScriptValue& data,
const String& title,
const String& url,
ExceptionState& exception_state) { … }
void History::replaceState(ScriptState* script_state,
const ScriptValue& data,
const String& title,
const String& url,
ExceptionState& exception_state) { … }
KURL History::UrlForState(const String& url_string) { … }
void History::StateObjectAdded(scoped_refptr<SerializedScriptValue> data,
const String& ,
const String& url_string,
WebFrameLoadType type,
ScriptState* script_state,
ExceptionState& exception_state) { … }
}