Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Side by Side Diff: headless/lib/browser/headless_content_browser_client.cc

Issue 2712093002: Enable building headless_shell in MAC. This is an initial implementation with a hidden window, rath… (Closed)
Patch Set: revet chrome/BUILD.gn Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 content::BrowserContext* context, 163 content::BrowserContext* context,
164 content::StoragePartition* partition, 164 content::StoragePartition* partition,
165 const storage::OptionalQuotaSettingsCallback& callback) { 165 const storage::OptionalQuotaSettingsCallback& callback) {
166 content::BrowserThread::PostTaskAndReplyWithResult( 166 content::BrowserThread::PostTaskAndReplyWithResult(
167 content::BrowserThread::FILE, FROM_HERE, 167 content::BrowserThread::FILE, FROM_HERE,
168 base::Bind(&storage::CalculateNominalDynamicSettings, 168 base::Bind(&storage::CalculateNominalDynamicSettings,
169 partition->GetPath(), context->IsOffTheRecord()), 169 partition->GetPath(), context->IsOffTheRecord()),
170 callback); 170 callback);
171 } 171 }
172 172
173 #if defined(OS_POSIX) && !defined(OS_MACOSX)
173 void HeadlessContentBrowserClient::GetAdditionalMappedFilesForChildProcess( 174 void HeadlessContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
174 const base::CommandLine& command_line, 175 const base::CommandLine& command_line,
175 int child_process_id, 176 int child_process_id,
176 content::FileDescriptorInfo* mappings) { 177 content::FileDescriptorInfo* mappings) {
177 #if defined(HEADLESS_USE_BREAKPAD) 178 #if defined(HEADLESS_USE_BREAKPAD)
178 int crash_signal_fd = GetCrashSignalFD(command_line, *browser_->options()); 179 int crash_signal_fd = GetCrashSignalFD(command_line, *browser_->options());
179 if (crash_signal_fd >= 0) 180 if (crash_signal_fd >= 0)
180 mappings->Share(kCrashDumpSignal, crash_signal_fd); 181 mappings->Share(kCrashDumpSignal, crash_signal_fd);
181 #endif // defined(HEADLESS_USE_BREAKPAD) 182 #endif // defined(HEADLESS_USE_BREAKPAD)
182 } 183 }
184 #endif // defined(OS_POSIX) && !defined(OS_MACOSX)
183 185
184 void HeadlessContentBrowserClient::AppendExtraCommandLineSwitches( 186 void HeadlessContentBrowserClient::AppendExtraCommandLineSwitches(
185 base::CommandLine* command_line, 187 base::CommandLine* command_line,
186 int child_process_id) { 188 int child_process_id) {
187 #if defined(HEADLESS_USE_BREAKPAD) 189 #if defined(HEADLESS_USE_BREAKPAD)
188 // This flag tells child processes to also turn on crash reporting. 190 // This flag tells child processes to also turn on crash reporting.
189 if (breakpad::IsCrashReporterEnabled()) 191 if (breakpad::IsCrashReporterEnabled())
190 command_line->AppendSwitch(switches::kEnableCrashReporter); 192 command_line->AppendSwitch(switches::kEnableCrashReporter);
191 #endif // defined(HEADLESS_USE_BREAKPAD) 193 #endif // defined(HEADLESS_USE_BREAKPAD)
192 } 194 }
193 195
194 } // namespace headless 196 } // namespace headless
OLDNEW
« no previous file with comments | « headless/lib/browser/headless_content_browser_client.h ('k') | headless/lib/headless_content_main_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698