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 #include <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "chrome/app/chrome_main_delegate.h" | 10 #include "chrome/app/chrome_main_delegate.h" |
11 #include "chrome/common/features.h" | 11 #include "chrome/common/features.h" |
12 #include "content/public/app/content_main.h" | 12 #include "content/public/app/content_main.h" |
13 #include "content/public/common/content_switches.h" | 13 #include "content/public/common/content_switches.h" |
14 #include "headless/public/headless_shell.h" | 14 #include "headless/public/headless_shell.h" |
15 #include "ui/gfx/switches.h" | 15 #include "ui/gfx/switches.h" |
16 | 16 |
17 #if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) | 17 #if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) |
18 #include "chrome/app/mash/mash_runner.h" | 18 #include "chrome/app/mash/mash_runner.h" |
19 #include "chrome/common/channel_info.h" | 19 #include "chrome/common/channel_info.h" |
20 #include "components/version_info/version_info.h" | 20 #include "components/version_info/version_info.h" |
21 #include "services/service_manager/runner/common/client_util.h" | |
22 #endif | 21 #endif |
23 | 22 |
24 #if defined(OS_WIN) | 23 #if defined(OS_WIN) |
25 #include "base/debug/dump_without_crashing.h" | 24 #include "base/debug/dump_without_crashing.h" |
26 #include "base/win/win_util.h" | 25 #include "base/win/win_util.h" |
27 #include "chrome/common/chrome_constants.h" | 26 #include "chrome/common/chrome_constants.h" |
28 #include "chrome/install_static/install_details.h" | 27 #include "chrome/install_static/install_details.h" |
29 | 28 |
30 #define DLLEXPORT __declspec(dllexport) | 29 #define DLLEXPORT __declspec(dllexport) |
31 | 30 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 return headless::HeadlessShellMain(argc, argv); | 96 return headless::HeadlessShellMain(argc, argv); |
98 #endif // defined(OS_LINUX) | 97 #endif // defined(OS_LINUX) |
99 | 98 |
100 #if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) | 99 #if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) |
101 version_info::Channel channel = chrome::GetChannel(); | 100 version_info::Channel channel = chrome::GetChannel(); |
102 if (channel == version_info::Channel::CANARY || | 101 if (channel == version_info::Channel::CANARY || |
103 channel == version_info::Channel::UNKNOWN) { | 102 channel == version_info::Channel::UNKNOWN) { |
104 if (command_line->HasSwitch("mash")) | 103 if (command_line->HasSwitch("mash")) |
105 return MashMain(); | 104 return MashMain(); |
106 WaitForMashDebuggerIfNecessary(); | 105 WaitForMashDebuggerIfNecessary(); |
107 if (service_manager::ServiceManagerIsRemote()) | |
108 params.env_mode = aura::Env::Mode::MUS; | |
109 } | 106 } |
110 #endif // BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) | 107 #endif // BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) |
111 | 108 |
112 int rv = content::ContentMain(params); | 109 int rv = content::ContentMain(params); |
113 | 110 |
114 #if defined(OS_WIN) | 111 #if defined(OS_WIN) |
115 base::win::SetShouldCrashOnProcessDetach(false); | 112 base::win::SetShouldCrashOnProcessDetach(false); |
116 #endif | 113 #endif |
117 | 114 |
118 return rv; | 115 return rv; |
119 } | 116 } |
OLD | NEW |