2023-08-20 17:14:31 -03:00
|
|
|
/*
|
2024-07-30 15:01:05 -03:00
|
|
|
* Copyright (c) 2023-2024, Tim Flynn <trflynn89@serenityos.org>
|
2023-08-20 17:14:31 -03:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <AK/Forward.h>
|
2024-03-18 00:22:27 -03:00
|
|
|
#include <LibURL/URL.h>
|
2023-08-20 17:14:31 -03:00
|
|
|
|
2024-07-17 02:54:53 -03:00
|
|
|
#import <Cocoa/Cocoa.h>
|
2023-08-20 17:14:31 -03:00
|
|
|
|
2024-09-17 16:49:00 -03:00
|
|
|
@class Tab;
|
|
|
|
|
|
2023-08-20 17:14:31 -03:00
|
|
|
@interface TabController : NSWindowController <NSWindowDelegate>
|
|
|
|
|
|
2024-07-30 15:01:05 -03:00
|
|
|
- (instancetype)init;
|
2024-09-17 16:49:00 -03:00
|
|
|
- (instancetype)initAsChild:(Tab*)parent
|
|
|
|
|
pageIndex:(u64)page_index;
|
2023-08-20 17:14:31 -03:00
|
|
|
|
2024-03-18 00:22:27 -03:00
|
|
|
- (void)loadURL:(URL::URL const&)url;
|
|
|
|
|
- (void)loadHTML:(StringView)html url:(URL::URL const&)url;
|
2023-08-20 17:14:31 -03:00
|
|
|
|
2024-03-18 00:22:27 -03:00
|
|
|
- (void)onLoadStart:(URL::URL const&)url isRedirect:(BOOL)isRedirect;
|
2024-04-14 17:54:30 -03:00
|
|
|
|
|
|
|
|
- (void)onURLChange:(URL::URL const&)url;
|
|
|
|
|
|
2023-08-20 17:14:31 -03:00
|
|
|
- (void)clearHistory;
|
|
|
|
|
|
|
|
|
|
- (void)focusLocationToolbarItem;
|
|
|
|
|
|
|
|
|
|
@end
|