Move generic_handler.* to content\browser\webui since it's needed by all webui pages.
[chromium-blink-merge.git] / remoting / host / win / elevated_controller_module.cc
blob315da8faa20905da3ba483695524e1983c62d95e
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"
7 #include <atlbase.h>
8 #include <atlcom.h>
9 #include <atlctl.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"
18 namespace remoting {
20 class ElevatedControllerModule
21 : public ATL::CAtlExeModuleT<ElevatedControllerModule> {
22 public:
23 DECLARE_LIBID(LIBID_ChromotingElevatedControllerLib)
26 int ElevatedControllerMain() {
27 #ifdef OFFICIAL_BUILD
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;
45 InitHostLogging();
47 ElevatedControllerModule module;
48 return module.WinMain(SW_HIDE);
51 } // namespace remoting