Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Side by Side Diff: android_webview/browser/aw_content_browser_client.cc

Issue 2391763004: [Merge M54] Propagate common resources to WebView child process (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | android_webview/common/aw_descriptors.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 476
477 void AwContentBrowserClient::GetAdditionalMappedFilesForChildProcess( 477 void AwContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
478 const base::CommandLine& command_line, 478 const base::CommandLine& command_line,
479 int child_process_id, 479 int child_process_id,
480 content::FileDescriptorInfo* mappings, 480 content::FileDescriptorInfo* mappings,
481 std::map<int, base::MemoryMappedFile::Region>* regions) { 481 std::map<int, base::MemoryMappedFile::Region>* regions) {
482 int fd = ui::GetMainAndroidPackFd( 482 int fd = ui::GetMainAndroidPackFd(
483 &(*regions)[kAndroidWebViewMainPakDescriptor]); 483 &(*regions)[kAndroidWebViewMainPakDescriptor]);
484 mappings->Share(kAndroidWebViewMainPakDescriptor, fd); 484 mappings->Share(kAndroidWebViewMainPakDescriptor, fd);
485 485
486 fd = ui::GetCommonResourcesPackFd(
487 &(*regions)[kAndroidWebView100PercentPakDescriptor]);
488 mappings->Share(kAndroidWebView100PercentPakDescriptor, fd);
489
486 fd = ui::GetLocalePackFd(&(*regions)[kAndroidWebViewLocalePakDescriptor]); 490 fd = ui::GetLocalePackFd(&(*regions)[kAndroidWebViewLocalePakDescriptor]);
487 mappings->Share(kAndroidWebViewLocalePakDescriptor, fd); 491 mappings->Share(kAndroidWebViewLocalePakDescriptor, fd);
488 492
489 base::ScopedFD crash_signal_file = 493 base::ScopedFD crash_signal_file =
490 breakpad::CrashMicroDumpManager::GetInstance()->CreateCrashInfoChannel( 494 breakpad::CrashMicroDumpManager::GetInstance()->CreateCrashInfoChannel(
491 child_process_id); 495 child_process_id);
492 if (crash_signal_file.is_valid()) { 496 if (crash_signal_file.is_valid()) {
493 mappings->Transfer(kAndroidWebViewCrashSignalDescriptor, 497 mappings->Transfer(kAndroidWebViewCrashSignalDescriptor,
494 std::move(crash_signal_file)); 498 std::move(crash_signal_file));
495 } 499 }
(...skipping 27 matching lines...) Expand all
523 527
524 #if defined(VIDEO_HOLE) 528 #if defined(VIDEO_HOLE)
525 content::ExternalVideoSurfaceContainer* 529 content::ExternalVideoSurfaceContainer*
526 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( 530 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer(
527 content::WebContents* web_contents) { 531 content::WebContents* web_contents) {
528 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents); 532 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents);
529 } 533 }
530 #endif 534 #endif
531 535
532 } // namespace android_webview 536 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | android_webview/common/aw_descriptors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698