Skip to content

Commit

Permalink
Merge pull request #20420 from brave/expose-histograms-webview
Browse files Browse the repository at this point in the history
[iOS] Expose histograms internal web view
  • Loading branch information
kylehickinson authored Oct 5, 2023
2 parents 3e93095 + 6adefb3 commit a6a16e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ios/browser/api/p3a/brave_histograms_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <WebKit/WebKit.h>

NS_ASSUME_NONNULL_BEGIN

/// Displays the `chrome://histograms` web page to verify P3A histograms
OBJC_EXPORT
@interface BraveHistogramsController : UIViewController
@property(readonly) WKWebView* webView;
- (instancetype)init NS_UNAVAILABLE;
@end

Expand Down
4 changes: 4 additions & 0 deletions ios/browser/api/p3a/brave_histograms_controller.mm
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ - (instancetype)initWithBrowserState:(ChromeBrowserState*)mainBrowserState {
return self;
}

- (WKWebView*)webView {
return _webView;
}

- (void)dealloc {
[[_webController view] removeFromSuperview];
_webController = nullptr;
Expand Down

0 comments on commit a6a16e4

Please sign in to comment.