mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 13:47:46 +00:00
Ladybird+LibWebView: Move CookieJar, Database, and History to LibWebView
These classes are used as-is in all chromes. Move them to LibWebView so that non-Serenity chromes don't have to awkwardly reach into its headers and sources.
This commit is contained in:
parent
7d313ff83d
commit
5c5a00dd3a
28 changed files with 76 additions and 107 deletions
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace Browser {
|
||||
|
||||
void HistoryModel::set_items(AK::Vector<History::URLTitlePair> items)
|
||||
void HistoryModel::set_items(AK::Vector<WebView::History::URLTitlePair> items)
|
||||
{
|
||||
begin_insert_rows({}, m_entries.size(), m_entries.size());
|
||||
m_entries = items;
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Vector.h>
|
||||
#include <Applications/Browser/History.h>
|
||||
#include <LibGUI/Model.h>
|
||||
#include <LibGUI/Widget.h>
|
||||
#include <LibWebView/History.h>
|
||||
|
||||
namespace Browser {
|
||||
|
||||
|
@ -21,7 +21,7 @@ public:
|
|||
__Count,
|
||||
};
|
||||
|
||||
void set_items(AK::Vector<History::URLTitlePair> items);
|
||||
void set_items(AK::Vector<WebView::History::URLTitlePair> items);
|
||||
void clear_items();
|
||||
virtual int row_count(GUI::ModelIndex const&) const override;
|
||||
virtual int column_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override { return Column::__Count; }
|
||||
|
@ -31,7 +31,7 @@ public:
|
|||
virtual GUI::Model::MatchResult data_matches(GUI::ModelIndex const& index, GUI::Variant const& term) const override;
|
||||
|
||||
private:
|
||||
AK::Vector<History::URLTitlePair> m_entries;
|
||||
AK::Vector<WebView::History::URLTitlePair> m_entries;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ HistoryWidget::HistoryWidget()
|
|||
m_table_view->set_alternating_row_colors(true);
|
||||
}
|
||||
|
||||
void HistoryWidget::set_history_entries(Vector<History::URLTitlePair> entries)
|
||||
void HistoryWidget::set_history_entries(Vector<WebView::History::URLTitlePair> entries)
|
||||
{
|
||||
m_model->set_items(entries);
|
||||
}
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "../History.h"
|
||||
#include "HistoryModel.h"
|
||||
#include <LibGUI/FilteringProxyModel.h>
|
||||
#include <LibGUI/TextBox.h>
|
||||
#include <LibGUI/Widget.h>
|
||||
#include <LibWebView/History.h>
|
||||
|
||||
namespace Browser {
|
||||
|
||||
|
@ -20,7 +20,7 @@ class HistoryWidget final : public GUI::Widget {
|
|||
public:
|
||||
virtual ~HistoryWidget() override = default;
|
||||
|
||||
void set_history_entries(Vector<History::URLTitlePair> entries);
|
||||
void set_history_entries(Vector<WebView::History::URLTitlePair> entries);
|
||||
void clear_history_entries();
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue