mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-05 03:32:37 +00:00
73a156fdc5
Compiles, that's about it at this point, there are major CEF breaking changes, and lots to be addressed. Browser Process (main process) - Removed IResourceHandlerFactory as it no longer fits with the structure that CEF provides - New IResourceRequestHandler interface added, not plumbed in yet - CefSettings - Add RootCachePath and ApplicationClientIdForFileScanning BrowserSubprocess (render process) - SendProcessMessage was moved from CefBrowser to CefFrame - OnBrowserCreated added extraInfo param The BrowserSubprocess changes for this upgrade should be complete
46 lines
1.3 KiB
C++
46 lines
1.3 KiB
C++
// Copyright © 2010 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.
|
|
|
|
#pragma once
|
|
|
|
#include "Stdafx.h"
|
|
#include "include/cef_scheme.h"
|
|
|
|
using namespace System::IO;
|
|
using namespace System::Collections::Specialized;
|
|
|
|
namespace CefSharp
|
|
{
|
|
public class ResourceHandlerWrapper : public CefResourceHandler
|
|
{
|
|
private:
|
|
gcroot<IResourceHandler^> _handler;
|
|
gcroot<IRequest^> _request;
|
|
|
|
Cookie^ GetCookie(const CefCookie& cookie);
|
|
|
|
public:
|
|
ResourceHandlerWrapper(IResourceHandler^ handler)
|
|
: _handler(handler)
|
|
{
|
|
}
|
|
|
|
~ResourceHandlerWrapper()
|
|
{
|
|
delete _handler;
|
|
_handler = nullptr;
|
|
|
|
delete _request;
|
|
_request = nullptr;
|
|
}
|
|
|
|
virtual bool ProcessRequest(CefRefPtr<CefRequest> request, CefRefPtr<CefCallback> callback) OVERRIDE;
|
|
virtual void GetResponseHeaders(CefRefPtr<CefResponse> response, int64& response_length, CefString& redirectUrl) OVERRIDE;
|
|
virtual bool ReadResponse(void* data_out, int bytes_to_read, int& bytes_read, CefRefPtr<CefCallback> callback) OVERRIDE;
|
|
virtual void Cancel() OVERRIDE;
|
|
|
|
IMPLEMENT_REFCOUNTING(ResourceHandlerWrapper);
|
|
};
|
|
}
|