ladybird/UI/AppKit/Interface/TabController.h
Andreas Kling 0a70dadfb1 UI: Show page loading state in the location field
Use the leading icon in the location field as a contextual page
indicator. While a page is loading, the field shows an indeterminate
activity indicator. Once loading finishes, it shows the page favicon
when available and falls back to the generic page icon where the toolkit
has one.

Keep the GTK implementation aligned with the other frontends by using
that slot only for loading and favicon state, without a separate
security icon.

This keeps single-tab windows from losing all visual feedback when the
tab bar is hidden, without adding a fake progress bar.
2026-05-20 09:37:33 +02:00

37 lines
793 B
Objective-C

/*
* Copyright (c) 2023-2026, Tim Flynn <trflynn89@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Forward.h>
#include <LibURL/URL.h>
#import <Cocoa/Cocoa.h>
@class Tab;
@interface TabController : NSWindowController <NSWindowDelegate>
- (instancetype)init;
- (instancetype)initAsChild:(Tab*)parent
pageIndex:(u64)page_index;
- (void)loadURL:(URL::URL const&)url;
- (void)onLoadStart:(URL::URL const&)url isRedirect:(BOOL)isRedirect;
- (void)onLoadFinish:(URL::URL const&)url;
- (void)onFaviconChange:(NSImage*)favicon;
- (void)onURLChange:(URL::URL const&)url;
- (void)onEnterFullscreenWindow;
- (void)onExitFullscreenWindow;
- (void)focusWebViewWhenActivated;
- (void)focusWebView;
- (void)focusLocationToolbarItem;
@end