OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "content/browser/child_process_launcher.h" | 5 #include "content/browser/child_process_launcher.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/i18n/icu_util.h" | 10 #include "base/i18n/icu_util.h" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 #if defined(OS_ANDROID) | 139 #if defined(OS_ANDROID) |
140 files_to_register->Share(kPrimaryIPCChannel, ipcfd.get()); | 140 files_to_register->Share(kPrimaryIPCChannel, ipcfd.get()); |
141 #else | 141 #else |
142 files_to_register->Transfer(kPrimaryIPCChannel, ipcfd.Pass()); | 142 files_to_register->Transfer(kPrimaryIPCChannel, ipcfd.Pass()); |
143 #endif | 143 #endif |
144 #endif | 144 #endif |
145 | 145 |
146 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 146 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
147 std::map<int, base::MemoryMappedFile::Region> regions; | 147 std::map<int, base::MemoryMappedFile::Region> regions; |
148 GetContentClient()->browser()->GetAdditionalMappedFilesForChildProcess( | 148 GetContentClient()->browser()->GetAdditionalMappedFilesForChildProcess( |
149 *cmd_line, child_process_id, files_to_register.get()); | 149 *cmd_line, child_process_id, files_to_register.get() |
| 150 #if defined(OS_ANDROID) |
| 151 , ®ions |
| 152 #endif |
| 153 ); |
150 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) | 154 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) |
151 base::PlatformFile natives_pf = | 155 base::PlatformFile natives_pf = |
152 gin::V8Initializer::GetOpenNativesFileForChildProcesses( | 156 gin::V8Initializer::GetOpenNativesFileForChildProcesses( |
153 ®ions[kV8NativesDataDescriptor]); | 157 ®ions[kV8NativesDataDescriptor]); |
154 DCHECK_GE(natives_pf, 0); | 158 DCHECK_GE(natives_pf, 0); |
155 files_to_register->Share(kV8NativesDataDescriptor, natives_pf); | 159 files_to_register->Share(kV8NativesDataDescriptor, natives_pf); |
156 | 160 |
157 base::MemoryMappedFile::Region snapshot_region; | 161 base::MemoryMappedFile::Region snapshot_region; |
158 base::PlatformFile snapshot_pf = | 162 base::PlatformFile snapshot_pf = |
159 gin::V8Initializer::GetOpenSnapshotFileForChildProcesses( | 163 gin::V8Initializer::GetOpenSnapshotFileForChildProcesses( |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 } | 541 } |
538 | 542 |
539 ChildProcessLauncher::Client* ChildProcessLauncher::ReplaceClientForTest( | 543 ChildProcessLauncher::Client* ChildProcessLauncher::ReplaceClientForTest( |
540 Client* client) { | 544 Client* client) { |
541 Client* ret = client_; | 545 Client* ret = client_; |
542 client_ = client; | 546 client_ = client; |
543 return ret; | 547 return ret; |
544 } | 548 } |
545 | 549 |
546 } // namespace content | 550 } // namespace content |
OLD | NEW |