[iOS] Expose the associated profile in BraveWebViewConfiguration (#34227)
This commit is contained in:
@@ -19,6 +19,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
CWV_EXPORT
|
||||
@interface BraveWebViewConfiguration : CWVWebViewConfiguration
|
||||
|
||||
/// The profile associated with this web view configuration
|
||||
@property(readonly) id<ProfileBridge> profile;
|
||||
|
||||
/// Exposes the website data store associated with the WKWebViewConfiguration
|
||||
///
|
||||
/// Note: Usage of this should be limited to when the
|
||||
|
||||
@@ -25,6 +25,11 @@
|
||||
CWVAutofillDataManager* _autofillDataManager;
|
||||
}
|
||||
|
||||
- (id<ProfileBridge>)profile {
|
||||
auto* profile = ProfileIOS::FromBrowserState(self.browserState);
|
||||
return [[ProfileBridgeImpl alloc] initWithProfile:profile];
|
||||
}
|
||||
|
||||
- (WKWebsiteDataStore*)websiteDataStore {
|
||||
DCHECK(base::FeatureList::IsEnabled(
|
||||
brave::features::kUseProfileWebViewConfiguration))
|
||||
|
||||
Reference in New Issue
Block a user