mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 02:09:24 +00:00
Ladybird: Do not assume the web view is embedded in a normal tab
The LadybirdWebView currently assumed it is viewed with a Tab instance. This will not be true with the JavaScript console. This patch removes this assumption by plumbing WebContent callbacks through a new protocol. The Tab interface then implements this protocol.
This commit is contained in:
parent
85b2782052
commit
c9b9278092
Notes:
sideshowbarker
2024-07-16 20:51:53 +09:00
Author: https://github.com/trflynn89
Commit: c9b9278092
Pull-request: https://github.com/SerenityOS/serenity/pull/20836
Reviewed-by: https://github.com/ADKaster ✅
4 changed files with 154 additions and 98 deletions
|
@ -6,18 +6,12 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/URL.h>
|
||||
|
||||
#import <System/Cocoa.h>
|
||||
|
||||
@class LadybirdWebView;
|
||||
|
||||
@interface Tab : NSWindow
|
||||
|
||||
- (void)onLoadStart:(URL const&)url;
|
||||
- (void)onTitleChange:(NSString*)title;
|
||||
- (void)onFaviconChange:(NSImage*)favicon;
|
||||
|
||||
@property (nonatomic, strong) LadybirdWebView* web_view;
|
||||
|
||||
@end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue