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

Unified Diff: chrome/browser/chrome_browser_main_android.cc

Issue 10819003: Upstreaming ChromeBrowserMainAndroid (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 2 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
« no previous file with comments | « chrome/browser/chrome_browser_main_android.h ('k') | chrome/browser/chrome_browser_main_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main_android.cc
diff --git a/chrome/browser/chrome_browser_main_android.cc b/chrome/browser/chrome_browser_main_android.cc
new file mode 100644
index 0000000000000000000000000000000000000000..83d4e9d789cf60b989dd5828dfbdf4a3539c546c
--- /dev/null
+++ b/chrome/browser/chrome_browser_main_android.cc
@@ -0,0 +1,50 @@
+// 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 "chrome/browser/chrome_browser_main_android.h"
+
+#include "base/android/jni_android.h"
+#include "chrome/browser/android/chrome_jni_registrar.h"
+#include "chrome/common/chrome_switches.h"
+#include "content/public/common/main_function_params.h"
+#include "net/android/network_change_notifier_factory.h"
+#include "net/base/network_change_notifier.h"
+
+ChromeBrowserMainPartsAndroid::ChromeBrowserMainPartsAndroid(
+ const content::MainFunctionParams& parameters)
+ : ChromeBrowserMainParts(parameters) {
+}
+
+ChromeBrowserMainPartsAndroid::~ChromeBrowserMainPartsAndroid() {
+}
+
+void ChromeBrowserMainPartsAndroid::PreEarlyInitialization() {
+ JNIEnv* env = base::android::AttachCurrentThread();
+ DCHECK(env);
+
+ chrome::android::RegisterJni(env);
+
+ net::NetworkChangeNotifier::SetFactory(
+ new net::android::NetworkChangeNotifierFactory());
+
+ // Chrome on Android does not use default MessageLoop. It has its own
+ // Android specific MessageLoop.
+ DCHECK(!main_message_loop_.get());
+ main_message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI));
+ MessageLoopForUI::current()->Start();
+
+ ChromeBrowserMainParts::PreEarlyInitialization();
+}
+
+void ChromeBrowserMainPartsAndroid::ShowMissingLocaleMessageBox() {
+ NOTREACHED();
+}
+
+void RecordBreakpadStatusUMA(MetricsService* metrics) {
+ // TODO: crbug.com/139023
+ NOTIMPLEMENTED();
+}
+
+void WarnAboutMinimumSystemRequirements() {
+}
« no previous file with comments | « chrome/browser/chrome_browser_main_android.h ('k') | chrome/browser/chrome_browser_main_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698