2023-08-20 16:14:31 -04:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <AK/Optional.h>
|
|
|
|
|
#include <AK/StringView.h>
|
2023-10-13 11:04:07 -04:00
|
|
|
#include <AK/Vector.h>
|
2023-12-01 12:18:40 -05:00
|
|
|
#include <Ladybird/Types.h>
|
2024-03-18 16:22:27 +13:00
|
|
|
#include <LibURL/URL.h>
|
2023-08-26 23:44:52 -04:00
|
|
|
#include <LibWeb/CSS/PreferredColorScheme.h>
|
2024-06-13 01:03:56 +02:00
|
|
|
#include <LibWeb/CSS/PreferredContrast.h>
|
2024-06-13 16:15:59 +02:00
|
|
|
#include <LibWeb/CSS/PreferredMotion.h>
|
2023-08-20 16:14:31 -04:00
|
|
|
#include <LibWeb/HTML/ActivateTab.h>
|
2023-08-31 07:07:07 -04:00
|
|
|
#include <LibWebView/CookieJar.h>
|
2023-08-20 16:14:31 -04:00
|
|
|
|
|
|
|
|
#import <System/Cocoa.h>
|
|
|
|
|
|
|
|
|
|
@class Tab;
|
|
|
|
|
@class TabController;
|
|
|
|
|
|
|
|
|
|
@interface ApplicationDelegate : NSObject <NSApplicationDelegate>
|
|
|
|
|
|
2024-03-18 16:22:27 +13:00
|
|
|
- (nullable instancetype)init:(Vector<URL::URL>)initial_urls
|
|
|
|
|
newTabPageURL:(URL::URL)new_tab_page_url
|
2024-04-30 20:05:56 -04:00
|
|
|
withCookieJar:(NonnullOwnPtr<WebView::CookieJar>)cookie_jar
|
2023-12-01 12:18:40 -05:00
|
|
|
webContentOptions:(Ladybird::WebContentOptions const&)web_content_options
|
2024-07-09 15:38:21 +02:00
|
|
|
webdriverContentIPCPath:(StringView)webdriver_content_ipc_path
|
|
|
|
|
allowPopups:(BOOL)allow_popups;
|
2023-08-20 16:14:31 -04:00
|
|
|
|
2024-03-18 16:22:27 +13:00
|
|
|
- (nonnull TabController*)createNewTab:(Optional<URL::URL> const&)url
|
2023-08-23 22:09:15 -04:00
|
|
|
fromTab:(nullable Tab*)tab
|
2023-08-20 16:14:31 -04:00
|
|
|
activateTab:(Web::HTML::ActivateTab)activate_tab;
|
|
|
|
|
|
2023-08-28 16:14:34 -04:00
|
|
|
- (nonnull TabController*)createNewTab:(StringView)html
|
2024-03-18 16:22:27 +13:00
|
|
|
url:(URL::URL const&)url
|
2023-08-28 16:14:34 -04:00
|
|
|
fromTab:(nullable Tab*)tab
|
|
|
|
|
activateTab:(Web::HTML::ActivateTab)activate_tab;
|
|
|
|
|
|
2024-04-28 12:29:31 -04:00
|
|
|
- (void)setActiveTab:(nonnull Tab*)tab;
|
|
|
|
|
- (nullable Tab*)activeTab;
|
|
|
|
|
|
2023-08-20 16:14:31 -04:00
|
|
|
- (void)removeTab:(nonnull TabController*)controller;
|
|
|
|
|
|
2023-08-31 07:07:07 -04:00
|
|
|
- (WebView::CookieJar&)cookieJar;
|
2023-12-01 12:18:40 -05:00
|
|
|
- (Ladybird::WebContentOptions const&)webContentOptions;
|
2023-08-20 16:14:31 -04:00
|
|
|
- (Optional<StringView> const&)webdriverContentIPCPath;
|
2023-08-26 23:44:52 -04:00
|
|
|
- (Web::CSS::PreferredColorScheme)preferredColorScheme;
|
2024-06-13 01:03:56 +02:00
|
|
|
- (Web::CSS::PreferredContrast)preferredContrast;
|
2024-06-13 16:15:59 +02:00
|
|
|
- (Web::CSS::PreferredMotion)preferredMotion;
|
2023-10-20 09:28:53 -04:00
|
|
|
- (WebView::SearchEngine const&)searchEngine;
|
2023-08-20 16:14:31 -04:00
|
|
|
|
|
|
|
|
@end
|