Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Unified Diff: android_webview/lib/main/webview_main_delegate.cc

Issue 10825155: Build target for Android WebView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Shuffle files about a bit and address comments Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/lib/main/webview_main_delegate.cc
diff --git a/android_webview/lib/main/webview_main_delegate.cc b/android_webview/lib/main/webview_main_delegate.cc
new file mode 100644
index 0000000000000000000000000000000000000000..04db087ae372169af62a66197a517c4fa0b0c316
--- /dev/null
+++ b/android_webview/lib/main/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/main/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

Powered by Google App Engine
This is Rietveld 408576698