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 "chrome/browser/chrome_browser_main_android.h" | 5 #include "chrome/browser/chrome_browser_main_android.h" |
6 | 6 |
7 #include "chrome/app/breakpad_linux.h" | 7 #include "chrome/app/breakpad_linux.h" |
| 8 #include "content/public/browser/android/compositor.h" |
8 #include "content/public/common/main_function_params.h" | 9 #include "content/public/common/main_function_params.h" |
9 #include "net/android/network_change_notifier_factory_android.h" | 10 #include "net/android/network_change_notifier_factory_android.h" |
10 #include "net/base/network_change_notifier.h" | 11 #include "net/base/network_change_notifier.h" |
11 | 12 |
12 ChromeBrowserMainPartsAndroid::ChromeBrowserMainPartsAndroid( | 13 ChromeBrowserMainPartsAndroid::ChromeBrowserMainPartsAndroid( |
13 const content::MainFunctionParams& parameters) | 14 const content::MainFunctionParams& parameters) |
14 : ChromeBrowserMainParts(parameters) { | 15 : ChromeBrowserMainParts(parameters) { |
15 } | 16 } |
16 | 17 |
17 ChromeBrowserMainPartsAndroid::~ChromeBrowserMainPartsAndroid() { | 18 ChromeBrowserMainPartsAndroid::~ChromeBrowserMainPartsAndroid() { |
18 } | 19 } |
19 | 20 |
20 void ChromeBrowserMainPartsAndroid::PreProfileInit() { | 21 void ChromeBrowserMainPartsAndroid::PreProfileInit() { |
21 #if defined(USE_LINUX_BREAKPAD) | 22 #if defined(USE_LINUX_BREAKPAD) |
22 // TODO(jcivelli): we should not initialize the crash-reporter when it was not | 23 // TODO(jcivelli): we should not initialize the crash-reporter when it was not |
23 // enabled. Right now if it is disabled we still generate the minidumps but we | 24 // enabled. Right now if it is disabled we still generate the minidumps but we |
24 // do not upload them. | 25 // do not upload them. |
25 InitCrashReporter(); | 26 InitCrashReporter(); |
26 #endif | 27 #endif |
27 | 28 |
28 ChromeBrowserMainParts::PreProfileInit(); | 29 ChromeBrowserMainParts::PreProfileInit(); |
29 } | 30 } |
30 | 31 |
31 void ChromeBrowserMainPartsAndroid::PreEarlyInitialization() { | 32 void ChromeBrowserMainPartsAndroid::PreEarlyInitialization() { |
32 net::NetworkChangeNotifier::SetFactory( | 33 net::NetworkChangeNotifier::SetFactory( |
33 new net::NetworkChangeNotifierFactoryAndroid()); | 34 new net::NetworkChangeNotifierFactoryAndroid()); |
34 | 35 |
| 36 content::Compositor::Initialize(); |
| 37 |
35 // Chrome on Android does not use default MessageLoop. It has its own | 38 // Chrome on Android does not use default MessageLoop. It has its own |
36 // Android specific MessageLoop. | 39 // Android specific MessageLoop. |
37 DCHECK(!main_message_loop_.get()); | 40 DCHECK(!main_message_loop_.get()); |
38 main_message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI)); | 41 main_message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI)); |
39 MessageLoopForUI::current()->Start(); | 42 MessageLoopForUI::current()->Start(); |
40 | 43 |
41 ChromeBrowserMainParts::PreEarlyInitialization(); | 44 ChromeBrowserMainParts::PreEarlyInitialization(); |
42 } | 45 } |
43 | 46 |
44 void ChromeBrowserMainPartsAndroid::ShowMissingLocaleMessageBox() { | 47 void ChromeBrowserMainPartsAndroid::ShowMissingLocaleMessageBox() { |
45 NOTREACHED(); | 48 NOTREACHED(); |
46 } | 49 } |
47 | 50 |
48 void RecordBreakpadStatusUMA(MetricsService* metrics) { | 51 void RecordBreakpadStatusUMA(MetricsService* metrics) { |
49 // TODO: crbug.com/139023 | 52 // TODO: crbug.com/139023 |
50 NOTIMPLEMENTED(); | 53 NOTIMPLEMENTED(); |
51 } | 54 } |
52 | 55 |
53 void WarnAboutMinimumSystemRequirements() { | 56 void WarnAboutMinimumSystemRequirements() { |
54 } | 57 } |
OLD | NEW |