BrowserSubprocess - Namespace cleanup

Possibly a few cases that were missed, this should be the bulk of the rename

Resolves #3253
This commit is contained in:
Alex Maitland
2021-02-27 12:11:35 +10:00
parent 0ca3a92700
commit e3e4c3fe35
39 changed files with 1897 additions and 1831 deletions
@@ -11,31 +11,34 @@ using namespace CefSharp::Internals::Wcf;
namespace CefSharp
{
private class JavascriptMethodHandler : public CefV8Handler
namespace BrowserSubprocess
{
private:
gcroot<Func<array<Object^>^, BrowserProcessResponse^>^> _method;
gcroot<JavascriptCallbackRegistry^> _callbackRegistry;
public:
JavascriptMethodHandler(Func<array<Object^>^, BrowserProcessResponse^>^ method, JavascriptCallbackRegistry^ callbackRegistry)
private class JavascriptMethodHandler : public CefV8Handler
{
_method = method;
_callbackRegistry = callbackRegistry;
}
private:
gcroot<Func<array<Object^>^, BrowserProcessResponse^>^> _method;
gcroot<JavascriptCallbackRegistry^> _callbackRegistry;
~JavascriptMethodHandler()
{
delete _method;
// The callback registry is a shared instance among all method handlers (async & sync).
// It's lifecycle is managed in the JavascriptRootObjectWrapper.
_callbackRegistry = nullptr;
}
public:
JavascriptMethodHandler(Func<array<Object^>^, BrowserProcessResponse^>^ method, JavascriptCallbackRegistry^ callbackRegistry)
{
_method = method;
_callbackRegistry = callbackRegistry;
}
virtual bool Execute(const CefString& name, CefRefPtr<CefV8Value> object, const CefV8ValueList& arguments, CefRefPtr<CefV8Value>& retval, CefString& exception) OVERRIDE;
~JavascriptMethodHandler()
{
delete _method;
// The callback registry is a shared instance among all method handlers (async & sync).
// It's lifecycle is managed in the JavascriptRootObjectWrapper.
_callbackRegistry = nullptr;
}
CefRefPtr<CefV8Value> ConvertToCefObject(Object^ obj);
virtual bool Execute(const CefString& name, CefRefPtr<CefV8Value> object, const CefV8ValueList& arguments, CefRefPtr<CefV8Value>& retval, CefString& exception) OVERRIDE;
IMPLEMENT_REFCOUNTING(JavascriptMethodHandler);
};
CefRefPtr<CefV8Value> ConvertToCefObject(Object^ obj);
IMPLEMENT_REFCOUNTING(JavascriptMethodHandler);
};
}
}