OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "android_webview/browser/aw_content_browser_client.h" | 5 #include "android_webview/browser/aw_content_browser_client.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "android_webview/browser/aw_browser_context.h" | 9 #include "android_webview/browser/aw_browser_context.h" |
10 #include "android_webview/browser/aw_browser_main_parts.h" | 10 #include "android_webview/browser/aw_browser_main_parts.h" |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 return false; | 468 return false; |
469 } | 469 } |
470 | 470 |
471 content::TracingDelegate* AwContentBrowserClient::GetTracingDelegate() { | 471 content::TracingDelegate* AwContentBrowserClient::GetTracingDelegate() { |
472 return new AwTracingDelegate(); | 472 return new AwTracingDelegate(); |
473 } | 473 } |
474 | 474 |
475 void AwContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 475 void AwContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
476 const base::CommandLine& command_line, | 476 const base::CommandLine& command_line, |
477 int child_process_id, | 477 int child_process_id, |
478 content::FileDescriptorInfo* mappings, | 478 content::FileDescriptorInfo* mappings) { |
479 std::map<int, base::MemoryMappedFile::Region>* regions) { | 479 base::MemoryMappedFile::Region region; |
480 int fd = ui::GetMainAndroidPackFd( | 480 int fd = ui::GetMainAndroidPackFd(®ion); |
481 &(*regions)[kAndroidWebViewMainPakDescriptor]); | 481 mappings->ShareWithRegion(kAndroidWebViewMainPakDescriptor, fd, region); |
482 mappings->Share(kAndroidWebViewMainPakDescriptor, fd); | |
483 | 482 |
484 fd = ui::GetCommonResourcesPackFd( | 483 fd = ui::GetCommonResourcesPackFd(®ion); |
485 &(*regions)[kAndroidWebView100PercentPakDescriptor]); | 484 mappings->ShareWithRegion(kAndroidWebView100PercentPakDescriptor, fd, region); |
486 mappings->Share(kAndroidWebView100PercentPakDescriptor, fd); | |
487 | 485 |
488 fd = ui::GetLocalePackFd(&(*regions)[kAndroidWebViewLocalePakDescriptor]); | 486 fd = ui::GetLocalePackFd(®ion); |
489 mappings->Share(kAndroidWebViewLocalePakDescriptor, fd); | 487 mappings->ShareWithRegion(kAndroidWebViewLocalePakDescriptor, fd, region); |
490 | 488 |
491 base::ScopedFD crash_signal_file = | 489 base::ScopedFD crash_signal_file = |
492 breakpad::CrashMicroDumpManager::GetInstance()->CreateCrashInfoChannel( | 490 breakpad::CrashMicroDumpManager::GetInstance()->CreateCrashInfoChannel( |
493 child_process_id); | 491 child_process_id); |
494 if (crash_signal_file.is_valid()) { | 492 if (crash_signal_file.is_valid()) { |
495 mappings->Transfer(kAndroidWebViewCrashSignalDescriptor, | 493 mappings->Transfer(kAndroidWebViewCrashSignalDescriptor, |
496 std::move(crash_signal_file)); | 494 std::move(crash_signal_file)); |
497 } | 495 } |
498 } | 496 } |
499 | 497 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 render_frame_host)); | 550 render_frame_host)); |
553 | 551 |
554 // Although WebView does not support password manager feature, renderer code | 552 // Although WebView does not support password manager feature, renderer code |
555 // could still request this interface, so we register a dummy binder which | 553 // could still request this interface, so we register a dummy binder which |
556 // just drops the incoming request, to avoid the 'Failed to locate a binder | 554 // just drops the incoming request, to avoid the 'Failed to locate a binder |
557 // for interface' error log.. | 555 // for interface' error log.. |
558 registry->AddInterface(base::Bind(&DummyBindPasswordManagerDriver)); | 556 registry->AddInterface(base::Bind(&DummyBindPasswordManagerDriver)); |
559 } | 557 } |
560 | 558 |
561 } // namespace android_webview | 559 } // namespace android_webview |
OLD | NEW |