mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 19:25:01 +00:00
Remove Geolocation API and Upgrade version numbers to 65
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 64.0.0
|
||||
PRODUCTVERSION 64.0.0
|
||||
FILEVERSION 65.0.0
|
||||
PRODUCTVERSION 65.0.0
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -16,10 +16,10 @@ BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "FileDescription", "CefSharp.BrowserSubprocess.Core"
|
||||
VALUE "FileVersion", "64.0.0"
|
||||
VALUE "LegalCopyright", "Copyright © 2010-2017 The CefSharp Authors"
|
||||
VALUE "FileVersion", "65.0.0"
|
||||
VALUE "LegalCopyright", "Copyright © 2010-2018 The CefSharp Authors"
|
||||
VALUE "ProductName", "CefSharp"
|
||||
VALUE "ProductVersion", "64.0.0"
|
||||
VALUE "ProductVersion", "65.0.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
|
||||
<assemblyIdentity version="64.0.0.0" name="CefSharp.BrowserSubprocess.app" />
|
||||
<assemblyIdentity version="65.0.0.0" name="CefSharp.BrowserSubprocess.app" />
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
|
||||
+1
-32
@@ -16,7 +16,6 @@
|
||||
#include "Internals/CefSharpApp.h"
|
||||
#include "Internals/PluginVisitor.h"
|
||||
#include "Internals/CefTaskScheduler.h"
|
||||
#include "Internals/CefGetGeolocationCallbackAdapter.h"
|
||||
#include "Internals/CefRegisterCdmCallbackAdapter.h"
|
||||
#include "CookieManager.h"
|
||||
#include "CefSettings.h"
|
||||
@@ -515,37 +514,7 @@ namespace CefSharp
|
||||
{
|
||||
CefEnableHighDPISupport();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Request a one-time geolocation update.
|
||||
/// This function bypasses any user permission checks so should only be
|
||||
/// used by code that is allowed to access location information.
|
||||
/// </summary>
|
||||
/// <returns>Returns 'best available' location info or, if the location update failed, with error info.</returns>
|
||||
[[deprecated("Geolocation support is reportedly broken and will be removed from the CEF project, as a consiquence it will be removed from CefSharp. See https://github.com/cefsharp/CefSharp/issues/2293 for details.")]]
|
||||
static bool GetGeolocation(IGetGeolocationCallback^ callback)
|
||||
{
|
||||
CefRefPtr<CefGetGeolocationCallback> wrapper = callback == nullptr ? NULL : new CefGetGeolocationCallbackAdapter(callback);
|
||||
|
||||
return CefGetGeolocation(wrapper);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Request a one-time geolocation update.
|
||||
/// This function bypasses any user permission checks so should only be
|
||||
/// used by code that is allowed to access location information.
|
||||
/// </summary>
|
||||
/// <returns>Returns 'best available' location info or, if the location update failed, with error info.</returns>
|
||||
[[deprecated("Geolocation support is reportedly broken and will be removed from the CEF project, as a consiquence it will be removed from CefSharp. See https://github.com/cefsharp/CefSharp/issues/2293 for details.")]]
|
||||
static Task<Geoposition^>^ GetGeolocationAsync()
|
||||
{
|
||||
auto callback = gcnew TaskGetGeolocationCallback();
|
||||
|
||||
GetGeolocation(callback);
|
||||
|
||||
return callback->Task;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if called on the specified CEF thread.
|
||||
/// </summary>
|
||||
|
||||
@@ -157,9 +157,6 @@
|
||||
<ClInclude Include="Internals\CefBeforeDownloadCallbackWrapper.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Internals\CefGeolocationCallbackWrapper.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Internals\CefFileDialogCallbackWrapper.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
@@ -265,9 +262,6 @@
|
||||
<ClInclude Include="Internals\CefDeleteCookiesCallbackAdapter.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Internals\CefGetGeolocationCallbackAdapter.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
// Copyright © 2010-2017 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"
|
||||
|
||||
#include "CefWrapper.h"
|
||||
|
||||
namespace CefSharp
|
||||
{
|
||||
namespace Internals
|
||||
{
|
||||
private ref class CefGeolocationCallbackWrapper : public IGeolocationCallback, public CefWrapper
|
||||
{
|
||||
private:
|
||||
MCefRefPtr<CefGeolocationCallback> _callback;
|
||||
|
||||
public:
|
||||
CefGeolocationCallbackWrapper(CefRefPtr<CefGeolocationCallback> &callback)
|
||||
: _callback(callback)
|
||||
{
|
||||
}
|
||||
|
||||
!CefGeolocationCallbackWrapper()
|
||||
{
|
||||
_callback = NULL;
|
||||
}
|
||||
|
||||
~CefGeolocationCallbackWrapper()
|
||||
{
|
||||
this->!CefGeolocationCallbackWrapper();
|
||||
|
||||
_disposed = true;
|
||||
}
|
||||
|
||||
virtual void Continue(bool allow)
|
||||
{
|
||||
ThrowIfDisposed();
|
||||
|
||||
_callback->Continue(allow);
|
||||
|
||||
delete this;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
// Copyright © 2010-2017 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.h"
|
||||
|
||||
using namespace System::Threading::Tasks;
|
||||
|
||||
namespace CefSharp
|
||||
{
|
||||
namespace Internals
|
||||
{
|
||||
private class CefGetGeolocationCallbackAdapter : public CefGetGeolocationCallback
|
||||
{
|
||||
private:
|
||||
gcroot<IGetGeolocationCallback^> _callback;
|
||||
|
||||
public:
|
||||
CefGetGeolocationCallbackAdapter(IGetGeolocationCallback^ callback)
|
||||
{
|
||||
_callback = callback;
|
||||
}
|
||||
|
||||
~CefGetGeolocationCallbackAdapter()
|
||||
{
|
||||
delete _callback;
|
||||
_callback = nullptr;
|
||||
}
|
||||
|
||||
virtual void OnLocationUpdate(const CefGeoposition& position) OVERRIDE
|
||||
{
|
||||
auto p = gcnew Geoposition();
|
||||
p->Accuracy = position.accuracy;
|
||||
p->Altitude = position.altitude;
|
||||
p->AltitudeAccuracy = position.altitude_accuracy;
|
||||
p->ErrorCode = (CefGeoPositionErrorCode)position.error_code;
|
||||
p->ErrorMessage = StringUtils::ToClr(position.error_message);
|
||||
p->Heading = position.heading;
|
||||
p->Latitude = position.latitude;
|
||||
p->Longitude = position.longitude;
|
||||
p->Speed = position.speed;
|
||||
p->Timestamp = ConvertCefTimeToDateTime(position.timestamp);
|
||||
|
||||
_callback->OnLocationUpdate(p);
|
||||
};
|
||||
|
||||
DateTime ConvertCefTimeToDateTime(CefTime time)
|
||||
{
|
||||
auto epoch = time.GetDoubleT();
|
||||
if (epoch == 0)
|
||||
{
|
||||
return DateTime::MinValue;
|
||||
}
|
||||
return DateTime(1970, 1, 1, 0, 0, 0).AddSeconds(epoch).ToLocalTime();
|
||||
}
|
||||
|
||||
IMPLEMENT_REFCOUNTING(CefGetGeolocationCallbackAdapter)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "CefSharpBrowserWrapper.h"
|
||||
#include "CefDownloadItemCallbackWrapper.h"
|
||||
#include "CefBeforeDownloadCallbackWrapper.h"
|
||||
#include "CefGeolocationCallbackWrapper.h"
|
||||
#include "CefFileDialogCallbackWrapper.h"
|
||||
#include "CefAuthCallbackWrapper.h"
|
||||
#include "CefJSDialogCallbackWrapper.h"
|
||||
@@ -1050,33 +1049,6 @@ namespace CefSharp
|
||||
}
|
||||
}
|
||||
|
||||
bool ClientAdapter::OnRequestGeolocationPermission(CefRefPtr<CefBrowser> browser, const CefString& requesting_url, int request_id, CefRefPtr<CefGeolocationCallback> callback)
|
||||
{
|
||||
auto handler = _browserControl->GeolocationHandler;
|
||||
|
||||
if (handler == nullptr)
|
||||
{
|
||||
// Default deny, as CEF does.
|
||||
return false;
|
||||
}
|
||||
|
||||
auto browserWrapper = GetBrowserWrapper(browser->GetIdentifier(), browser->IsPopup());
|
||||
auto callbackWrapper = gcnew CefGeolocationCallbackWrapper(callback);
|
||||
|
||||
return handler->OnRequestGeolocationPermission(_browserControl, browserWrapper, StringUtils::ToClr(requesting_url), request_id, callbackWrapper);
|
||||
}
|
||||
|
||||
void ClientAdapter::OnCancelGeolocationPermission(CefRefPtr<CefBrowser> browser, int request_id)
|
||||
{
|
||||
auto handler = _browserControl->GeolocationHandler;
|
||||
|
||||
if (handler != nullptr)
|
||||
{
|
||||
auto browserWrapper = GetBrowserWrapper(browser->GetIdentifier(), browser->IsPopup());
|
||||
handler->OnCancelGeolocationPermission(_browserControl, browserWrapper, request_id);
|
||||
}
|
||||
}
|
||||
|
||||
void ClientAdapter::OnBeforeDownload(CefRefPtr<CefBrowser> browser, CefRefPtr<CefDownloadItem> download_item,
|
||||
const CefString& suggested_name, CefRefPtr<CefBeforeDownloadCallback> callback)
|
||||
{
|
||||
|
||||
@@ -28,7 +28,6 @@ namespace CefSharp
|
||||
public CefJSDialogHandler,
|
||||
public CefDialogHandler,
|
||||
public CefDragHandler,
|
||||
public CefGeolocationHandler,
|
||||
public CefDownloadHandler,
|
||||
public CefFindHandler
|
||||
{
|
||||
@@ -97,7 +96,6 @@ namespace CefSharp
|
||||
virtual DECL CefRefPtr<CefJSDialogHandler> GetJSDialogHandler() OVERRIDE { return this; }
|
||||
virtual DECL CefRefPtr<CefDialogHandler> GetDialogHandler() OVERRIDE { return this; }
|
||||
virtual DECL CefRefPtr<CefDragHandler> GetDragHandler() OVERRIDE { return this; }
|
||||
virtual DECL CefRefPtr<CefGeolocationHandler> GetGeolocationHandler() OVERRIDE { return this; }
|
||||
virtual DECL CefRefPtr<CefFindHandler> GetFindHandler() OVERRIDE { return this; }
|
||||
virtual DECL bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser, CefProcessId source_process, CefRefPtr<CefProcessMessage> message) OVERRIDE;
|
||||
|
||||
@@ -184,11 +182,6 @@ namespace CefSharp
|
||||
virtual DECL bool OnDragEnter(CefRefPtr<CefBrowser> browser, CefRefPtr<CefDragData> dragData, DragOperationsMask mask) OVERRIDE;
|
||||
virtual DECL void OnDraggableRegionsChanged(CefRefPtr<CefBrowser> browser, const std::vector<CefDraggableRegion>& regions) OVERRIDE;
|
||||
|
||||
//CefGeolocationHandler
|
||||
virtual DECL bool OnRequestGeolocationPermission(CefRefPtr<CefBrowser> browser, const CefString& requesting_url, int request_id,
|
||||
CefRefPtr<CefGeolocationCallback> callback) OVERRIDE;
|
||||
virtual DECL void OnCancelGeolocationPermission(CefRefPtr<CefBrowser> browser, int request_id) OVERRIDE;
|
||||
|
||||
//CefDownloadHandler
|
||||
virtual DECL void OnBeforeDownload(CefRefPtr<CefBrowser> browser, CefRefPtr<CefDownloadItem> download_item,
|
||||
const CefString& suggested_name, CefRefPtr<CefBeforeDownloadCallback> callback) OVERRIDE;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 64.0.0
|
||||
PRODUCTVERSION 64.0.0
|
||||
FILEVERSION 65.0.0
|
||||
PRODUCTVERSION 65.0.0
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -16,10 +16,10 @@ BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "FileDescription", "CefSharp.Core"
|
||||
VALUE "FileVersion", "64.0.0"
|
||||
VALUE "LegalCopyright", "Copyright © 2010-2017 The CefSharp Authors"
|
||||
VALUE "FileVersion", "65.0.0"
|
||||
VALUE "LegalCopyright", "Copyright © 2010-2018 The CefSharp Authors"
|
||||
VALUE "ProductName", "CefSharp"
|
||||
VALUE "ProductVersion", "64.0.0"
|
||||
VALUE "ProductVersion", "65.0.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
|
||||
<assemblyIdentity version="64.0.0.0" name="CefSharp.OffScreen.Example.app" />
|
||||
<assemblyIdentity version="65.0.0.0" name="CefSharp.OffScreen.Example.app" />
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
|
||||
@@ -174,11 +174,6 @@ namespace CefSharp.OffScreen
|
||||
/// <value>The resource handler factory.</value>
|
||||
public IResourceHandlerFactory ResourceHandlerFactory { get; set; }
|
||||
/// <summary>
|
||||
/// Implement <see cref="IGeolocationHandler" /> and assign to handle requests for permission to use geolocation.
|
||||
/// </summary>
|
||||
/// <value>The geolocation handler.</value>
|
||||
public IGeolocationHandler GeolocationHandler { get; set; }
|
||||
/// <summary>
|
||||
/// Implement <see cref="IRenderProcessMessageHandler" /> and assign to handle messages from the render process.
|
||||
/// </summary>
|
||||
/// <value>The render process message handler.</value>
|
||||
|
||||
@@ -38,7 +38,6 @@ namespace CefSharp.WinForms.Example
|
||||
browser.MenuHandler = new MenuHandler();
|
||||
browser.RequestHandler = new WinFormsRequestHandler(openNewTab);
|
||||
browser.JsDialogHandler = new JsDialogHandler();
|
||||
browser.GeolocationHandler = new GeolocationHandler();
|
||||
browser.DownloadHandler = new DownloadHandler();
|
||||
if (multiThreadedMessageLoopEnabled)
|
||||
{
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
// Copyright © 2010-2017 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.
|
||||
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using CefSharp.WinForms.Internals;
|
||||
|
||||
namespace CefSharp.WinForms.Example.Handlers
|
||||
{
|
||||
internal class GeolocationHandler : IGeolocationHandler
|
||||
{
|
||||
bool IGeolocationHandler.OnRequestGeolocationPermission(IWebBrowser browserControl, IBrowser browser, string requestingUrl, int requestId, IGeolocationCallback callback)
|
||||
{
|
||||
//The callback has been disposed, so we are unable to continue
|
||||
if(callback.IsDisposed)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var control = (Control)browserControl;
|
||||
|
||||
control.InvokeOnUiThreadIfRequired(delegate()
|
||||
{
|
||||
//Callback wraps a managed resource, so we'll wrap in a using statement so it's always disposed of.
|
||||
using (callback)
|
||||
{
|
||||
var result = MessageBox.Show(string.Format("{0} wants to use your computer's location. Allow? ** You must set your Google API key in CefExample.Init() for this to work. **", requestingUrl), "Geolocation", MessageBoxButtons.YesNo);
|
||||
|
||||
callback.Continue(result == DialogResult.Yes);
|
||||
}
|
||||
});
|
||||
|
||||
//To cancel the request immediately we'd return false here, as we're returning true
|
||||
// the callback will be used to allow/deny the permission request.
|
||||
return true;
|
||||
}
|
||||
|
||||
void IGeolocationHandler.OnCancelGeolocationPermission(IWebBrowser browserControl, IBrowser browser, int requestId)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
|
||||
<assemblyIdentity version="64.0.0.0" name="CefSharp.WinForms.Example.app" />
|
||||
<assemblyIdentity version="65.0.0.0" name="CefSharp.WinForms.Example.app" />
|
||||
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
|
||||
@@ -205,13 +205,7 @@ namespace CefSharp.WinForms
|
||||
/// <value>The resource handler factory.</value>
|
||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(null)]
|
||||
public IResourceHandlerFactory ResourceHandlerFactory { get; set; }
|
||||
/// <summary>
|
||||
/// Implement <see cref="IGeolocationHandler" /> and assign to handle requests for permission to use geolocation.
|
||||
/// </summary>
|
||||
/// <value>The geolocation handler.</value>
|
||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(null)]
|
||||
public IGeolocationHandler GeolocationHandler { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Event handler that will get called when the resource load for a navigation fails or is canceled.
|
||||
/// It's important to note this event is fired on a CEF UI thread, which by default is not the same as your application UI
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
// Copyright © 2010-2017 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.
|
||||
|
||||
using System;
|
||||
using System.Windows;
|
||||
|
||||
namespace CefSharp.Wpf.Example.Handlers
|
||||
{
|
||||
internal class GeolocationHandler : IGeolocationHandler
|
||||
{
|
||||
bool IGeolocationHandler.OnRequestGeolocationPermission(IWebBrowser browserControl, IBrowser browser, string requestingUrl, int requestId, IGeolocationCallback callback)
|
||||
{
|
||||
//You can execute the callback inline
|
||||
//callback.Continue(true);
|
||||
//return true;
|
||||
|
||||
//You can execute the callback in an `async` fashion
|
||||
//Open a message box on the `UI` thread and ask for user input.
|
||||
//You can open a form, or do whatever you like, just make sure you either
|
||||
//execute the callback or call `Dispose` as it's an `unmanaged` wrapper.
|
||||
var chromiumWebBrowser = (ChromiumWebBrowser)browserControl;
|
||||
chromiumWebBrowser.Dispatcher.BeginInvoke((Action)(() =>
|
||||
{
|
||||
//Callback wraps an unmanaged resource, so we'll make sure it's Disposed (calling Continue will also Dipose of the callback, it's safe to dispose multiple times).
|
||||
using (callback)
|
||||
{
|
||||
var result = MessageBox.Show(String.Format("{0} wants to use your computer's location. Allow? ** You must set your Google API key in CefExample.Init() for this to work. **", requestingUrl), "Geolocation", MessageBoxButton.YesNo);
|
||||
|
||||
//Execute the callback, to allow/deny the request.
|
||||
callback.Continue(result == MessageBoxResult.Yes);
|
||||
}
|
||||
}));
|
||||
|
||||
//Yes we'd like to handle this request ourselves.
|
||||
return true;
|
||||
}
|
||||
|
||||
void IGeolocationHandler.OnCancelGeolocationPermission(IWebBrowser browserControl, IBrowser browser, int requestId)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -88,7 +88,6 @@ namespace CefSharp.Wpf.Example.Views
|
||||
browser.DisplayHandler = new DisplayHandler();
|
||||
browser.LifeSpanHandler = new LifespanHandler();
|
||||
browser.MenuHandler = new MenuHandler();
|
||||
browser.GeolocationHandler = new GeolocationHandler();
|
||||
var downloadHandler = new DownloadHandler();
|
||||
downloadHandler.OnBeforeDownloadFired += OnBeforeDownloadFired;
|
||||
downloadHandler.OnDownloadUpdatedFired += OnDownloadUpdatedFired;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
|
||||
<assemblyIdentity version="64.0.0.0" name="CefSharp.Wpf.Example.app" />
|
||||
<assemblyIdentity version="65.0.0.0" name="CefSharp.Wpf.Example.app" />
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
|
||||
@@ -188,11 +188,6 @@ namespace CefSharp.Wpf
|
||||
/// <value>The resource handler factory.</value>
|
||||
public IResourceHandlerFactory ResourceHandlerFactory { get; set; }
|
||||
/// <summary>
|
||||
/// Implement <see cref="IGeolocationHandler" /> and assign to handle requests for permission to use geolocation.
|
||||
/// </summary>
|
||||
/// <value>The geolocation handler.</value>
|
||||
public IGeolocationHandler GeolocationHandler { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the bitmap factory.
|
||||
/// </summary>
|
||||
/// <value>The bitmap factory.</value>
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
// Copyright © 2010-2017 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.
|
||||
|
||||
using System;
|
||||
|
||||
namespace CefSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Callback interface used for asynchronous continuation of geolocation permission requests.
|
||||
/// </summary>
|
||||
public interface IGeolocationCallback : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Call to allow or deny geolocation access.
|
||||
/// </summary>
|
||||
/// <param name="allow">true to allow</param>
|
||||
void Continue(bool allow);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the callback has been disposed of.
|
||||
/// </summary>
|
||||
bool IsDisposed { get; }
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
// Copyright © 2010-2017 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.
|
||||
|
||||
using System;
|
||||
|
||||
namespace CefSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement this interface to receive geolocation updates. The methods of this
|
||||
/// class will be called on the CEF UI thread.
|
||||
/// </summary>
|
||||
public interface IGetGeolocationCallback : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Called with the 'best available' location information or,
|
||||
/// if the location update failed, with error information.
|
||||
/// </summary>
|
||||
/// <param name="position">geo position</param>
|
||||
void OnLocationUpdate(Geoposition position);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the callback has been disposed of.
|
||||
/// </summary>
|
||||
bool IsDisposed { get; }
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
// Copyright © 2010-2017 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.
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using CefSharp.Internals;
|
||||
|
||||
namespace CefSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides a callback implementation of <see cref="IGetGeolocationCallback"/> for use with geo positioning
|
||||
/// </summary>
|
||||
public class TaskGetGeolocationCallback : IGetGeolocationCallback
|
||||
{
|
||||
private readonly TaskCompletionSource<Geoposition> taskCompletionSource;
|
||||
private bool hasData;
|
||||
private volatile bool isDisposed;
|
||||
|
||||
public TaskGetGeolocationCallback()
|
||||
{
|
||||
taskCompletionSource = new TaskCompletionSource<Geoposition>();
|
||||
}
|
||||
|
||||
void IGetGeolocationCallback.OnLocationUpdate(Geoposition position)
|
||||
{
|
||||
taskCompletionSource.TrySetResultAsync(position);
|
||||
|
||||
hasData = true;
|
||||
}
|
||||
|
||||
bool IGetGeolocationCallback.IsDisposed
|
||||
{
|
||||
get { return isDisposed; }
|
||||
}
|
||||
|
||||
public Task<Geoposition> Task
|
||||
{
|
||||
get { return taskCompletionSource.Task; }
|
||||
}
|
||||
|
||||
void IDisposable.Dispose()
|
||||
{
|
||||
if (hasData == false)
|
||||
{
|
||||
//Set the result on the ThreadPool so the Task continuation is not run on the CEF UI Thread
|
||||
taskCompletionSource.TrySetResultAsync(null);
|
||||
}
|
||||
|
||||
isDisposed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -79,8 +79,6 @@
|
||||
<Compile Include="Callback\IDeleteCookiesCallback.cs" />
|
||||
<Compile Include="Callback\IDownloadItemCallback.cs" />
|
||||
<Compile Include="Callback\IFileDialogCallback.cs" />
|
||||
<Compile Include="Callback\IGeolocationCallback.cs" />
|
||||
<Compile Include="Callback\IGetGeolocationCallback.cs" />
|
||||
<Compile Include="Callback\IJavascriptCallback.cs" />
|
||||
<Compile Include="Callback\IJsDialogCallback.cs" />
|
||||
<Compile Include="Callback\IPrintToPdfCallback.cs" />
|
||||
@@ -90,7 +88,6 @@
|
||||
<Compile Include="Callback\IRunContextMenuCallback.cs" />
|
||||
<Compile Include="Callback\ISelectClientCertificateCallback.cs" />
|
||||
<Compile Include="Callback\ISetCookieCallback.cs" />
|
||||
<Compile Include="Callback\TaskGetGeolocationCallback.cs" />
|
||||
<Compile Include="Callback\TaskDeleteCookiesCallback.cs" />
|
||||
<Compile Include="Callback\TaskSetCookieCallback.cs" />
|
||||
<Compile Include="Callback\TaskRegisterCdmCallback.cs" />
|
||||
@@ -166,7 +163,6 @@
|
||||
<Compile Include="Handler\IDragHandler.cs" />
|
||||
<Compile Include="Handler\IFindHandler.cs" />
|
||||
<Compile Include="Handler\IFocusHandler.cs" />
|
||||
<Compile Include="Handler\IGeolocationHandler.cs" />
|
||||
<Compile Include="Handler\IJsDialogHandler.cs" />
|
||||
<Compile Include="Handler\IKeyboardHandler.cs" />
|
||||
<Compile Include="Handler\ILifeSpanHandler.cs" />
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
// Copyright © 2010-2017 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.
|
||||
|
||||
namespace CefSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement this interface to handle events related to geolocation permission requests.
|
||||
/// The methods of this class will be called on the CEF UI thread.
|
||||
/// </summary>
|
||||
public interface IGeolocationHandler
|
||||
{
|
||||
/// <summary>
|
||||
/// Called when a page requests permission to access geolocation information.
|
||||
/// </summary>
|
||||
/// <param name="browserControl">the browser control</param>
|
||||
/// <param name="browser">the browser object</param>
|
||||
/// <param name="requestingUrl">the URL requesting permission</param>
|
||||
/// <param name="requestId">the unique ID for the permission request</param>
|
||||
/// <param name="callback">Callback interface used for asynchronous continuation of geolocation permission requests.</param>
|
||||
/// <returns>Return true and call IGeolocationCallback.Continue() either in this method or at a later time to continue or cancel the request. Return false to cancel the request immediately.</returns>
|
||||
bool OnRequestGeolocationPermission(IWebBrowser browserControl, IBrowser browser, string requestingUrl, int requestId, IGeolocationCallback callback);
|
||||
|
||||
/// <summary>
|
||||
/// Called when a geolocation access request is canceled.
|
||||
/// </summary>
|
||||
/// <param name="browserControl">the browser control</param>
|
||||
/// <param name="browser">the browser object</param>
|
||||
/// <param name="requestId">the unique ID for the permission request, as seen in <see cref="OnRequestGeolocationPermission"/></param>
|
||||
void OnCancelGeolocationPermission(IWebBrowser browserControl, IBrowser browser, int requestId);
|
||||
}
|
||||
}
|
||||
@@ -175,14 +175,6 @@ namespace CefSharp
|
||||
/// <value>The resource handler factory.</value>
|
||||
IResourceHandlerFactory ResourceHandlerFactory { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Implement <see cref="IGeolocationHandler" /> and assign to handle requests for permission to use geolocation.
|
||||
/// </summary>
|
||||
/// <value>The geolocation handler.</value>
|
||||
[Obsolete("Geolocation support is reportedly broken and will be removed from the CEF project, as a consiquence" +
|
||||
"it will be removed from CefSharp. See https://github.com/cefsharp/CefSharp/issues/2293 for details.")]
|
||||
IGeolocationHandler GeolocationHandler { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Implement <see cref="IRenderProcessMessageHandler" /> and assign to handle messages from the render process.
|
||||
/// </summary>
|
||||
|
||||
@@ -20,7 +20,6 @@ namespace CefSharp.Internals
|
||||
browser.MenuHandler = null;
|
||||
browser.FocusHandler = null;
|
||||
browser.ResourceHandlerFactory = null;
|
||||
browser.GeolocationHandler = null;
|
||||
browser.RenderProcessMessageHandler = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,9 +34,9 @@ namespace CefSharp
|
||||
public const bool ComVisible = false;
|
||||
public const string AssemblyCompany = "The CefSharp Authors";
|
||||
public const string AssemblyProduct = "CefSharp";
|
||||
public const string AssemblyVersion = "64.0.0";
|
||||
public const string AssemblyFileVersion = "64.0.0.0";
|
||||
public const string AssemblyCopyright = "Copyright © 2010-2017 The CefSharp Authors";
|
||||
public const string AssemblyVersion = "65.0.0";
|
||||
public const string AssemblyFileVersion = "65.0.0.0";
|
||||
public const string AssemblyCopyright = "Copyright © 2010-2018 The CefSharp Authors";
|
||||
public const string CefSharpCoreProject = "CefSharp.Core, PublicKey=" + PublicKey;
|
||||
public const string CefSharpBrowserSubprocessProject = "CefSharp.BrowserSubprocess, PublicKey=" + PublicKey;
|
||||
public const string CefSharpBrowserSubprocessCoreProject = "CefSharp.BrowserSubprocess.Core, PublicKey=" + PublicKey;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
image: Visual Studio 2015
|
||||
|
||||
version: 64.0.0-CI{build}
|
||||
version: 65.0.0-CI{build}
|
||||
|
||||
clone_depth: 10
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ param(
|
||||
[Parameter(Position = 0)]
|
||||
[string] $Target = "vs2015",
|
||||
[Parameter(Position = 1)]
|
||||
[string] $Version = "64.0.0",
|
||||
[string] $Version = "65.0.0",
|
||||
[Parameter(Position = 2)]
|
||||
[string] $AssemblyVersion = "64.0.0"
|
||||
[string] $AssemblyVersion = "65.0.0"
|
||||
)
|
||||
|
||||
$WorkingDir = split-path -parent $MyInvocation.MyCommand.Definition
|
||||
|
||||
Reference in New Issue
Block a user