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 13 matching lines...) Expand all Loading... |
24 #include "android_webview/common/aw_switches.h" | 24 #include "android_webview/common/aw_switches.h" |
25 #include "android_webview/common/render_view_messages.h" | 25 #include "android_webview/common/render_view_messages.h" |
26 #include "android_webview/common/url_constants.h" | 26 #include "android_webview/common/url_constants.h" |
27 #include "base/android/locale_utils.h" | 27 #include "base/android/locale_utils.h" |
28 #include "base/base_paths_android.h" | 28 #include "base/base_paths_android.h" |
29 #include "base/command_line.h" | 29 #include "base/command_line.h" |
30 #include "base/files/scoped_file.h" | 30 #include "base/files/scoped_file.h" |
31 #include "base/memory/ptr_util.h" | 31 #include "base/memory/ptr_util.h" |
32 #include "base/path_service.h" | 32 #include "base/path_service.h" |
33 #include "components/cdm/browser/cdm_message_filter_android.h" | 33 #include "components/cdm/browser/cdm_message_filter_android.h" |
34 #include "components/crash/content/browser/crash_micro_dump_manager_android.h" | 34 #include "components/crash/content/browser/crash_dump_observer_android.h" |
35 #include "components/navigation_interception/intercept_navigation_delegate.h" | 35 #include "components/navigation_interception/intercept_navigation_delegate.h" |
36 #include "content/public/browser/browser_message_filter.h" | 36 #include "content/public/browser/browser_message_filter.h" |
37 #include "content/public/browser/browser_thread.h" | 37 #include "content/public/browser/browser_thread.h" |
38 #include "content/public/browser/child_process_security_policy.h" | 38 #include "content/public/browser/child_process_security_policy.h" |
39 #include "content/public/browser/client_certificate_delegate.h" | 39 #include "content/public/browser/client_certificate_delegate.h" |
40 #include "content/public/browser/navigation_handle.h" | 40 #include "content/public/browser/navigation_handle.h" |
41 #include "content/public/browser/navigation_throttle.h" | 41 #include "content/public/browser/navigation_throttle.h" |
42 #include "content/public/browser/render_frame_host.h" | 42 #include "content/public/browser/render_frame_host.h" |
43 #include "content/public/browser/render_process_host.h" | 43 #include "content/public/browser/render_process_host.h" |
44 #include "content/public/browser/render_view_host.h" | 44 #include "content/public/browser/render_view_host.h" |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 int child_process_id, | 468 int child_process_id, |
469 content::FileDescriptorInfo* mappings, | 469 content::FileDescriptorInfo* mappings, |
470 std::map<int, base::MemoryMappedFile::Region>* regions) { | 470 std::map<int, base::MemoryMappedFile::Region>* regions) { |
471 int fd = ui::GetMainAndroidPackFd( | 471 int fd = ui::GetMainAndroidPackFd( |
472 &(*regions)[kAndroidWebViewMainPakDescriptor]); | 472 &(*regions)[kAndroidWebViewMainPakDescriptor]); |
473 mappings->Share(kAndroidWebViewMainPakDescriptor, fd); | 473 mappings->Share(kAndroidWebViewMainPakDescriptor, fd); |
474 | 474 |
475 fd = ui::GetLocalePackFd(&(*regions)[kAndroidWebViewLocalePakDescriptor]); | 475 fd = ui::GetLocalePackFd(&(*regions)[kAndroidWebViewLocalePakDescriptor]); |
476 mappings->Share(kAndroidWebViewLocalePakDescriptor, fd); | 476 mappings->Share(kAndroidWebViewLocalePakDescriptor, fd); |
477 | 477 |
478 base::ScopedFD crash_signal_file = | 478 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted( |
479 breakpad::CrashMicroDumpManager::GetInstance()->CreateCrashInfoChannel( | 479 child_process_id, mappings); |
480 child_process_id); | |
481 if (crash_signal_file.is_valid()) { | |
482 mappings->Transfer(kAndroidWebViewCrashSignalDescriptor, | |
483 std::move(crash_signal_file)); | |
484 } | |
485 } | 480 } |
486 | 481 |
487 void AwContentBrowserClient::OverrideWebkitPrefs( | 482 void AwContentBrowserClient::OverrideWebkitPrefs( |
488 content::RenderViewHost* rvh, | 483 content::RenderViewHost* rvh, |
489 content::WebPreferences* web_prefs) { | 484 content::WebPreferences* web_prefs) { |
490 if (!preferences_populater_.get()) { | 485 if (!preferences_populater_.get()) { |
491 preferences_populater_ = | 486 preferences_populater_ = |
492 base::WrapUnique(native_factory_->CreateWebPreferencesPopulater()); | 487 base::WrapUnique(native_factory_->CreateWebPreferencesPopulater()); |
493 } | 488 } |
494 preferences_populater_->PopulateFor( | 489 preferences_populater_->PopulateFor( |
(...skipping 17 matching lines...) Expand all Loading... |
512 | 507 |
513 #if defined(VIDEO_HOLE) | 508 #if defined(VIDEO_HOLE) |
514 content::ExternalVideoSurfaceContainer* | 509 content::ExternalVideoSurfaceContainer* |
515 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( | 510 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( |
516 content::WebContents* web_contents) { | 511 content::WebContents* web_contents) { |
517 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents); | 512 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents); |
518 } | 513 } |
519 #endif | 514 #endif |
520 | 515 |
521 } // namespace android_webview | 516 } // namespace android_webview |
OLD | NEW |