1
0

CEF changes

This commit is contained in:
Scott E. Graves
2017-03-17 21:16:21 -05:00
parent 5eecff152c
commit 736cbce819
5 changed files with 39 additions and 1061 deletions

View File

@@ -17,7 +17,41 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
// Enable High-DPI support on Windows 7 or newer.
CefEnableHighDPISupport();
CSiaDriveApp app;
// Manage the life span of the sandbox information object. This is necessary
// for sandbox support on Windows. See cef_sandbox_win.h for complete details.
CefScopedSandboxInfo scopedSandbox;
void* sandboxInfo = scopedSandbox.sandboxInfo();
return 0;
// Provide CEF with command-line arguments.
CefMainArgs mainArgs(hInstance);
// CEF applications have multiple sub-processes (render, plugin, GPU, etc)
// that share the same executable. This function checks the command-line and,
// if this is a sub-process, executes the appropriate logic.
int ret = CefExecuteProcess(mainArgs, NULL, sandboxInfo);
if (ret < 0)
{
// Specify CEF global settings here.
CefSettings settings;
// SimpleApp implements application-level callbacks for the browser process.
// It will create the first browser instance in OnContextInitialized() after
// CEF has initialized.
CefRefPtr<CSiaDriveApp> app(new CSiaDriveApp);
// Initialize CEF.
CefInitialize(mainArgs, settings, app.get(), sandboxInfo);
// Run the CEF message loop. This will block until CefQuitMessageLoop() is
// called.
CefRunMessageLoop();
// Shut down CEF.
CefShutdown();
// Clean exit
ret = 0;
}
return ret;
}