OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "headless/lib/browser/headless_content_browser_client.h" | 5 #include "headless/lib/browser/headless_content_browser_client.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <unordered_set> | 8 #include <unordered_set> |
9 | 9 |
10 #include "base/base_switches.h" | 10 #include "base/base_switches.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "content/public/common/content_switches.h" | 21 #include "content/public/common/content_switches.h" |
22 #include "content/public/common/service_names.mojom.h" | 22 #include "content/public/common/service_names.mojom.h" |
23 #include "headless/grit/headless_lib_resources.h" | 23 #include "headless/grit/headless_lib_resources.h" |
24 #include "headless/lib/browser/headless_browser_context_impl.h" | 24 #include "headless/lib/browser/headless_browser_context_impl.h" |
25 #include "headless/lib/browser/headless_browser_impl.h" | 25 #include "headless/lib/browser/headless_browser_impl.h" |
26 #include "headless/lib/browser/headless_browser_main_parts.h" | 26 #include "headless/lib/browser/headless_browser_main_parts.h" |
27 #include "headless/lib/browser/headless_devtools_manager_delegate.h" | 27 #include "headless/lib/browser/headless_devtools_manager_delegate.h" |
28 #include "headless/lib/headless_macros.h" | 28 #include "headless/lib/headless_macros.h" |
29 #include "storage/browser/quota/quota_settings.h" | 29 #include "storage/browser/quota/quota_settings.h" |
30 #include "ui/base/resource/resource_bundle.h" | 30 #include "ui/base/resource/resource_bundle.h" |
31 #include "ui/gfx/switches.h" | |
32 | 31 |
33 #if defined(HEADLESS_USE_BREAKPAD) | 32 #if defined(HEADLESS_USE_BREAKPAD) |
34 #include "base/debug/leak_annotations.h" | 33 #include "base/debug/leak_annotations.h" |
35 #include "components/crash/content/app/breakpad_linux.h" | 34 #include "components/crash/content/app/breakpad_linux.h" |
36 #include "components/crash/content/browser/crash_handler_host_linux.h" | 35 #include "components/crash/content/browser/crash_handler_host_linux.h" |
37 #include "content/public/common/content_descriptors.h" | 36 #include "content/public/common/content_descriptors.h" |
38 #endif // defined(HEADLESS_USE_BREAKPAD) | 37 #endif // defined(HEADLESS_USE_BREAKPAD) |
39 | 38 |
40 namespace headless { | 39 namespace headless { |
41 | 40 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 int crash_signal_fd = GetCrashSignalFD(command_line, *browser_->options()); | 179 int crash_signal_fd = GetCrashSignalFD(command_line, *browser_->options()); |
181 if (crash_signal_fd >= 0) | 180 if (crash_signal_fd >= 0) |
182 mappings->Share(kCrashDumpSignal, crash_signal_fd); | 181 mappings->Share(kCrashDumpSignal, crash_signal_fd); |
183 #endif // defined(HEADLESS_USE_BREAKPAD) | 182 #endif // defined(HEADLESS_USE_BREAKPAD) |
184 } | 183 } |
185 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) | 184 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) |
186 | 185 |
187 void HeadlessContentBrowserClient::AppendExtraCommandLineSwitches( | 186 void HeadlessContentBrowserClient::AppendExtraCommandLineSwitches( |
188 base::CommandLine* command_line, | 187 base::CommandLine* command_line, |
189 int child_process_id) { | 188 int child_process_id) { |
190 command_line->AppendSwitch(switches::kHeadless); | |
191 #if defined(HEADLESS_USE_BREAKPAD) | 189 #if defined(HEADLESS_USE_BREAKPAD) |
192 // This flag tells child processes to also turn on crash reporting. | 190 // This flag tells child processes to also turn on crash reporting. |
193 if (breakpad::IsCrashReporterEnabled()) | 191 if (breakpad::IsCrashReporterEnabled()) |
194 command_line->AppendSwitch(switches::kEnableCrashReporter); | 192 command_line->AppendSwitch(switches::kEnableCrashReporter); |
195 #endif // defined(HEADLESS_USE_BREAKPAD) | 193 #endif // defined(HEADLESS_USE_BREAKPAD) |
196 } | 194 } |
197 | 195 |
198 } // namespace headless | 196 } // namespace headless |
OLD | NEW |