mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 19:25:01 +00:00
ee563827ac
* Create RequestEventArgs.cs * Create RequestEventHandler * Update RequestEventArgs.cs corrected namespace * removed regions, splitted up classes per file * reformatted code * removed wrong class doc * deleted empty line * removed TODOs (moved them in pr comments) * adapted @amaitland 's pr notes * made code backwards compatible to c# < 6 * made code backwards compatible to c# < 6 ++ (moved default values for event args to ctor) * made code backwards compatible to c# < 6 ++ (added private setters to properties)
36 lines
1.5 KiB
C#
36 lines
1.5 KiB
C#
// Copyright © 2010-2017 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.Example.RequestEventHandler
|
|
{
|
|
public class OnBeforeResourceLoadEventArgs : BaseRequestEventArgs
|
|
{
|
|
public OnBeforeResourceLoadEventArgs(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IRequestCallback callback)
|
|
: base(browserControl, browser)
|
|
{
|
|
Frame = frame;
|
|
Request = request;
|
|
Callback = callback;
|
|
|
|
ContinuationHandling = CefReturnValue.Continue; // default
|
|
}
|
|
|
|
public IFrame Frame { get; private set; }
|
|
public IRequest Request { get; private set; }
|
|
|
|
/// <summary>
|
|
/// Callback interface used for asynchronous continuation of url requests.
|
|
/// </summary>
|
|
public IRequestCallback Callback { get; private set; }
|
|
|
|
/// <summary>
|
|
/// To cancel loading of the resource return <see cref="F:CefSharp.CefReturnValue.Cancel" />
|
|
/// or <see cref="F:CefSharp.CefReturnValue.Continue" /> to allow the resource to load normally. For async
|
|
/// return <see cref="F:CefSharp.CefReturnValue.ContinueAsync" /> and use
|
|
/// <see cref="OnBeforeResourceLoadEventArgs.Callback" /> to handle continuation.
|
|
/// </summary>
|
|
public CefReturnValue ContinuationHandling { get; set; }
|
|
}
|
|
}
|