Started working on #159. We now have a dummy (WCF) service in the subprocess, which we are able to call from the main process. The next step is to try and make it execute Javascript in the proper CefFrame. Might not be so incredibly simple, but we'll have to give it a try and see.

This commit is contained in:
Per Lundberg
2013-08-28 23:01:46 +03:00
parent 9eafcb469d
commit d5d3c1eccc
8 changed files with 122 additions and 12 deletions
@@ -3,10 +3,37 @@
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#include "include/cef_app.h"
#include "JavascriptProxy.h"
using namespace CefSharp::Internals::JavascriptBinding;
using namespace CefSharp::BrowserSubprocess;
using namespace System;
using namespace System::ServiceModel;
using namespace System::Threading;
static void threadEntryPoint();
int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
auto thread = gcnew Thread(gcnew ThreadStart(threadEntryPoint));
thread->Start();
CefMainArgs main_args(hInstance);
CefRefPtr<CefApp> app;
return CefExecuteProcess(main_args, app);
}
void threadEntryPoint()
{
auto uris = gcnew array<Uri^>(1);
uris[0] = gcnew Uri(JavascriptProxy::BaseAddress);
auto host = gcnew ServiceHost(JavascriptProxy::typeid, uris);
host->AddServiceEndpoint(
IJavascriptProxy::typeid,
gcnew NetNamedPipeBinding(),
JavascriptProxy::ServiceName
);
host->Open();
}