Files
ladybird/Libraries/LibWebView/WebUI/BookmarksUI.h
mikiubo 131014427c LibWebView: Add bookmark import/export to about:bookmarks
Implement bookmark import/export in about:bookmarks using Netscape
bookmark HTML in JavaScript.
Import parsed items into BookmarkStore under an "Imported Bookmarks"
folder, and treat internal WebUI about: pages as potentially
trustworthy so SecureContext APIs are available there.
2026-04-22 08:02:15 -04:00

31 lines
627 B
C++

/*
* Copyright (c) 2026, Tim Flynn <trflynn89@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWebView/BookmarkStore.h>
#include <LibWebView/WebUI.h>
namespace WebView {
class BookmarksUI
: public WebUI
, public BookmarkStoreObserver {
WEB_UI(BookmarksUI);
private:
virtual void register_interfaces() override;
virtual void bookmarks_changed() override;
void load_bookmarks();
void move_item(JsonValue const&);
void import_bookmarks(JsonValue const&);
void export_bookmarks(JsonValue const&);
void show_context_menu(JsonValue const&);
};
}