Files
cefsharp/CefSharp.Core/Internals/JsDialogCallback.h
T
amaitland 6daff6e780 Update OnBeforeUnloadDialog to expose IJsDialogCallback
Add a Continue overload to IJsDialogCallback to simplify use (just passes in an empty CefString)
2015-06-01 11:31:57 +10:00

42 lines
1.0 KiB
C++

// 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.
#pragma once
#include "Stdafx.h"
#include "MCefRefPtr.h"
using namespace CefSharp;
namespace CefSharp
{
namespace Internals
{
public ref class JsDialogCallback : public IJsDialogCallback
{
MCefRefPtr<CefJSDialogCallback> _callback;
internal:
JsDialogCallback(CefRefPtr<CefJSDialogCallback> callback) : _callback(callback)
{
}
~JsDialogCallback()
{
_callback = NULL;
}
public:
virtual void Continue(bool success, String^ userInput)
{
_callback->Continue(success, StringUtils::ToNative(userInput));
}
virtual void Continue(bool success)
{
_callback->Continue(success, CefString());
}
};
}
}