created new implementation of ijavascriptcallback to handle cef ipc solution

This commit is contained in:
David Serfozo
2015-07-07 08:26:13 +02:00
parent 5f573c8563
commit c7db48ae7a
9 changed files with 217 additions and 3 deletions
@@ -0,0 +1,29 @@
// Copyright © 2010-2015 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.
#include "Stdafx.h"
#include "CefSharpBrowserWrapper.h"
#include "JavascriptCallbackImpl.h"
#include "JavascriptCallbackImplFactory.h"
namespace CefSharp
{
namespace Internals
{
JavascriptCallbackImplFactory::JavascriptCallbackImplFactory(PendingTaskRepository<JavascriptResponse^>^ pendingTasks)
:_pendingTasks(pendingTasks)
{
}
void JavascriptCallbackImplFactory::BrowserWrapper::set(CefSharpBrowserWrapper^ browserWrapper)
{
_browserWrapper = gcnew WeakReference(browserWrapper);
}
IJavascriptCallback^ JavascriptCallbackImplFactory::Create(JavascriptCallback^ callback)
{
return gcnew JavascriptCallbackImpl(callback, _pendingTasks, _browserWrapper);
}
}
}