| Index: android_webview/lib/webview_main_delegate.cc
|
| diff --git a/android_webview/lib/webview_main_delegate.cc b/android_webview/lib/webview_main_delegate.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..178fa86d4f50bea8daa114591879fef3979fdcfc
|
| --- /dev/null
|
| +++ b/android_webview/lib/webview_main_delegate.cc
|
| @@ -0,0 +1,37 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "android_webview/lib/webview_main_delegate.h"
|
| +
|
| +#include "base/logging.h"
|
| +#include "content/public/browser/browser_main_runner.h"
|
| +
|
| +namespace android_webview {
|
| +
|
| +WebViewMainDelegate::WebViewMainDelegate() {
|
| +}
|
| +
|
| +WebViewMainDelegate::~WebViewMainDelegate() {
|
| +}
|
| +
|
| +int WebViewMainDelegate::RunProcess(
|
| + const std::string& process_type,
|
| + const content::MainFunctionParams& main_function_params) {
|
| + if (process_type.empty()) {
|
| + browser_runner_.reset(content::BrowserMainRunner::Create());
|
| + int exit_code = browser_runner_->Initialize(main_function_params);
|
| + DCHECK(exit_code < 0);
|
| +
|
| + // Return 0 so that we do NOT trigger the default behavior. On Android, the
|
| + // UI message loop is managed by the Java application.
|
| + return 0;
|
| + }
|
| +
|
| + // Android doesn't currently support/need any other process types handled by
|
| + // ChromeMainDelegate, so we simply return -1 here rather than calling the
|
| + // superclass implementation.
|
| + return -1;
|
| +}
|
| +
|
| +} // namespace android_webview
|
|
|