mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
Currently, if we want to add a new e.g. WebContent command line option, we have to add it to all of Qt, AppKit, and headless-browser. (Or worse, we only add it to one of these, and we have feature disparity). To prevent this, this moves command line flags to WebView::Application. The flags are assigned to ChromeOptions and WebContentOptions structs. Each chrome can still add its platform-specific options; for example, the Qt chrome has a flag to enable Qt networking. There should be no behavior change here, other than that AppKit will now support command line flags that were previously only supported by Qt.
48 lines
1.2 KiB
Objective-C
48 lines
1.2 KiB
Objective-C
/*
|
|
* Copyright (c) 2023-2024, Tim Flynn <trflynn89@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Forward.h>
|
|
#include <LibURL/URL.h>
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
struct TabSettings {
|
|
BOOL should_show_line_box_borders { NO };
|
|
BOOL scripting_enabled { YES };
|
|
BOOL block_popups { YES };
|
|
BOOL same_origin_policy_enabled { NO };
|
|
ByteString user_agent_name { "Disabled"sv };
|
|
ByteString navigator_compatibility_mode { "chrome"sv };
|
|
};
|
|
|
|
@interface TabController : NSWindowController <NSWindowDelegate>
|
|
|
|
- (instancetype)init;
|
|
|
|
- (void)loadURL:(URL::URL const&)url;
|
|
- (void)loadHTML:(StringView)html url:(URL::URL const&)url;
|
|
|
|
- (void)onLoadStart:(URL::URL const&)url isRedirect:(BOOL)isRedirect;
|
|
|
|
- (void)onURLChange:(URL::URL const&)url;
|
|
- (void)onBackNavigationEnabled:(BOOL)back_enabled
|
|
forwardNavigationEnabled:(BOOL)forward_enabled;
|
|
|
|
- (void)onTitleChange:(ByteString const&)title;
|
|
|
|
- (void)navigateBack:(id)sender;
|
|
- (void)navigateForward:(id)sender;
|
|
- (void)reload:(id)sender;
|
|
- (void)clearHistory;
|
|
|
|
- (void)debugRequest:(ByteString const&)request argument:(ByteString const&)argument;
|
|
|
|
- (void)focusLocationToolbarItem;
|
|
|
|
@end
|