OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/shell/browser/shell_content_browser_client.h" | 5 #include "content/shell/browser/shell_content_browser_client.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file.h" | 9 #include "base/files/file.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 callback.Run(Shell::CreateNewWindow(browser_context, | 334 callback.Run(Shell::CreateNewWindow(browser_context, |
335 params.url, | 335 params.url, |
336 nullptr, | 336 nullptr, |
337 gfx::Size())->web_contents()); | 337 gfx::Size())->web_contents()); |
338 } | 338 } |
339 | 339 |
340 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 340 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
341 void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 341 void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
342 const base::CommandLine& command_line, | 342 const base::CommandLine& command_line, |
343 int child_process_id, | 343 int child_process_id, |
344 FileDescriptorInfo* mappings) { | 344 FileDescriptorInfo* mappings |
| 345 #if defined(OS_ANDROID) |
| 346 , |
| 347 std::map<int, base::MemoryMappedFile::Region>* regions |
| 348 #endif |
| 349 ) { |
345 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) | 350 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) |
346 if (v8_natives_fd_.get() == -1 || v8_snapshot_fd_.get() == -1) { | 351 if (v8_natives_fd_.get() == -1 || v8_snapshot_fd_.get() == -1) { |
347 int v8_natives_fd = -1; | 352 int v8_natives_fd = -1; |
348 int v8_snapshot_fd = -1; | 353 int v8_snapshot_fd = -1; |
349 if (gin::V8Initializer::OpenV8FilesForChildProcesses(&v8_natives_fd, | 354 if (gin::V8Initializer::OpenV8FilesForChildProcesses(&v8_natives_fd, |
350 &v8_snapshot_fd)) { | 355 &v8_snapshot_fd)) { |
351 v8_natives_fd_.reset(v8_natives_fd); | 356 v8_natives_fd_.reset(v8_natives_fd); |
352 v8_snapshot_fd_.reset(v8_snapshot_fd); | 357 v8_snapshot_fd_.reset(v8_snapshot_fd); |
353 } | 358 } |
354 } | 359 } |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 ShellBrowserContext* | 430 ShellBrowserContext* |
426 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( | 431 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( |
427 BrowserContext* content_browser_context) { | 432 BrowserContext* content_browser_context) { |
428 if (content_browser_context == browser_context()) | 433 if (content_browser_context == browser_context()) |
429 return browser_context(); | 434 return browser_context(); |
430 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); | 435 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); |
431 return off_the_record_browser_context(); | 436 return off_the_record_browser_context(); |
432 } | 437 } |
433 | 438 |
434 } // namespace content | 439 } // namespace content |
OLD | NEW |