48 lines
1.3 KiB
C++
48 lines
1.3 KiB
C++
|
// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
|
||
|
// reserved. Use of this source code is governed by a BSD-style license that
|
||
|
// can be found in the LICENSE file.
|
||
|
|
||
|
#include "CEF/HumanApp.h"
|
||
|
|
||
|
#include <sstream>
|
||
|
#include <string>
|
||
|
|
||
|
#include "include/base/cef_callback.h"
|
||
|
#include "include/cef_app.h"
|
||
|
#include "include/cef_parser.h"
|
||
|
#include "include/views/cef_browser_view.h"
|
||
|
#include "include/views/cef_window.h"
|
||
|
#include "include/wrapper/cef_closure_task.h"
|
||
|
#include "include/wrapper/cef_helpers.h"
|
||
|
|
||
|
const char kProcessType[] = "type";
|
||
|
const char kRendererProcess[] = "renderer";
|
||
|
|
||
|
|
||
|
HumanApp::HumanApp() {}
|
||
|
|
||
|
// static
|
||
|
HumanApp::ProcessType HumanApp::GetProcessType(
|
||
|
CefRefPtr<CefCommandLine> command_line) {
|
||
|
// The command-line flag won't be specified for the browser process.
|
||
|
if (!command_line->HasSwitch(kProcessType))
|
||
|
return BrowserProcess;
|
||
|
|
||
|
const std::string& process_type = command_line->GetSwitchValue(kProcessType);
|
||
|
if (process_type == kRendererProcess)
|
||
|
return RendererProcess;
|
||
|
|
||
|
return OtherProcess;
|
||
|
}
|
||
|
|
||
|
|
||
|
void HumanApp::RegisterCustomSchemes(CefRawPtr<CefSchemeRegistrar> registrar) {
|
||
|
|
||
|
}
|
||
|
|
||
|
void HumanApp::OnRegisterCustomSchemes(
|
||
|
CefRawPtr<CefSchemeRegistrar> registrar) {
|
||
|
RegisterCustomSchemes(registrar);
|
||
|
}
|
||
|
|