| 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" |
| 31 | 32 |
| 32 #if defined(HEADLESS_USE_BREAKPAD) | 33 #if defined(HEADLESS_USE_BREAKPAD) |
| 33 #include "base/debug/leak_annotations.h" | 34 #include "base/debug/leak_annotations.h" |
| 34 #include "components/crash/content/app/breakpad_linux.h" | 35 #include "components/crash/content/app/breakpad_linux.h" |
| 35 #include "components/crash/content/browser/crash_handler_host_linux.h" | 36 #include "components/crash/content/browser/crash_handler_host_linux.h" |
| 36 #include "content/public/common/content_descriptors.h" | 37 #include "content/public/common/content_descriptors.h" |
| 37 #endif // defined(HEADLESS_USE_BREAKPAD) | 38 #endif // defined(HEADLESS_USE_BREAKPAD) |
| 38 | 39 |
| 39 namespace headless { | 40 namespace headless { |
| 40 | 41 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 int crash_signal_fd = GetCrashSignalFD(command_line, *browser_->options()); | 180 int crash_signal_fd = GetCrashSignalFD(command_line, *browser_->options()); |
| 180 if (crash_signal_fd >= 0) | 181 if (crash_signal_fd >= 0) |
| 181 mappings->Share(kCrashDumpSignal, crash_signal_fd); | 182 mappings->Share(kCrashDumpSignal, crash_signal_fd); |
| 182 #endif // defined(HEADLESS_USE_BREAKPAD) | 183 #endif // defined(HEADLESS_USE_BREAKPAD) |
| 183 } | 184 } |
| 184 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) | 185 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) |
| 185 | 186 |
| 186 void HeadlessContentBrowserClient::AppendExtraCommandLineSwitches( | 187 void HeadlessContentBrowserClient::AppendExtraCommandLineSwitches( |
| 187 base::CommandLine* command_line, | 188 base::CommandLine* command_line, |
| 188 int child_process_id) { | 189 int child_process_id) { |
| 190 command_line->AppendSwitch(switches::kHeadless); |
| 189 #if defined(HEADLESS_USE_BREAKPAD) | 191 #if defined(HEADLESS_USE_BREAKPAD) |
| 190 // This flag tells child processes to also turn on crash reporting. | 192 // This flag tells child processes to also turn on crash reporting. |
| 191 if (breakpad::IsCrashReporterEnabled()) | 193 if (breakpad::IsCrashReporterEnabled()) |
| 192 command_line->AppendSwitch(switches::kEnableCrashReporter); | 194 command_line->AppendSwitch(switches::kEnableCrashReporter); |
| 193 #endif // defined(HEADLESS_USE_BREAKPAD) | 195 #endif // defined(HEADLESS_USE_BREAKPAD) |
| 194 } | 196 } |
| 195 | 197 |
| 196 } // namespace headless | 198 } // namespace headless |
| OLD | NEW |