| 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/gpu_memory_buffer_factory_impl.h" | 9 #include "android_webview/browser/gpu_memory_buffer_factory_impl.h" |
| 10 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" | 10 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 } | 96 } |
| 97 | 97 |
| 98 int AwMainDelegate::RunProcess( | 98 int AwMainDelegate::RunProcess( |
| 99 const std::string& process_type, | 99 const std::string& process_type, |
| 100 const content::MainFunctionParams& main_function_params) { | 100 const content::MainFunctionParams& main_function_params) { |
| 101 if (process_type.empty()) { | 101 if (process_type.empty()) { |
| 102 AwBrowserDependencyFactoryImpl::InstallInstance(); | 102 AwBrowserDependencyFactoryImpl::InstallInstance(); |
| 103 | 103 |
| 104 browser_runner_.reset(content::BrowserMainRunner::Create()); | 104 browser_runner_.reset(content::BrowserMainRunner::Create()); |
| 105 int exit_code = browser_runner_->Initialize(main_function_params); | 105 int exit_code = browser_runner_->Initialize(main_function_params); |
| 106 DCHECK(exit_code < 0); | 106 DCHECK_LT(exit_code, 0); |
| 107 | 107 |
| 108 g_allow_wait_in_ui_thread.Get().reset( | 108 g_allow_wait_in_ui_thread.Get().reset( |
| 109 new ScopedAllowWaitForLegacyWebViewApi); | 109 new ScopedAllowWaitForLegacyWebViewApi); |
| 110 | 110 |
| 111 // Return 0 so that we do NOT trigger the default behavior. On Android, the | 111 // Return 0 so that we do NOT trigger the default behavior. On Android, the |
| 112 // UI message loop is managed by the Java application. | 112 // UI message loop is managed by the Java application. |
| 113 return 0; | 113 return 0; |
| 114 } | 114 } |
| 115 | 115 |
| 116 return -1; | 116 return -1; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 150 |
| 151 #if defined(VIDEO_HOLE) | 151 #if defined(VIDEO_HOLE) |
| 152 content::ExternalVideoSurfaceContainer* | 152 content::ExternalVideoSurfaceContainer* |
| 153 AwMainDelegate::CreateExternalVideoSurfaceContainer( | 153 AwMainDelegate::CreateExternalVideoSurfaceContainer( |
| 154 content::WebContents* web_contents) { | 154 content::WebContents* web_contents) { |
| 155 return new ExternalVideoSurfaceContainerImpl(web_contents); | 155 return new ExternalVideoSurfaceContainerImpl(web_contents); |
| 156 } | 156 } |
| 157 #endif | 157 #endif |
| 158 | 158 |
| 159 } // namespace android_webview | 159 } // namespace android_webview |
| OLD | NEW |