1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "remoting/host/win/elevated_controller_module.h"
11 #include "base/at_exit.h"
12 #include "base/command_line.h"
13 #include "remoting/base/breakpad.h"
14 #include "remoting/host/logging.h"
15 #include "remoting/host/usage_stats_consent.h"
16 #include "remoting/host/win/elevated_controller.h"
20 class ElevatedControllerModule
21 : public ATL::CAtlExeModuleT
<ElevatedControllerModule
> {
23 DECLARE_LIBID(LIBID_ChromotingElevatedControllerLib
)
26 int ElevatedControllerMain() {
28 if (IsUsageStatsAllowed()) {
29 InitializeCrashReporting();
31 #endif // OFFICIAL_BUILD
33 CommandLine::Init(0, NULL
);
35 // Register and initialize common controls.
36 INITCOMMONCONTROLSEX info
;
37 info
.dwSize
= sizeof(info
);
38 info
.dwICC
= ICC_STANDARD_CLASSES
;
39 InitCommonControlsEx(&info
);
41 // This object instance is required by Chrome code (for example,
42 // FilePath, LazyInstance, MessageLoop).
43 base::AtExitManager exit_manager
;
47 ElevatedControllerModule module
;
48 return module
.WinMain(SW_HIDE
);
51 } // namespace remoting