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