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:
parent
ed315dd950
commit
204a6f9241
6 changed files with 69 additions and 34 deletions
|
@ -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 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue