#include "stdafx.h"
#pragma once
#include "CefWebBrowser.h"
#include "Request.h"
#include "ReturnValue.h"
using namespace System;
using namespace System::IO;
namespace CefSharp
{
public interface class IBeforeResourceLoad
{
public:
/// Event called before a resource is loaded.
///
/// To allow the resource to load normally return ReturnValue.Continue.
///
/// To redirect the resource to a new url populate the redirectUrl value
/// and return ReturnValue.Continue.
///
/// To specify data for the resource return a Stream object in resourceStream,
/// set mimeType to the resource stream's mime type, and return ReturnValue.Continue.
///
/// To cancel loading of the resource return ReturnValue.Handled.
///
/// Any modifications to request will be observed. If the URL in request is changed and
/// redirectUrl is also set, the URL in request will be used. */
ReturnValue HandleBeforeResourceLoad(CefWebBrowser^ browserControl, IRequest^ request,
String^% redirectUrl, Stream^% resourceStream, String^% mimeType, int loadFlags);
};
}