OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chromecast/browser/cast_content_browser_client.h" | 5 #include "chromecast/browser/cast_content_browser_client.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
307 int render_process_id, | 307 int render_process_id, |
308 int opener_id, | 308 int opener_id, |
309 bool* no_javascript_access) { | 309 bool* no_javascript_access) { |
310 *no_javascript_access = true; | 310 *no_javascript_access = true; |
311 return false; | 311 return false; |
312 } | 312 } |
313 | 313 |
314 void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 314 void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
315 const base::CommandLine& command_line, | 315 const base::CommandLine& command_line, |
316 int child_process_id, | 316 int child_process_id, |
317 content::FileDescriptorInfo* mappings) { | 317 content::FileDescriptorInfo* mappings |
318 #if defined(OS_ANDROID) | |
319 , std::map<int, base::MemoryMappedFile::Region>* regions | |
320 #endif | |
321 ) { | |
318 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) | 322 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) |
319 if (v8_natives_fd_.get() == -1 || v8_snapshot_fd_.get() == -1) { | 323 if (v8_natives_fd_.get() == -1 || v8_snapshot_fd_.get() == -1) { |
320 int v8_natives_fd = -1; | 324 int v8_natives_fd = -1; |
321 int v8_snapshot_fd = -1; | 325 int v8_snapshot_fd = -1; |
322 if (gin::V8Initializer::OpenV8FilesForChildProcesses(&v8_natives_fd, | 326 if (gin::V8Initializer::OpenV8FilesForChildProcesses(&v8_natives_fd, |
323 &v8_snapshot_fd)) { | 327 &v8_snapshot_fd)) { |
324 v8_natives_fd_.reset(v8_natives_fd); | 328 v8_natives_fd_.reset(v8_natives_fd); |
325 v8_snapshot_fd_.reset(v8_snapshot_fd); | 329 v8_snapshot_fd_.reset(v8_snapshot_fd); |
326 } | 330 } |
327 } | 331 } |
(...skipping 27 matching lines...) Expand all Loading... | |
355 } | 359 } |
356 | 360 |
357 base::FilePath app_data_path; | 361 base::FilePath app_data_path; |
358 CHECK(PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path)); | 362 CHECK(PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path)); |
359 base::FilePath icudata_path = | 363 base::FilePath icudata_path = |
360 app_data_path.AppendASCII(base::i18n::kIcuDataFileName); | 364 app_data_path.AppendASCII(base::i18n::kIcuDataFileName); |
361 base::File icudata_file(icudata_path, flags_open_read); | 365 base::File icudata_file(icudata_path, flags_open_read); |
362 if (!icudata_file.IsValid()) | 366 if (!icudata_file.IsValid()) |
363 NOTREACHED() << "Failed to open ICU file when creating renderer process"; | 367 NOTREACHED() << "Failed to open ICU file when creating renderer process"; |
364 mappings->Transfer(kAndroidICUDataDescriptor, | 368 mappings->Transfer(kAndroidICUDataDescriptor, |
365 base::ScopedFD(icudata_file.TakePlatformFile())); | 369 base::ScopedFD(icudata_file.TakePlatformFile())); |
jungshik at Google
2015/06/09 23:45:15
I'm wondering why this file does not require the s
| |
366 #else | 370 #else |
367 int crash_signal_fd = GetCrashSignalFD(command_line); | 371 int crash_signal_fd = GetCrashSignalFD(command_line); |
368 if (crash_signal_fd >= 0) { | 372 if (crash_signal_fd >= 0) { |
369 mappings->Share(kCrashDumpSignal, crash_signal_fd); | 373 mappings->Share(kCrashDumpSignal, crash_signal_fd); |
370 } | 374 } |
371 #endif // defined(OS_ANDROID) | 375 #endif // defined(OS_ANDROID) |
372 } | 376 } |
373 | 377 |
374 #if defined(OS_ANDROID) && defined(VIDEO_HOLE) | 378 #if defined(OS_ANDROID) && defined(VIDEO_HOLE) |
375 content::ExternalVideoSurfaceContainer* | 379 content::ExternalVideoSurfaceContainer* |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
414 process_type, dumps_path, false /* upload */); | 418 process_type, dumps_path, false /* upload */); |
415 // StartUploaderThread() even though upload is diferred. | 419 // StartUploaderThread() even though upload is diferred. |
416 // Breakpad-related memory is freed in the uploader thread. | 420 // Breakpad-related memory is freed in the uploader thread. |
417 crash_handler->StartUploaderThread(); | 421 crash_handler->StartUploaderThread(); |
418 return crash_handler; | 422 return crash_handler; |
419 } | 423 } |
420 #endif // !defined(OS_ANDROID) | 424 #endif // !defined(OS_ANDROID) |
421 | 425 |
422 } // namespace shell | 426 } // namespace shell |
423 } // namespace chromecast | 427 } // namespace chromecast |
OLD | NEW |