// Copyright © 2015 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 { /// /// Implement this interface to provide handler implementations. The handler /// instance will not be released until all objects related to the context have /// been destroyed. /// public interface IRequestContextHandler { /// /// Called immediately after the request context has been initialized. /// It's important to note this event is fired on a CEF UI thread, which by default is not the same as your application UI /// thread. /// /// the request context void OnRequestContextInitialized(IRequestContext requestContext); /// /// Called on the CEF IO thread before a resource request is initiated. /// This method will not be called if the client associated with returns a non-NULL value /// from for the same request (identified by ). /// /// represent the source browser of the request, and may be null for requests originating from service workers. /// represent the source frame of the request, and may be null for requests originating from service workers. /// represents the request contents and cannot be modified in this callback /// will be true if the resource request is a navigation /// will be true if the resource request is a download /// is the origin (scheme + domain) of the page that initiated the request /// Set to true to disable default handling of the request, in which case it will need to be handled via or it will be canceled /// To allow the resource load to proceed with default handling return null. To specify a handler for the resource return a object. IResourceRequestHandler GetResourceRequestHandler(IBrowser browser, IFrame frame, IRequest request, bool isNavigation, bool isDownload, string requestInitiator, ref bool disableDefaultHandling); } }