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

Side by Side Diff: chrome/browser/chrome_browser_main_android.cc

Issue 1481623002: Don't use Compositor::Initialize for Aura Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ifdef android compositor Created 5 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/android/build_info.h" 7 #include "base/android/build_info.h"
8 #include "base/base_switches.h" 8 #include "base/base_switches.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/files/file_util.h" 11 #include "base/files/file_util.h"
12 #include "base/path_service.h" 12 #include "base/path_service.h"
13 #include "base/trace_event/trace_event.h" 13 #include "base/trace_event/trace_event.h"
14 #include "chrome/browser/android/chrome_media_client_android.h" 14 #include "chrome/browser/android/chrome_media_client_android.h"
15 #include "chrome/browser/android/seccomp_support_detector.h" 15 #include "chrome/browser/android/seccomp_support_detector.h"
16 #include "chrome/browser/signin/signin_manager_factory.h" 16 #include "chrome/browser/signin/signin_manager_factory.h"
17 #include "chrome/common/chrome_paths.h" 17 #include "chrome/common/chrome_paths.h"
18 #include "components/crash/content/app/breakpad_linux.h" 18 #include "components/crash/content/app/breakpad_linux.h"
19 #include "components/crash/content/browser/crash_dump_manager_android.h" 19 #include "components/crash/content/browser/crash_dump_manager_android.h"
20 #include "components/enhanced_bookmarks/persistent_image_store.h" 20 #include "components/enhanced_bookmarks/persistent_image_store.h"
21 #include "components/signin/core/browser/signin_manager.h" 21 #include "components/signin/core/browser/signin_manager.h"
22 #include "content/public/browser/android/compositor.h"
23 #include "content/public/browser/browser_thread.h" 22 #include "content/public/browser/browser_thread.h"
24 #include "content/public/common/main_function_params.h" 23 #include "content/public/common/main_function_params.h"
25 #include "media/base/android/media_client_android.h" 24 #include "media/base/android/media_client_android.h"
26 #include "net/android/network_change_notifier_factory_android.h" 25 #include "net/android/network_change_notifier_factory_android.h"
27 #include "net/base/network_change_notifier.h" 26 #include "net/base/network_change_notifier.h"
28 #include "ui/base/resource/resource_bundle_android.h" 27 #include "ui/base/resource/resource_bundle_android.h"
29 #include "ui/base/ui_base_paths.h" 28 #include "ui/base/ui_base_paths.h"
30 29
30 #if !defined(USE_AURA)
31 #include "content/public/browser/android/compositor.h"
32 #endif
33
31 namespace { 34 namespace {
32 35
33 void DeleteFileTask( 36 void DeleteFileTask(
34 const base::FilePath& file_path) { 37 const base::FilePath& file_path) {
35 if (base::PathExists(file_path)) 38 if (base::PathExists(file_path))
36 base::DeleteFile(file_path, false); 39 base::DeleteFile(file_path, false);
37 } 40 }
38 41
39 } // namespace 42 } // namespace
40 43
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 base::Bind(&DeleteFileTask, bookmark_image_file_path), 96 base::Bind(&DeleteFileTask, bookmark_image_file_path),
94 base::TimeDelta::FromMinutes(1)); 97 base::TimeDelta::FromMinutes(1));
95 } 98 }
96 99
97 void ChromeBrowserMainPartsAndroid::PreEarlyInitialization() { 100 void ChromeBrowserMainPartsAndroid::PreEarlyInitialization() {
98 TRACE_EVENT0("startup", 101 TRACE_EVENT0("startup",
99 "ChromeBrowserMainPartsAndroid::PreEarlyInitialization") 102 "ChromeBrowserMainPartsAndroid::PreEarlyInitialization")
100 net::NetworkChangeNotifier::SetFactory( 103 net::NetworkChangeNotifier::SetFactory(
101 new net::NetworkChangeNotifierFactoryAndroid()); 104 new net::NetworkChangeNotifierFactoryAndroid());
102 105
106 #if !defined(USE_AURA)
103 content::Compositor::Initialize(); 107 content::Compositor::Initialize();
108 #endif
104 109
105 // Chrome on Android does not use default MessageLoop. It has its own 110 // Chrome on Android does not use default MessageLoop. It has its own
106 // Android specific MessageLoop. 111 // Android specific MessageLoop.
107 DCHECK(!main_message_loop_.get()); 112 DCHECK(!main_message_loop_.get());
108 113
109 // Create and start the MessageLoop. 114 // Create and start the MessageLoop.
110 // This is a critical point in the startup process. 115 // This is a critical point in the startup process.
111 { 116 {
112 TRACE_EVENT0("startup", 117 TRACE_EVENT0("startup",
113 "ChromeBrowserMainPartsAndroid::PreEarlyInitialization:CreateUiMsgLoop"); 118 "ChromeBrowserMainPartsAndroid::PreEarlyInitialization:CreateUiMsgLoop");
(...skipping 19 matching lines...) Expand all
133 ChromeBrowserMainParts::PostBrowserStart(); 138 ChromeBrowserMainParts::PostBrowserStart();
134 139
135 content::BrowserThread::GetBlockingPool()->PostDelayedTask(FROM_HERE, 140 content::BrowserThread::GetBlockingPool()->PostDelayedTask(FROM_HERE,
136 base::Bind(&SeccompSupportDetector::StartDetection), 141 base::Bind(&SeccompSupportDetector::StartDetection),
137 base::TimeDelta::FromMinutes(1)); 142 base::TimeDelta::FromMinutes(1));
138 } 143 }
139 144
140 void ChromeBrowserMainPartsAndroid::ShowMissingLocaleMessageBox() { 145 void ChromeBrowserMainPartsAndroid::ShowMissingLocaleMessageBox() {
141 NOTREACHED(); 146 NOTREACHED();
142 } 147 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698