| 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" |
| 21 #endif | 22 #endif |
| 22 | 23 |
| 23 #if defined(OS_WIN) | 24 #if defined(OS_WIN) |
| 24 #include "base/debug/dump_without_crashing.h" | 25 #include "base/debug/dump_without_crashing.h" |
| 25 #include "base/win/win_util.h" | 26 #include "base/win/win_util.h" |
| 26 #include "chrome/common/chrome_constants.h" | 27 #include "chrome/common/chrome_constants.h" |
| 27 #include "chrome/install_static/install_details.h" | 28 #include "chrome/install_static/install_details.h" |
| 28 | 29 |
| 29 #define DLLEXPORT __declspec(dllexport) | 30 #define DLLEXPORT __declspec(dllexport) |
| 30 | 31 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 return headless::HeadlessShellMain(argc, argv); | 97 return headless::HeadlessShellMain(argc, argv); |
| 97 #endif // defined(OS_LINUX) | 98 #endif // defined(OS_LINUX) |
| 98 | 99 |
| 99 #if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) | 100 #if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) |
| 100 version_info::Channel channel = chrome::GetChannel(); | 101 version_info::Channel channel = chrome::GetChannel(); |
| 101 if (channel == version_info::Channel::CANARY || | 102 if (channel == version_info::Channel::CANARY || |
| 102 channel == version_info::Channel::UNKNOWN) { | 103 channel == version_info::Channel::UNKNOWN) { |
| 103 if (command_line->HasSwitch("mash")) | 104 if (command_line->HasSwitch("mash")) |
| 104 return MashMain(); | 105 return MashMain(); |
| 105 WaitForMashDebuggerIfNecessary(); | 106 WaitForMashDebuggerIfNecessary(); |
| 107 if (service_manager::ServiceManagerIsRemote()) |
| 108 params.env_mode = aura::Env::Mode::MUS; |
| 106 } | 109 } |
| 107 #endif // BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) | 110 #endif // BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) |
| 108 | 111 |
| 109 int rv = content::ContentMain(params); | 112 int rv = content::ContentMain(params); |
| 110 | 113 |
| 111 #if defined(OS_WIN) | 114 #if defined(OS_WIN) |
| 112 base::win::SetShouldCrashOnProcessDetach(false); | 115 base::win::SetShouldCrashOnProcessDetach(false); |
| 113 #endif | 116 #endif |
| 114 | 117 |
| 115 return rv; | 118 return rv; |
| 116 } | 119 } |
| OLD | NEW |