From 6adefb34c3dbb5f21d62cc64d639fe31552110fd Mon Sep 17 00:00:00 2001 From: Kyle Hickinson Date: Thu, 5 Oct 2023 14:02:41 -0400 Subject: [PATCH] [iOS] Expose histograms internal web view This will allow us to add find-in page on the iOS side to help QA test P3A related tickets --- ios/browser/api/p3a/brave_histograms_controller.h | 2 ++ ios/browser/api/p3a/brave_histograms_controller.mm | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/ios/browser/api/p3a/brave_histograms_controller.h b/ios/browser/api/p3a/brave_histograms_controller.h index 4af6bc26d87a..f4b40b472d62 100644 --- a/ios/browser/api/p3a/brave_histograms_controller.h +++ b/ios/browser/api/p3a/brave_histograms_controller.h @@ -8,12 +8,14 @@ #import #import +#import 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 diff --git a/ios/browser/api/p3a/brave_histograms_controller.mm b/ios/browser/api/p3a/brave_histograms_controller.mm index 1cf67ef6a12d..0a373b863afd 100644 --- a/ios/browser/api/p3a/brave_histograms_controller.mm +++ b/ios/browser/api/p3a/brave_histograms_controller.mm @@ -56,6 +56,10 @@ - (instancetype)initWithBrowserState:(ChromeBrowserState*)mainBrowserState { return self; } +- (WKWebView*)webView { + return _webView; +} + - (void)dealloc { [[_webController view] removeFromSuperview]; _webController = nullptr;