blob: 09a7badbf70da6afcde99df6986b20ec0c1bef3f [file] [log] [blame]
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_WEB_WEBUI_CRW_WEB_UI_SCHEME_HANDLER_H_
#define IOS_WEB_WEBUI_CRW_WEB_UI_SCHEME_HANDLER_H_
#import <WebKit/WebKit.h>
#include "base/memory/scoped_refptr.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
// This class allows the handle the pages associated with a WebUI URL, using the
// custom scheme handling of the WKWebView.
API_AVAILABLE(ios(11.0))
@interface CRWWebUISchemeHandler : NSObject <WKURLSchemeHandler>
// Initializes the handler with the |URLLoaderFactory| used to load the URLs.
- (instancetype)initWithURLLoaderFactory:
(scoped_refptr<network::SharedURLLoaderFactory>)URLLoaderFactory
NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
@end
#endif // IOS_WEB_WEBUI_CRW_WEB_UI_SCHEME_HANDLER_H_