OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // This file implements a standalone host process for Me2Me. | 5 // This file implements a standalone host process for Me2Me. |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/file_path.h" | 13 #include "base/file_path.h" |
14 #include "base/file_util.h" | 14 #include "base/file_util.h" |
15 #include "base/files/file_path_watcher.h" | 15 #include "base/files/file_path_watcher.h" |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
18 #include "base/message_loop.h" | 18 #include "base/message_loop.h" |
19 #include "base/synchronization/waitable_event.h" | 19 #include "base/synchronization/waitable_event.h" |
20 #include "base/threading/thread.h" | 20 #include "base/threading/thread.h" |
21 #include "build/build_config.h" | 21 #include "build/build_config.h" |
22 #include "crypto/nss_util.h" | 22 #include "crypto/nss_util.h" |
23 #include "net/base/network_change_notifier.h" | 23 #include "net/base/network_change_notifier.h" |
| 24 #include "remoting/base/breakpad.h" |
24 #include "remoting/base/constants.h" | 25 #include "remoting/base/constants.h" |
25 #include "remoting/host/branding.h" | 26 #include "remoting/host/branding.h" |
| 27 #include "remoting/host/breakpad.h" |
26 #include "remoting/host/constants.h" | 28 #include "remoting/host/constants.h" |
27 #include "remoting/host/capturer.h" | 29 #include "remoting/host/capturer.h" |
28 #include "remoting/host/chromoting_host.h" | 30 #include "remoting/host/chromoting_host.h" |
29 #include "remoting/host/chromoting_host_context.h" | 31 #include "remoting/host/chromoting_host_context.h" |
30 #include "remoting/host/desktop_environment.h" | 32 #include "remoting/host/desktop_environment.h" |
31 #include "remoting/host/event_executor.h" | 33 #include "remoting/host/event_executor.h" |
32 #include "remoting/host/heartbeat_sender.h" | 34 #include "remoting/host/heartbeat_sender.h" |
33 #include "remoting/host/host_config.h" | 35 #include "remoting/host/host_config.h" |
34 #include "remoting/host/host_event_logger.h" | 36 #include "remoting/host/host_event_logger.h" |
35 #include "remoting/host/host_user_interface.h" | 37 #include "remoting/host/host_user_interface.h" |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 return me2me_host.Run(); | 552 return me2me_host.Run(); |
551 } | 553 } |
552 | 554 |
553 #if defined(OS_WIN) | 555 #if defined(OS_WIN) |
554 HMODULE g_hModule = NULL; | 556 HMODULE g_hModule = NULL; |
555 | 557 |
556 int CALLBACK WinMain(HINSTANCE instance, | 558 int CALLBACK WinMain(HINSTANCE instance, |
557 HINSTANCE previous_instance, | 559 HINSTANCE previous_instance, |
558 LPSTR command_line, | 560 LPSTR command_line, |
559 int show_command) { | 561 int show_command) { |
| 562 // Initializes the crash dump reports. |
| 563 if (remoting::IsCrashReportingEnabled()) { |
| 564 remoting::InitializeCrashReporting(); |
| 565 } |
| 566 |
560 g_hModule = instance; | 567 g_hModule = instance; |
561 | 568 |
562 // Register and initialize common controls. | 569 // Register and initialize common controls. |
563 INITCOMMONCONTROLSEX info; | 570 INITCOMMONCONTROLSEX info; |
564 info.dwSize = sizeof(info); | 571 info.dwSize = sizeof(info); |
565 info.dwICC = ICC_STANDARD_CLASSES; | 572 info.dwICC = ICC_STANDARD_CLASSES; |
566 InitCommonControlsEx(&info); | 573 InitCommonControlsEx(&info); |
567 | 574 |
568 // Mark the process as DPI-aware, so Windows won't scale coordinates in APIs. | 575 // Mark the process as DPI-aware, so Windows won't scale coordinates in APIs. |
569 SetProcessDPIAware(); | 576 SetProcessDPIAware(); |
570 | 577 |
571 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting | 578 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting |
572 // the command line from GetCommandLineW(), so we can safely pass NULL here. | 579 // the command line from GetCommandLineW(), so we can safely pass NULL here. |
573 return main(0, NULL); | 580 return main(0, NULL); |
574 } | 581 } |
575 | 582 |
576 #endif // defined(OS_WIN) | 583 #endif // defined(OS_WIN) |
OLD | NEW |