Files
cefsharp/CefSharp/Internals/IBrowserAdapter.cs
T
Alex Maitland fe98124c9b Async JavascriptBinding - Add support for returning Task (#2771)
* Async JavascriptBinding - Add support for returning Task

Remove Parallel Task execution code from MethodRunnerQueue
Add ParallelMethodRunnerQueue
  - For the new code path the Func is executed, if the Result is a generic Task we wait for it's completion
  - If the task is not generic then we return immediately

This is only enabled when CefSharpSettings.ConcurrentTaskExecution = true;
* MethodRunnerQueue - Display error message when method returns Task
* ParallelMethodRunnerQueue - Rename to ConcurrentMethodRunnerQueue
* MethodRunnerQueue - Improve formatting of error message when method returns Task
* Async JavascriptBinding Return Task - Add Basic xUnit Test

Very quick test, needs to be refined a little. The basics are working as expected.

* Add Binding Test Async Task Example to the WPF Example menu

* Async JSB Task - Add additional tests and improve error messaging
2019-06-08 17:21:49 +10:00

22 lines
799 B
C#

// Copyright © 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.
namespace CefSharp.Internals
{
/// <summary>
/// Interface used to break reference cycles in CefSharp.Core C++ code.
/// This will ALWAYS be a ManagedCefBrowserAdapter instance.
/// </summary>
public interface IBrowserAdapter
{
IMethodRunnerQueue MethodRunnerQueue { get; }
JavascriptObjectRepository JavascriptObjectRepository { get; }
IJavascriptCallbackFactory JavascriptCallbackFactory { get; }
void OnAfterBrowserCreated(IBrowser browser);
IBrowser GetBrowser(int browserId);
bool IsDisposed { get; }
void Resize(int width, int height);
}
}