mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-06 20:19:41 +00:00
8ec01da230
This means that none of the callbacks need to own disposing the IBrowser^ instance.
42 lines
916 B
C++
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;
|
|
}
|
|
};
|
|
}
|
|
|