[iOS] Remove implementation of RunOpenPanel from Brave's web client (#33565)
These methods are implemented by a Chrome tab helper that isn't bridged to CWVWebView, so for now we can remove it. This fixes a crash if a user happened to enable the `kIOSCustomFileUploadMenu` feature flag from `brave://flags` which is disabled by default.
This commit is contained in:
@@ -50,6 +50,14 @@ class BraveWebClient : public ChromeWebClient {
|
||||
bool ShouldBlockUniversalLinks(web::WebState* web_state,
|
||||
NSURLRequest* request) override;
|
||||
|
||||
bool CanRunOpenPanel(web::WebState* web_state) const override
|
||||
API_AVAILABLE(ios(18.4));
|
||||
void RunOpenPanel(web::WebState* web_state,
|
||||
WKOpenPanelParameters* parameters,
|
||||
WKFrameInfo* frame,
|
||||
base::OnceCallback<void(NSArray<NSURL*>*)> completion)
|
||||
const override API_AVAILABLE(ios(18.4));
|
||||
|
||||
private:
|
||||
std::string legacy_user_agent_;
|
||||
};
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "base/feature_list.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/ios/ns_error_util.h"
|
||||
#include "base/notimplemented.h"
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "brave/components/constants/url_constants.h"
|
||||
#include "brave/ios/browser/api/web_view/brave_web_view_internal.h"
|
||||
@@ -192,3 +193,17 @@ NSString* BraveWebClient::GetUserAgentForRequest(
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
bool BraveWebClient::CanRunOpenPanel(web::WebState* source) const
|
||||
API_AVAILABLE(ios(18.4)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void BraveWebClient::RunOpenPanel(
|
||||
web::WebState* source,
|
||||
WKOpenPanelParameters* parameters,
|
||||
WKFrameInfo* frame,
|
||||
base::OnceCallback<void(NSArray<NSURL*>*)> completion) const
|
||||
API_AVAILABLE(ios(18.4)) {
|
||||
NOTIMPLEMENTED();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user