forked from chromiumembedded/cef-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp_subprocess_impl.cc
More file actions
41 lines (30 loc) · 1.07 KB
/
app_subprocess_impl.cc
File metadata and controls
41 lines (30 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Copyright (c) 2017 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 "examples/shared/app_factory.h"
#include "examples/scheme_handler/scheme_strings.h"
namespace scheme_handler {
// Implementation of CefApp for all subprocesses.
class SubprocessApp : public CefApp {
public:
SubprocessApp() {}
// CefApp methods:
void OnRegisterCustomSchemes(
CefRawPtr<CefSchemeRegistrar> registrar) override {
// Register the custom scheme as standard and secure.
// Must be the same implementation in all processes.
registrar->AddCustomScheme(kScheme, kSchemeRegistrationOptions);
}
private:
IMPLEMENT_REFCOUNTING(SubprocessApp);
DISALLOW_COPY_AND_ASSIGN(SubprocessApp);
};
} // namespace scheme_handler
namespace shared {
CefRefPtr<CefApp> CreateRendererProcessApp() {
return new scheme_handler::SubprocessApp();
}
CefRefPtr<CefApp> CreateOtherProcessApp() {
return new scheme_handler::SubprocessApp();
}
} // namespace shared