-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add IRequestContext.ResolveHostCached Both methods are for DNS -> IPAddress resolution https://bitbucket.org/chromiumembedded/cef/commits/ce1e9e65fd3f5a075cac924ed987165bb4641d9d?at=master
- Loading branch information
Showing
7 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright © 2010-2016 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_request_context.h" | ||
|
||
namespace CefSharp | ||
{ | ||
private class CefResolveCallbackAdapter : public CefResolveCallback | ||
{ | ||
private: | ||
gcroot<IResolveCallback^> _handler; | ||
|
||
public: | ||
CefResolveCallbackAdapter(IResolveCallback^ handler) | ||
{ | ||
_handler = handler; | ||
} | ||
|
||
~CefResolveCallbackAdapter() | ||
{ | ||
_handler = nullptr; | ||
} | ||
|
||
void OnResolveCompleted(cef_errorcode_t result, const std::vector<CefString>& resolvedIps) OVERRIDE | ||
{ | ||
_handler->OnResolveCompleted((CefErrorCode)result, StringUtils::ToClr(resolvedIps)); | ||
} | ||
|
||
IMPLEMENT_REFCOUNTING(CefResolveCallbackAdapter); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright © 2010-2016 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.Collections.Generic; | ||
|
||
namespace CefSharp | ||
{ | ||
public interface IResolveCallback : IDisposable | ||
{ | ||
/// <summary> | ||
/// Called after the ResolveHost request has completed. | ||
/// </summary> | ||
/// <param name="result">The result code</param> | ||
/// <param name="resolvedIpAddresses">will be the list of resolved IP addresses or | ||
/// null if the resolution failed.</param> | ||
void OnResolveCompleted(CefErrorCode result, IList<string> resolvedIpAddresses); | ||
|
||
/// <summary> | ||
/// Gets a value indicating whether the callback has been disposed of. | ||
/// </summary> | ||
bool IsDisposed { get; } | ||
} | ||
} |