1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 08:34:59 +00:00
serenity/Userland/Applications/Browser/History.h
Brian Gianforcaro 1682f0b760 Everything: Move to SPDX license identifiers in all files.
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 *
2021-04-22 11:22:27 +02:00

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 };
};
}