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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
--- remoting/host/remoting_me2me_host.cc.orig 2017-08-10 16:32:38.654771000 +0200
+++ remoting/host/remoting_me2me_host.cc 2017-08-10 16:35:22.486945000 +0200
@@ -115,7 +115,7 @@
#include "base/mac/scoped_cftyperef.h"
#endif // defined(OS_MACOSX)
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
#include <gtk/gtk.h>
#include <X11/Xlib.h>
#undef Status // Xlib.h #defines this, which breaks protobuf headers.
@@ -157,7 +157,7 @@
const char kStdinConfigPath[] = "-";
#endif // !defined(REMOTING_MULTI_PROCESS)
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
// The command line switch used to pass name of the pipe to capture audio on
// linux.
const char kAudioPipeSwitchName[] = "audio-pipe-name";
@@ -346,7 +346,7 @@
std::unique_ptr<ChromotingHostContext> context_;
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
// Watch for certificate changes and kill the host when changes occur
std::unique_ptr<CertificateWatcher> cert_watcher_;
#endif
@@ -540,7 +540,7 @@
enable_window_capture_ = cmd_line->HasSwitch(kWindowIdSwitchName);
if (enable_window_capture_) {
-#if defined(OS_LINUX) || defined(OS_WIN)
+#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
LOG(WARNING) << "Window capturing is not fully supported on Linux or "
"Windows.";
#endif // defined(OS_LINUX) || defined(OS_WIN)
@@ -736,7 +736,7 @@
DCHECK(third_party_auth_config_.token_url.is_valid());
DCHECK(third_party_auth_config_.token_validation_url.is_valid());
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
if (!cert_watcher_) {
cert_watcher_.reset(new CertificateWatcher(
base::Bind(&HostProcess::ShutdownHost, this, kSuccessExitCode),
@@ -815,7 +815,7 @@
base::Bind(&HostProcess::OnPolicyUpdate, base::Unretained(this)),
base::Bind(&HostProcess::OnPolicyError, base::Unretained(this)));
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
// If an audio pipe is specific on the command-line then initialize
// AudioCapturerLinux to capture from it.
base::FilePath audio_pipe_name = base::CommandLine::ForCurrentProcess()->
@@ -880,7 +880,7 @@
// It is now safe for the HostProcess to be deleted.
self_ = nullptr;
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
// Cause the global AudioPipeReader to be freed, otherwise the audio
// thread will remain in-use and prevent the process from exiting.
// TODO(wez): DesktopEnvironmentFactory should own the pipe reader.
@@ -1494,7 +1494,7 @@
}
// TODO(simonmorris): Get the maximum session duration from a policy.
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
host_->SetMaximumSessionDuration(base::TimeDelta::FromHours(20));
#endif
@@ -1654,7 +1654,7 @@
int HostProcessMain() {
HOST_LOG << "Starting host process: version " << STRINGIZE(VERSION);
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
// Required in order for us to run multiple X11 threads.
XInitThreads();
|