// Copyright © 2014 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
namespace CefSharp
{
///
/// Class that creates instances for handling custom requests.
/// The methods of this class will always be called on the CEF IO thread. This interface
/// maps to the CefRequestHandler::GetResourceHandler method. It was split out to allow for
/// the implementation that provides support
/// for the LoadHtml extension method.
///
public interface IResourceHandlerFactory
{
///
/// Are there any 's registered?
///
bool HasHandlers { get; }
///
/// Called before a resource is loaded. To specify a handler for the resource return a object
///
/// The browser UI control
/// the browser object
/// the frame object
/// the request object - cannot be modified in this callback
/// To allow the resource to load normally return NULL otherwise return an instance of ResourceHandler with a valid stream
IResourceHandler GetResourceHandler(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request);
}
}