Revert "Merged all Chromoting Host code into remoting_core.dll (Windows)."
[chromium-blink-merge.git] / remoting / host / win / elevated_controller_module.cc
blob620901c70a511034bdae7147aeff4710347be038
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 <atlbase.h>
6 #include <atlcom.h>
7 #include <atlctl.h>
9 #include "base/at_exit.h"
10 #include "base/command_line.h"
11 #include "remoting/base/breakpad.h"
12 #include "remoting/host/logging.h"
13 #include "remoting/host/usage_stats_consent.h"
15 // MIDL-generated declarations.
16 #include "remoting/host/win/elevated_controller.h"
18 namespace remoting {
20 class ElevatedControllerModule
21 : public ATL::CAtlExeModuleT<ElevatedControllerModule> {
22 public:
23 DECLARE_LIBID(LIBID_ChromotingElevatedControllerLib)
26 } // namespace remoting
29 remoting::ElevatedControllerModule _AtlModule;
31 int WINAPI WinMain(HINSTANCE instance, HINSTANCE, LPSTR, int command) {
32 #ifdef OFFICIAL_BUILD
33 if (remoting::IsUsageStatsAllowed()) {
34 remoting::InitializeCrashReporting();
36 #endif // OFFICIAL_BUILD
38 CommandLine::Init(0, NULL);
40 // Register and initialize common controls.
41 INITCOMMONCONTROLSEX info;
42 info.dwSize = sizeof(info);
43 info.dwICC = ICC_STANDARD_CLASSES;
44 InitCommonControlsEx(&info);
46 // This object instance is required by Chrome code (for example,
47 // FilePath, LazyInstance, MessageLoop).
48 base::AtExitManager exit_manager;
50 remoting::InitHostLogging();
52 return _AtlModule.WinMain(command);