diff --git a/CefSharp.BrowserSubprocess.Core/Resource.rc b/CefSharp.BrowserSubprocess.Core/Resource.rc index a84eadd7ba..00f21f5f7f 100644 --- a/CefSharp.BrowserSubprocess.Core/Resource.rc +++ b/CefSharp.BrowserSubprocess.Core/Resource.rc @@ -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" diff --git a/CefSharp.BrowserSubprocess/app.manifest b/CefSharp.BrowserSubprocess/app.manifest index 286d6e6ec4..c4b27f85d4 100644 --- a/CefSharp.BrowserSubprocess/app.manifest +++ b/CefSharp.BrowserSubprocess/app.manifest @@ -8,7 +8,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.Core/Cef.h b/CefSharp.Core/Cef.h index dc9305c69c..6cfd320f8e 100644 --- a/CefSharp.Core/Cef.h +++ b/CefSharp.Core/Cef.h @@ -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(); } - - /// - /// 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. - /// - /// Returns 'best available' location info or, if the location update failed, with error info. - [[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 wrapper = callback == nullptr ? NULL : new CefGetGeolocationCallbackAdapter(callback); - - return CefGetGeolocation(wrapper); - } - - /// - /// 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. - /// - /// Returns 'best available' location info or, if the location update failed, with error info. - [[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^ GetGeolocationAsync() - { - auto callback = gcnew TaskGetGeolocationCallback(); - - GetGeolocation(callback); - - return callback->Task; - } - + /// /// Returns true if called on the specified CEF thread. /// diff --git a/CefSharp.Core/CefSharp.Core.vcxproj.filters b/CefSharp.Core/CefSharp.Core.vcxproj.filters index 5fe799855f..dd664dda80 100644 --- a/CefSharp.Core/CefSharp.Core.vcxproj.filters +++ b/CefSharp.Core/CefSharp.Core.vcxproj.filters @@ -157,9 +157,6 @@ Header Files - - Header Files - Header Files @@ -265,9 +262,6 @@ Header Files - - Header Files - Header Files diff --git a/CefSharp.Core/Internals/CefGeolocationCallbackWrapper.h b/CefSharp.Core/Internals/CefGeolocationCallbackWrapper.h deleted file mode 100644 index e88cdaaea6..0000000000 --- a/CefSharp.Core/Internals/CefGeolocationCallbackWrapper.h +++ /dev/null @@ -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 _callback; - - public: - CefGeolocationCallbackWrapper(CefRefPtr &callback) - : _callback(callback) - { - } - - !CefGeolocationCallbackWrapper() - { - _callback = NULL; - } - - ~CefGeolocationCallbackWrapper() - { - this->!CefGeolocationCallbackWrapper(); - - _disposed = true; - } - - virtual void Continue(bool allow) - { - ThrowIfDisposed(); - - _callback->Continue(allow); - - delete this; - } - }; - } -} - diff --git a/CefSharp.Core/Internals/CefGetGeolocationCallbackAdapter.h b/CefSharp.Core/Internals/CefGetGeolocationCallbackAdapter.h deleted file mode 100644 index 735223a896..0000000000 --- a/CefSharp.Core/Internals/CefGetGeolocationCallbackAdapter.h +++ /dev/null @@ -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 _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) - }; - } -} - - diff --git a/CefSharp.Core/Internals/ClientAdapter.cpp b/CefSharp.Core/Internals/ClientAdapter.cpp index 9864a79cbd..5b698d1f0f 100644 --- a/CefSharp.Core/Internals/ClientAdapter.cpp +++ b/CefSharp.Core/Internals/ClientAdapter.cpp @@ -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 browser, const CefString& requesting_url, int request_id, CefRefPtr 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 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 browser, CefRefPtr download_item, const CefString& suggested_name, CefRefPtr callback) { diff --git a/CefSharp.Core/Internals/ClientAdapter.h b/CefSharp.Core/Internals/ClientAdapter.h index 0d4653708d..1b22d5a4d6 100644 --- a/CefSharp.Core/Internals/ClientAdapter.h +++ b/CefSharp.Core/Internals/ClientAdapter.h @@ -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 GetJSDialogHandler() OVERRIDE { return this; } virtual DECL CefRefPtr GetDialogHandler() OVERRIDE { return this; } virtual DECL CefRefPtr GetDragHandler() OVERRIDE { return this; } - virtual DECL CefRefPtr GetGeolocationHandler() OVERRIDE { return this; } virtual DECL CefRefPtr GetFindHandler() OVERRIDE { return this; } virtual DECL bool OnProcessMessageReceived(CefRefPtr browser, CefProcessId source_process, CefRefPtr message) OVERRIDE; @@ -184,11 +182,6 @@ namespace CefSharp virtual DECL bool OnDragEnter(CefRefPtr browser, CefRefPtr dragData, DragOperationsMask mask) OVERRIDE; virtual DECL void OnDraggableRegionsChanged(CefRefPtr browser, const std::vector& regions) OVERRIDE; - //CefGeolocationHandler - virtual DECL bool OnRequestGeolocationPermission(CefRefPtr browser, const CefString& requesting_url, int request_id, - CefRefPtr callback) OVERRIDE; - virtual DECL void OnCancelGeolocationPermission(CefRefPtr browser, int request_id) OVERRIDE; - //CefDownloadHandler virtual DECL void OnBeforeDownload(CefRefPtr browser, CefRefPtr download_item, const CefString& suggested_name, CefRefPtr callback) OVERRIDE; diff --git a/CefSharp.Core/Resource.rc b/CefSharp.Core/Resource.rc index 984350af00..b618ddaa84 100644 --- a/CefSharp.Core/Resource.rc +++ b/CefSharp.Core/Resource.rc @@ -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" diff --git a/CefSharp.OffScreen.Example/app.manifest b/CefSharp.OffScreen.Example/app.manifest index 55fe5cd8d4..37f04d52fb 100644 --- a/CefSharp.OffScreen.Example/app.manifest +++ b/CefSharp.OffScreen.Example/app.manifest @@ -7,7 +7,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.OffScreen/ChromiumWebBrowser.cs b/CefSharp.OffScreen/ChromiumWebBrowser.cs index 5bc857c532..8fd4845654 100644 --- a/CefSharp.OffScreen/ChromiumWebBrowser.cs +++ b/CefSharp.OffScreen/ChromiumWebBrowser.cs @@ -174,11 +174,6 @@ public class ChromiumWebBrowser : IRenderWebBrowser /// The resource handler factory. public IResourceHandlerFactory ResourceHandlerFactory { get; set; } /// - /// Implement and assign to handle requests for permission to use geolocation. - /// - /// The geolocation handler. - public IGeolocationHandler GeolocationHandler { get; set; } - /// /// Implement and assign to handle messages from the render process. /// /// The render process message handler. diff --git a/CefSharp.WinForms.Example/BrowserTabUserControl.cs b/CefSharp.WinForms.Example/BrowserTabUserControl.cs index b01e4993db..4a98ed9874 100644 --- a/CefSharp.WinForms.Example/BrowserTabUserControl.cs +++ b/CefSharp.WinForms.Example/BrowserTabUserControl.cs @@ -38,7 +38,6 @@ public BrowserTabUserControl(Action openNewTab, string url, bool m browser.MenuHandler = new MenuHandler(); browser.RequestHandler = new WinFormsRequestHandler(openNewTab); browser.JsDialogHandler = new JsDialogHandler(); - browser.GeolocationHandler = new GeolocationHandler(); browser.DownloadHandler = new DownloadHandler(); if (multiThreadedMessageLoopEnabled) { diff --git a/CefSharp.WinForms.Example/Handlers/GeolocationHandler.cs b/CefSharp.WinForms.Example/Handlers/GeolocationHandler.cs deleted file mode 100644 index b797cd84a1..0000000000 --- a/CefSharp.WinForms.Example/Handlers/GeolocationHandler.cs +++ /dev/null @@ -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) - { - } - } -} diff --git a/CefSharp.WinForms.Example/app.manifest b/CefSharp.WinForms.Example/app.manifest index cbb321a28a..4b83c0be25 100644 --- a/CefSharp.WinForms.Example/app.manifest +++ b/CefSharp.WinForms.Example/app.manifest @@ -8,7 +8,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.WinForms/ChromiumWebBrowser.cs b/CefSharp.WinForms/ChromiumWebBrowser.cs index c8b75361d2..26beb5842b 100644 --- a/CefSharp.WinForms/ChromiumWebBrowser.cs +++ b/CefSharp.WinForms/ChromiumWebBrowser.cs @@ -205,13 +205,7 @@ public IRequestContext RequestContext /// The resource handler factory. [Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(null)] public IResourceHandlerFactory ResourceHandlerFactory { get; set; } - /// - /// Implement and assign to handle requests for permission to use geolocation. - /// - /// The geolocation handler. - [Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(null)] - public IGeolocationHandler GeolocationHandler { get; set; } - + /// /// 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 diff --git a/CefSharp.Wpf.Example/Handlers/GeolocationHandler.cs b/CefSharp.Wpf.Example/Handlers/GeolocationHandler.cs deleted file mode 100644 index 4d38424384..0000000000 --- a/CefSharp.Wpf.Example/Handlers/GeolocationHandler.cs +++ /dev/null @@ -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) - { - } - } -} diff --git a/CefSharp.Wpf.Example/Views/BrowserTabView.xaml.cs b/CefSharp.Wpf.Example/Views/BrowserTabView.xaml.cs index ba190ff22a..856c4bce97 100644 --- a/CefSharp.Wpf.Example/Views/BrowserTabView.xaml.cs +++ b/CefSharp.Wpf.Example/Views/BrowserTabView.xaml.cs @@ -88,7 +88,6 @@ public BrowserTabView() 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; diff --git a/CefSharp.Wpf.Example/app.manifest b/CefSharp.Wpf.Example/app.manifest index c76cf6c890..39891ca158 100644 --- a/CefSharp.Wpf.Example/app.manifest +++ b/CefSharp.Wpf.Example/app.manifest @@ -7,7 +7,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs index 546b5be472..00c4f2c932 100644 --- a/CefSharp.Wpf/ChromiumWebBrowser.cs +++ b/CefSharp.Wpf/ChromiumWebBrowser.cs @@ -188,11 +188,6 @@ public IRequestContext RequestContext /// The resource handler factory. public IResourceHandlerFactory ResourceHandlerFactory { get; set; } /// - /// Implement and assign to handle requests for permission to use geolocation. - /// - /// The geolocation handler. - public IGeolocationHandler GeolocationHandler { get; set; } - /// /// Gets or sets the bitmap factory. /// /// The bitmap factory. diff --git a/CefSharp/Callback/IGeolocationCallback.cs b/CefSharp/Callback/IGeolocationCallback.cs deleted file mode 100644 index 880f52a53d..0000000000 --- a/CefSharp/Callback/IGeolocationCallback.cs +++ /dev/null @@ -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 -{ - /// - /// Callback interface used for asynchronous continuation of geolocation permission requests. - /// - public interface IGeolocationCallback : IDisposable - { - /// - /// Call to allow or deny geolocation access. - /// - /// true to allow - void Continue(bool allow); - - /// - /// Gets a value indicating whether the callback has been disposed of. - /// - bool IsDisposed { get; } - } -} diff --git a/CefSharp/Callback/IGetGeolocationCallback.cs b/CefSharp/Callback/IGetGeolocationCallback.cs deleted file mode 100644 index 9edbed7e90..0000000000 --- a/CefSharp/Callback/IGetGeolocationCallback.cs +++ /dev/null @@ -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 -{ - /// - /// Implement this interface to receive geolocation updates. The methods of this - /// class will be called on the CEF UI thread. - /// - public interface IGetGeolocationCallback : IDisposable - { - /// - /// Called with the 'best available' location information or, - /// if the location update failed, with error information. - /// - /// geo position - void OnLocationUpdate(Geoposition position); - - /// - /// Gets a value indicating whether the callback has been disposed of. - /// - bool IsDisposed { get; } - } -} \ No newline at end of file diff --git a/CefSharp/Callback/TaskGetGeolocationCallback.cs b/CefSharp/Callback/TaskGetGeolocationCallback.cs deleted file mode 100644 index 46e122013c..0000000000 --- a/CefSharp/Callback/TaskGetGeolocationCallback.cs +++ /dev/null @@ -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 -{ - /// - /// Provides a callback implementation of for use with geo positioning - /// - public class TaskGetGeolocationCallback : IGetGeolocationCallback - { - private readonly TaskCompletionSource taskCompletionSource; - private bool hasData; - private volatile bool isDisposed; - - public TaskGetGeolocationCallback() - { - taskCompletionSource = new TaskCompletionSource(); - } - - void IGetGeolocationCallback.OnLocationUpdate(Geoposition position) - { - taskCompletionSource.TrySetResultAsync(position); - - hasData = true; - } - - bool IGetGeolocationCallback.IsDisposed - { - get { return isDisposed; } - } - - public Task 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; - } - } -} diff --git a/CefSharp/CefSharp.csproj b/CefSharp/CefSharp.csproj index 8117a72f88..0bb5bf50f8 100644 --- a/CefSharp/CefSharp.csproj +++ b/CefSharp/CefSharp.csproj @@ -79,8 +79,6 @@ - - @@ -90,7 +88,6 @@ - @@ -166,7 +163,6 @@ - diff --git a/CefSharp/Handler/IGeolocationHandler.cs b/CefSharp/Handler/IGeolocationHandler.cs deleted file mode 100644 index b856a58aad..0000000000 --- a/CefSharp/Handler/IGeolocationHandler.cs +++ /dev/null @@ -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 -{ - /// - /// Implement this interface to handle events related to geolocation permission requests. - /// The methods of this class will be called on the CEF UI thread. - /// - public interface IGeolocationHandler - { - /// - /// Called when a page requests permission to access geolocation information. - /// - /// the browser control - /// the browser object - /// the URL requesting permission - /// the unique ID for the permission request - /// Callback interface used for asynchronous continuation of geolocation permission requests. - /// 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. - bool OnRequestGeolocationPermission(IWebBrowser browserControl, IBrowser browser, string requestingUrl, int requestId, IGeolocationCallback callback); - - /// - /// Called when a geolocation access request is canceled. - /// - /// the browser control - /// the browser object - /// the unique ID for the permission request, as seen in - void OnCancelGeolocationPermission(IWebBrowser browserControl, IBrowser browser, int requestId); - } -} diff --git a/CefSharp/IWebBrowser.cs b/CefSharp/IWebBrowser.cs index a883e287bb..624ab74adc 100644 --- a/CefSharp/IWebBrowser.cs +++ b/CefSharp/IWebBrowser.cs @@ -175,14 +175,6 @@ public interface IWebBrowser : IDisposable /// The resource handler factory. IResourceHandlerFactory ResourceHandlerFactory { get; set; } - /// - /// Implement and assign to handle requests for permission to use geolocation. - /// - /// The geolocation handler. - [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; } - /// /// Implement and assign to handle messages from the render process. /// diff --git a/CefSharp/Internals/InternalWebBrowserExtensions.cs b/CefSharp/Internals/InternalWebBrowserExtensions.cs index 8d5906c36a..2163b76d99 100644 --- a/CefSharp/Internals/InternalWebBrowserExtensions.cs +++ b/CefSharp/Internals/InternalWebBrowserExtensions.cs @@ -20,7 +20,6 @@ internal static void SetHandlersToNull(this IWebBrowserInternal browser) browser.MenuHandler = null; browser.FocusHandler = null; browser.ResourceHandlerFactory = null; - browser.GeolocationHandler = null; browser.RenderProcessMessageHandler = null; } } diff --git a/CefSharp/Properties/AssemblyInfo.cs b/CefSharp/Properties/AssemblyInfo.cs index 2c5f2edc9d..aab77c2f43 100644 --- a/CefSharp/Properties/AssemblyInfo.cs +++ b/CefSharp/Properties/AssemblyInfo.cs @@ -34,9 +34,9 @@ public static class AssemblyInfo 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; diff --git a/appveyor.yml b/appveyor.yml index 76d327e3cb..a408f17539 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,6 @@ image: Visual Studio 2015 -version: 64.0.0-CI{build} +version: 65.0.0-CI{build} clone_depth: 10 diff --git a/build.ps1 b/build.ps1 index 72db6b39a2..4ce2d1e9da 100644 --- a/build.ps1 +++ b/build.ps1 @@ -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