1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 21:47:46 +00:00

Ladybird+LibWebView: Move console history tracking to ConsoleClient

This will allow other chromes to make use of history in their console
implementations.
This commit is contained in:
Timothy Flynn 2023-08-30 08:45:26 -04:00 committed by Andrew Kaster
parent ed315dd950
commit 204a6f9241
6 changed files with 69 additions and 34 deletions

View file

@ -11,7 +11,6 @@
#include <AK/DeprecatedString.h>
#include <AK/OwnPtr.h>
#include <AK/Vector.h>
#include <LibWebView/Forward.h>
#include <QLineEdit>
#include <QWidget>
@ -26,6 +25,9 @@ public:
explicit ConsoleWidget(WebContentView& content_view);
virtual ~ConsoleWidget();
Optional<String> previous_history_item();
Optional<String> next_history_item();
WebView::ConsoleClient& client() { return *m_console_client; }
WebContentView& view() { return *m_output_view; }
@ -51,8 +53,6 @@ private:
virtual void keyPressEvent(QKeyEvent* event) override;
ConsoleWidget& m_console_widget;
Vector<DeprecatedString> m_history;
size_t m_history_index { 0 };
};
}