| 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/lib/main/aw_main_delegate.h" | 5 #include "android_webview/lib/main/aw_main_delegate.h" |
| 6 | 6 |
| 7 #include "android_webview/browser/aw_content_browser_client.h" | 7 #include "android_webview/browser/aw_content_browser_client.h" |
| 8 #include "android_webview/browser/browser_view_renderer.h" | 8 #include "android_webview/browser/browser_view_renderer.h" |
| 9 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" | 9 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" |
| 10 #include "android_webview/common/aw_descriptors.h" | 10 #include "android_webview/common/aw_descriptors.h" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 pak_fd = global_descriptors->Get(kAndroidWebViewMainPakDescriptor); | 167 pak_fd = global_descriptors->Get(kAndroidWebViewMainPakDescriptor); |
| 168 pak_region = | 168 pak_region = |
| 169 global_descriptors->GetRegion(kAndroidWebViewMainPakDescriptor); | 169 global_descriptors->GetRegion(kAndroidWebViewMainPakDescriptor); |
| 170 ResourceBundle::GetSharedInstance().AddDataPackFromFileRegion( | 170 ResourceBundle::GetSharedInstance().AddDataPackFromFileRegion( |
| 171 base::File(pak_fd), pak_region, ui::SCALE_FACTOR_NONE); | 171 base::File(pak_fd), pak_region, ui::SCALE_FACTOR_NONE); |
| 172 } | 172 } |
| 173 | 173 |
| 174 crash_reporter::EnableMicrodumpCrashReporter(); | 174 crash_reporter::EnableMicrodumpCrashReporter(); |
| 175 } | 175 } |
| 176 | 176 |
| 177 void AwMainDelegate::SandboxInitialized(const std::string& process_type) { | |
| 178 // TODO(torne): Adjust linux OOM score here. | |
| 179 } | |
| 180 | |
| 181 int AwMainDelegate::RunProcess( | 177 int AwMainDelegate::RunProcess( |
| 182 const std::string& process_type, | 178 const std::string& process_type, |
| 183 const content::MainFunctionParams& main_function_params) { | 179 const content::MainFunctionParams& main_function_params) { |
| 184 if (process_type.empty()) { | 180 if (process_type.empty()) { |
| 185 AwBrowserDependencyFactoryImpl::InstallInstance(); | 181 AwBrowserDependencyFactoryImpl::InstallInstance(); |
| 186 | 182 |
| 187 browser_runner_.reset(content::BrowserMainRunner::Create()); | 183 browser_runner_.reset(content::BrowserMainRunner::Create()); |
| 188 int exit_code = browser_runner_->Initialize(main_function_params); | 184 int exit_code = browser_runner_->Initialize(main_function_params); |
| 189 DCHECK_LT(exit_code, 0); | 185 DCHECK_LT(exit_code, 0); |
| 190 | 186 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 #if defined(VIDEO_HOLE) | 244 #if defined(VIDEO_HOLE) |
| 249 content::ExternalVideoSurfaceContainer* | 245 content::ExternalVideoSurfaceContainer* |
| 250 AwMainDelegate::CreateExternalVideoSurfaceContainer( | 246 AwMainDelegate::CreateExternalVideoSurfaceContainer( |
| 251 content::WebContents* web_contents) { | 247 content::WebContents* web_contents) { |
| 252 return external_video_surface::ExternalVideoSurfaceContainerImpl::Create( | 248 return external_video_surface::ExternalVideoSurfaceContainerImpl::Create( |
| 253 web_contents); | 249 web_contents); |
| 254 } | 250 } |
| 255 #endif | 251 #endif |
| 256 | 252 |
| 257 } // namespace android_webview | 253 } // namespace android_webview |
| OLD | NEW |