Files
cefsharp/CefSharp.BrowserSubprocess.Core/Async/JavascriptAsyncMethodWrapper.h
T
amaitland 32a9f7fe81 Only keep reference to the property/method objects long enough to bind the object
No need to store a reference to them long term
2015-09-24 19:36:47 +10:00

32 lines
1.0 KiB
C++

// Copyright © 2010-2015 The CefSharp Project. 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, CefRefPtr<CefV8Value> promiseCreator, Func<JavascriptAsyncMethodCallback^, int64>^ methodCallbackSave)
: _javascriptMethodHandler(new JavascriptAsyncMethodHandler(ownerId, callbackRegistry, promiseCreator, methodCallbackSave))
{
}
void Bind(JavascriptMethod^ method, const CefRefPtr<CefV8Value>& value);
};
}
}
}