forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.h
57 lines (44 loc) · 1.14 KB
/
main.h
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef WEBLAYER_PUBLIC_MAIN_H_
#define WEBLAYER_PUBLIC_MAIN_H_
#include <string>
#include "base/callback_forward.h"
#include "base/files/file.h"
#include "build/build_config.h"
#if defined(OS_WIN)
#include <windows.h>
#endif
namespace weblayer {
class MainDelegate {
public:
virtual void PreMainMessageLoopRun() = 0;
virtual void PostMainMessageLoopRun() = 0;
virtual void SetMainMessageLoopQuitClosure(
base::OnceClosure quit_closure) = 0;
};
struct MainParams {
MainParams();
MainParams(const MainParams& other);
~MainParams();
MainDelegate* delegate;
// If set, logging will redirect to this file.
base::FilePath log_filename;
// The name of the file that has the PAK data.
std::string pak_name;
};
int Main(MainParams params
#if defined(OS_WIN)
#if !defined(WIN_CONSOLE_APP)
,
HINSTANCE instance
#endif
#else
,
int argc,
const char** argv
#endif
);
} // namespace weblayer
#endif // WEBLAYER_PUBLIC_MAIN_H_