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 <memory> | 7 #include <memory> |
8 | 8 |
9 #include "android_webview/browser/aw_content_browser_client.h" | 9 #include "android_webview/browser/aw_content_browser_client.h" |
10 #include "android_webview/browser/browser_view_renderer.h" | 10 #include "android_webview/browser/browser_view_renderer.h" |
(...skipping 12 matching lines...) Loading... |
23 #include "android_webview/native/aw_web_preferences_populater_impl.h" | 23 #include "android_webview/native/aw_web_preferences_populater_impl.h" |
24 #include "android_webview/renderer/aw_content_renderer_client.h" | 24 #include "android_webview/renderer/aw_content_renderer_client.h" |
25 #include "base/android/apk_assets.h" | 25 #include "base/android/apk_assets.h" |
26 #include "base/command_line.h" | 26 #include "base/command_line.h" |
27 #include "base/cpu.h" | 27 #include "base/cpu.h" |
28 #include "base/i18n/icu_util.h" | 28 #include "base/i18n/icu_util.h" |
29 #include "base/lazy_instance.h" | 29 #include "base/lazy_instance.h" |
30 #include "base/logging.h" | 30 #include "base/logging.h" |
31 #include "base/threading/thread_restrictions.h" | 31 #include "base/threading/thread_restrictions.h" |
32 #include "cc/base/switches.h" | 32 #include "cc/base/switches.h" |
| 33 #include "components/crash/content/app/breakpad_linux.h" |
33 #include "components/external_video_surface/browser/android/external_video_surfa
ce_container_impl.h" | 34 #include "components/external_video_surface/browser/android/external_video_surfa
ce_container_impl.h" |
34 #include "content/public/browser/android/browser_media_player_manager_register.h
" | 35 #include "content/public/browser/android/browser_media_player_manager_register.h
" |
35 #include "content/public/browser/browser_main_runner.h" | 36 #include "content/public/browser/browser_main_runner.h" |
36 #include "content/public/browser/browser_thread.h" | 37 #include "content/public/browser/browser_thread.h" |
37 #include "content/public/common/content_descriptors.h" | 38 #include "content/public/common/content_descriptors.h" |
38 #include "content/public/common/content_switches.h" | 39 #include "content/public/common/content_switches.h" |
39 #include "gin/public/isolate_holder.h" | 40 #include "gin/public/isolate_holder.h" |
40 #include "gin/v8_initializer.h" | 41 #include "gin/v8_initializer.h" |
41 #include "gpu/command_buffer/client/gl_in_process_context.h" | 42 #include "gpu/command_buffer/client/gl_in_process_context.h" |
42 #include "gpu/command_buffer/service/gpu_switches.h" | 43 #include "gpu/command_buffer/service/gpu_switches.h" |
(...skipping 120 matching lines...) Loading... |
163 ResourceBundle::InitSharedInstanceWithPakFileRegion(base::File(pak_fd), | 164 ResourceBundle::InitSharedInstanceWithPakFileRegion(base::File(pak_fd), |
164 pak_region); | 165 pak_region); |
165 pak_fd = global_descriptors->Get(kAndroidWebViewMainPakDescriptor); | 166 pak_fd = global_descriptors->Get(kAndroidWebViewMainPakDescriptor); |
166 pak_region = | 167 pak_region = |
167 global_descriptors->GetRegion(kAndroidWebViewMainPakDescriptor); | 168 global_descriptors->GetRegion(kAndroidWebViewMainPakDescriptor); |
168 ResourceBundle::GetSharedInstance().AddDataPackFromFileRegion( | 169 ResourceBundle::GetSharedInstance().AddDataPackFromFileRegion( |
169 base::File(pak_fd), pak_region, ui::SCALE_FACTOR_NONE); | 170 base::File(pak_fd), pak_region, ui::SCALE_FACTOR_NONE); |
170 crash_signal_fd = | 171 crash_signal_fd = |
171 global_descriptors->Get(kAndroidWebViewCrashSignalDescriptor); | 172 global_descriptors->Get(kAndroidWebViewCrashSignalDescriptor); |
172 } | 173 } |
173 if (process_type.empty() && | 174 if (process_type.empty()) { |
174 command_line.HasSwitch(switches::kSingleProcess)) { | 175 if (command_line.HasSwitch(switches::kSingleProcess)) { |
175 // "webview" has a special treatment in breakpad_linux.cc. | 176 process_type = breakpad::kWebViewSingleProcessType; |
176 process_type = "webview"; | 177 } else { |
| 178 process_type = breakpad::kWebViewBrowserProcessType; |
| 179 } |
177 } | 180 } |
178 | 181 |
179 crash_reporter::EnableMicrodumpCrashReporter(process_type, crash_signal_fd); | 182 crash_reporter::EnableMicrodumpCrashReporter(process_type, crash_signal_fd); |
180 } | 183 } |
181 | 184 |
182 int AwMainDelegate::RunProcess( | 185 int AwMainDelegate::RunProcess( |
183 const std::string& process_type, | 186 const std::string& process_type, |
184 const content::MainFunctionParams& main_function_params) { | 187 const content::MainFunctionParams& main_function_params) { |
185 if (process_type.empty()) { | 188 if (process_type.empty()) { |
186 AwBrowserDependencyFactoryImpl::InstallInstance(); | 189 AwBrowserDependencyFactoryImpl::InstallInstance(); |
(...skipping 75 matching lines...) Loading... |
262 #if defined(VIDEO_HOLE) | 265 #if defined(VIDEO_HOLE) |
263 content::ExternalVideoSurfaceContainer* | 266 content::ExternalVideoSurfaceContainer* |
264 AwMainDelegate::CreateExternalVideoSurfaceContainer( | 267 AwMainDelegate::CreateExternalVideoSurfaceContainer( |
265 content::WebContents* web_contents) { | 268 content::WebContents* web_contents) { |
266 return external_video_surface::ExternalVideoSurfaceContainerImpl::Create( | 269 return external_video_surface::ExternalVideoSurfaceContainerImpl::Create( |
267 web_contents); | 270 web_contents); |
268 } | 271 } |
269 #endif | 272 #endif |
270 | 273 |
271 } // namespace android_webview | 274 } // namespace android_webview |
OLD | NEW |