Files
cefsharp/CefSharp.Core/Internals/CefGeolocationCallbackWrapper.h
T
rassilon 8ec01da230 Use GetBrowserWrapper everywhere except popup creation/closing for all of ClientAdapter.cpp.
This means that none of the callbacks need to own disposing the IBrowser^ instance.
2015-06-17 18:14:07 -04:00

42 lines
916 B
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 "include\cef_geolocation_handler.h"
namespace CefSharp
{
public ref class CefGeolocationCallbackWrapper : IGeolocationCallback
{
private:
MCefRefPtr<CefGeolocationCallback> _callback;
public:
CefGeolocationCallbackWrapper(CefRefPtr<CefGeolocationCallback> &callback)
: _callback(callback)
{
}
!CefGeolocationCallbackWrapper()
{
_callback = NULL;
}
~CefGeolocationCallbackWrapper()
{
this->!CefGeolocationCallbackWrapper();
}
virtual void Continue(bool allow)
{
_callback->Continue(allow);
delete this;
}
};
}