mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 08:34:59 +00:00

SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
34 lines
563 B
C++
34 lines
563 B
C++
/*
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/URL.h>
|
|
#include <AK/Vector.h>
|
|
|
|
namespace Browser {
|
|
|
|
class History {
|
|
public:
|
|
void dump() const;
|
|
|
|
void push(const URL&);
|
|
URL current() const;
|
|
|
|
void go_back();
|
|
void go_forward();
|
|
|
|
bool can_go_back() { return m_current > 0; }
|
|
bool can_go_forward() { return m_current + 1 < static_cast<int>(m_items.size()); }
|
|
|
|
void clear();
|
|
|
|
private:
|
|
Vector<URL> m_items;
|
|
int m_current { -1 };
|
|
};
|
|
|
|
}
|