Skip to content

Commit

Permalink
Remove Geolocation API and Upgrade version numbers to 65
Browse files Browse the repository at this point in the history
  • Loading branch information
amaitland committed Mar 17, 2018
1 parent 8eb9860 commit c37dbcd
Show file tree
Hide file tree
Showing 29 changed files with 22 additions and 465 deletions.
10 changes: 5 additions & 5 deletions CefSharp.BrowserSubprocess.Core/Resource.rc
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion CefSharp.BrowserSubprocess/app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
33 changes: 1 addition & 32 deletions CefSharp.Core/Cef.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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>
Expand Down
6 changes: 0 additions & 6 deletions CefSharp.Core/CefSharp.Core.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
51 changes: 0 additions & 51 deletions CefSharp.Core/Internals/CefGeolocationCallbackWrapper.h

This file was deleted.

66 changes: 0 additions & 66 deletions CefSharp.Core/Internals/CefGetGeolocationCallbackAdapter.h

This file was deleted.

28 changes: 0 additions & 28 deletions CefSharp.Core/Internals/ClientAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
{
Expand Down
7 changes: 0 additions & 7 deletions CefSharp.Core/Internals/ClientAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ namespace CefSharp
public CefJSDialogHandler,
public CefDialogHandler,
public CefDragHandler,
public CefGeolocationHandler,
public CefDownloadHandler,
public CefFindHandler
{
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions CefSharp.Core/Resource.rc
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion CefSharp.OffScreen.Example/app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
5 changes: 0 additions & 5 deletions CefSharp.OffScreen/ChromiumWebBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,6 @@ public class ChromiumWebBrowser : IRenderWebBrowser
/// <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>
Expand Down
1 change: 0 additions & 1 deletion CefSharp.WinForms.Example/BrowserTabUserControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public BrowserTabUserControl(Action<string, int?> 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)
{
Expand Down
43 changes: 0 additions & 43 deletions CefSharp.WinForms.Example/Handlers/GeolocationHandler.cs

This file was deleted.

2 changes: 1 addition & 1 deletion CefSharp.WinForms.Example/app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Loading

0 comments on commit c37dbcd

Please sign in to comment.