Files
cefsharp/CefSharp.BrowserSubprocess.Core/Async/JavascriptAsyncMethodWrapper.h
T
amaitland 930846eb52 JavascriptAsyncMethodHandler - Obtain Promise from context on Execute
Previously the promise reference was passed into the handler, now we obtain the reference on demand
2018-05-15 15:05:29 +10:00

32 lines
1011 B
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.
#pragma once
#include "JavascriptAsyncMethodHandler.h"
#include "JavascriptCallbackRegistry.h"
namespace CefSharp
{
namespace Internals
{
namespace Async
{
private ref class JavascriptAsyncMethodWrapper
{
private:
MCefRefPtr<JavascriptAsyncMethodHandler> _javascriptMethodHandler;
public:
JavascriptAsyncMethodWrapper(int64 ownerId, JavascriptCallbackRegistry^ callbackRegistry, Func<JavascriptAsyncMethodCallback^, int64>^ methodCallbackSave)
: _javascriptMethodHandler(new JavascriptAsyncMethodHandler(ownerId, callbackRegistry, methodCallbackSave))
{
}
void Bind(JavascriptMethod^ method, const CefRefPtr<CefV8Value>& value);
};
}
}
}