summaryrefslogtreecommitdiffstats
path: root/src/core/content_main_delegate_qt.h
blob: f88c3dea0365bbc698d26e169a76143c4f3f83af (plain)
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) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#ifndef CONTENT_MAIN_DELEGATE_QT_H
#define CONTENT_MAIN_DELEGATE_QT_H

#include "content/public/app/content_main_delegate.h"

#include "compositor/content_gpu_client_qt.h"
#include "content_browser_client_qt.h"
#include "content_client_qt.h"
#include "content_utility_client_qt.h"

namespace QtWebEngineCore {

class ContentMainDelegateQt : public content::ContentMainDelegate
{
public:

    // This is where the embedder puts all of its startup code that needs to run
    // before the sandbox is engaged.
    void PreSandboxStartup() override;
    void PostEarlyInitialization(bool) override;

    content::ContentClient *CreateContentClient() override;
    content::ContentBrowserClient* CreateContentBrowserClient() override;
    content::ContentGpuClient* CreateContentGpuClient() override;
    content::ContentRendererClient* CreateContentRendererClient() override;
    content::ContentUtilityClient* CreateContentUtilityClient() override;
    bool BasicStartupComplete(int* /*exit_code*/) override;

private:
    ContentClientQt m_contentClient;
    std::unique_ptr<ContentBrowserClientQt> m_browserClient;
    std::unique_ptr<ContentGpuClientQt> m_gpuClient;
    std::unique_ptr<ContentUtilityClientQt> m_utilityClient;
};

} // namespace QtWebEngineCore

#endif // CONTENT_MAIN_DELEGATE_QT_H