mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
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.
31 lines
627 B
C++
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&);
|
|
};
|
|
|
|
}
|