mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +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
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