| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 163     base::MemoryMappedFile::Region pak_region = | 163     base::MemoryMappedFile::Region pak_region = | 
| 164         global_descriptors->GetRegion(kAndroidWebViewLocalePakDescriptor); | 164         global_descriptors->GetRegion(kAndroidWebViewLocalePakDescriptor); | 
| 165     ResourceBundle::InitSharedInstanceWithPakFileRegion(base::File(pak_fd), | 165     ResourceBundle::InitSharedInstanceWithPakFileRegion(base::File(pak_fd), | 
| 166                                                         pak_region); | 166                                                         pak_region); | 
| 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   if (process_type.empty() && | 
|  | 174       command_line.HasSwitch(switches::kSingleProcess)) { | 
|  | 175     // "webview" has a special treatment in breakpad_linux.cc. | 
|  | 176     process_type = "webview"; | 
|  | 177   } | 
| 173 | 178 | 
| 174   crash_reporter::EnableMicrodumpCrashReporter(); | 179   crash_reporter::EnableMicrodumpCrashReporter(process_type); | 
| 175 } | 180 } | 
| 176 | 181 | 
| 177 int AwMainDelegate::RunProcess( | 182 int AwMainDelegate::RunProcess( | 
| 178     const std::string& process_type, | 183     const std::string& process_type, | 
| 179     const content::MainFunctionParams& main_function_params) { | 184     const content::MainFunctionParams& main_function_params) { | 
| 180   if (process_type.empty()) { | 185   if (process_type.empty()) { | 
| 181     AwBrowserDependencyFactoryImpl::InstallInstance(); | 186     AwBrowserDependencyFactoryImpl::InstallInstance(); | 
| 182 | 187 | 
| 183     browser_runner_.reset(content::BrowserMainRunner::Create()); | 188     browser_runner_.reset(content::BrowserMainRunner::Create()); | 
| 184     int exit_code = browser_runner_->Initialize(main_function_params); | 189     int exit_code = browser_runner_->Initialize(main_function_params); | 
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 244 #if defined(VIDEO_HOLE) | 249 #if defined(VIDEO_HOLE) | 
| 245 content::ExternalVideoSurfaceContainer* | 250 content::ExternalVideoSurfaceContainer* | 
| 246 AwMainDelegate::CreateExternalVideoSurfaceContainer( | 251 AwMainDelegate::CreateExternalVideoSurfaceContainer( | 
| 247     content::WebContents* web_contents) { | 252     content::WebContents* web_contents) { | 
| 248   return external_video_surface::ExternalVideoSurfaceContainerImpl::Create( | 253   return external_video_surface::ExternalVideoSurfaceContainerImpl::Create( | 
| 249       web_contents); | 254       web_contents); | 
| 250 } | 255 } | 
| 251 #endif | 256 #endif | 
| 252 | 257 | 
| 253 }  // namespace android_webview | 258 }  // namespace android_webview | 
| OLD | NEW | 
|---|