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

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

Issue 1459793002: Android: Allow compiling browser without Java UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
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.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 #include "chrome/browser/ui/startup/startup_browser_creator.h" 90 #include "chrome/browser/ui/startup/startup_browser_creator.h"
91 #include "chrome/browser/ui/uma_browsing_activity_observer.h" 91 #include "chrome/browser/ui/uma_browsing_activity_observer.h"
92 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" 92 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
93 #include "chrome/common/channel_info.h" 93 #include "chrome/common/channel_info.h"
94 #include "chrome/common/chrome_constants.h" 94 #include "chrome/common/chrome_constants.h"
95 #include "chrome/common/chrome_paths.h" 95 #include "chrome/common/chrome_paths.h"
96 #include "chrome/common/chrome_result_codes.h" 96 #include "chrome/common/chrome_result_codes.h"
97 #include "chrome/common/chrome_switches.h" 97 #include "chrome/common/chrome_switches.h"
98 #include "chrome/common/crash_keys.h" 98 #include "chrome/common/crash_keys.h"
99 #include "chrome/common/env_vars.h" 99 #include "chrome/common/env_vars.h"
100 #include "chrome/common/features.h"
100 #include "chrome/common/logging_chrome.h" 101 #include "chrome/common/logging_chrome.h"
101 #include "chrome/common/net/net_resource_provider.h" 102 #include "chrome/common/net/net_resource_provider.h"
102 #include "chrome/common/pref_names.h" 103 #include "chrome/common/pref_names.h"
103 #include "chrome/common/profiling.h" 104 #include "chrome/common/profiling.h"
104 #include "chrome/common/variations/variations_util.h" 105 #include "chrome/common/variations/variations_util.h"
105 #include "chrome/grit/generated_resources.h" 106 #include "chrome/grit/generated_resources.h"
106 #include "chrome/installer/util/google_update_settings.h" 107 #include "chrome/installer/util/google_update_settings.h"
107 #include "components/component_updater/component_updater_service.h" 108 #include "components/component_updater/component_updater_service.h"
108 #include "components/device_event_log/device_event_log.h" 109 #include "components/device_event_log/device_event_log.h"
109 #include "components/flags_ui/pref_service_flags_storage.h" 110 #include "components/flags_ui/pref_service_flags_storage.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 #include "net/base/net_module.h" 144 #include "net/base/net_module.h"
144 #include "net/cookies/cookie_monster.h" 145 #include "net/cookies/cookie_monster.h"
145 #include "net/http/http_network_layer.h" 146 #include "net/http/http_network_layer.h"
146 #include "net/http/http_stream_factory.h" 147 #include "net/http/http_stream_factory.h"
147 #include "net/url_request/url_request.h" 148 #include "net/url_request/url_request.h"
148 #include "ui/base/l10n/l10n_util.h" 149 #include "ui/base/l10n/l10n_util.h"
149 #include "ui/base/layout.h" 150 #include "ui/base/layout.h"
150 #include "ui/base/resource/resource_bundle.h" 151 #include "ui/base/resource/resource_bundle.h"
151 #include "ui/strings/grit/app_locale_settings.h" 152 #include "ui/strings/grit/app_locale_settings.h"
152 153
154 #if BUILDFLAG(ANDROID_JAVA_UI)
155 #include "chrome/browser/android/dev_tools_discovery_provider_android.h"
156 #else
157 #include "chrome/browser/devtools/chrome_devtools_discovery_provider.h"
158 #endif
159
153 #if defined(OS_ANDROID) 160 #if defined(OS_ANDROID)
154 #include "chrome/browser/android/dev_tools_discovery_provider_android.h"
155 #include "chrome/browser/metrics/thread_watcher_android.h" 161 #include "chrome/browser/metrics/thread_watcher_android.h"
156 #include "ui/base/resource/resource_bundle_android.h" 162 #include "ui/base/resource/resource_bundle_android.h"
157 #else 163 #else
158 #include "chrome/browser/devtools/chrome_devtools_discovery_provider.h"
159 #include "chrome/browser/feedback/feedback_profile_observer.h" 164 #include "chrome/browser/feedback/feedback_profile_observer.h"
160 #endif // defined(OS_ANDROID) 165 #endif // defined(OS_ANDROID)
161 166
162 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 167 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
163 #include "chrome/browser/first_run/upgrade_util_linux.h" 168 #include "chrome/browser/first_run/upgrade_util_linux.h"
164 #include "chrome/browser/sxs_linux.h" 169 #include "chrome/browser/sxs_linux.h"
165 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) 170 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
166 171
167 #if defined(OS_CHROMEOS) 172 #if defined(OS_CHROMEOS)
168 #include "chrome/browser/chromeos/settings/cros_settings.h" 173 #include "chrome/browser/chromeos/settings/cros_settings.h"
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
1156 #endif // defined(ENABLE_EXTENSIONS) 1161 #endif // defined(ENABLE_EXTENSIONS)
1157 1162
1158 #if !defined(OS_IOS) 1163 #if !defined(OS_IOS)
1159 InstallChromeJavaScriptNativeDialogFactory(); 1164 InstallChromeJavaScriptNativeDialogFactory();
1160 #endif // !defined(OS_IOS) 1165 #endif // !defined(OS_IOS)
1161 } 1166 }
1162 1167
1163 void ChromeBrowserMainParts::PostProfileInit() { 1168 void ChromeBrowserMainParts::PostProfileInit() {
1164 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostProfileInit"); 1169 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostProfileInit");
1165 1170
1166 #if defined(OS_ANDROID) 1171 #if BUILDFLAG(ANDROID_JAVA_UI)
1167 DevToolsDiscoveryProviderAndroid::Install(); 1172 DevToolsDiscoveryProviderAndroid::Install();
1168 #else 1173 #else
1169 ChromeDevToolsDiscoveryProvider::Install(); 1174 ChromeDevToolsDiscoveryProvider::Install();
1170 #endif // defined(OS_ANDROID) 1175 #endif // BUILDFLAG(ANDROID_JAVA_UI)
1171 1176
1172 LaunchDevToolsHandlerIfNeeded(parsed_command_line()); 1177 LaunchDevToolsHandlerIfNeeded(parsed_command_line());
1173 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) 1178 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
1174 chrome_extra_parts_[i]->PostProfileInit(); 1179 chrome_extra_parts_[i]->PostProfileInit();
1175 } 1180 }
1176 1181
1177 void ChromeBrowserMainParts::PreBrowserStart() { 1182 void ChromeBrowserMainParts::PreBrowserStart() {
1178 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreBrowserStart"); 1183 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreBrowserStart");
1179 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) 1184 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
1180 chrome_extra_parts_[i]->PreBrowserStart(); 1185 chrome_extra_parts_[i]->PreBrowserStart();
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
1882 chromeos::CrosSettings::Shutdown(); 1887 chromeos::CrosSettings::Shutdown();
1883 #endif // defined(OS_CHROMEOS) 1888 #endif // defined(OS_CHROMEOS)
1884 #endif // defined(OS_ANDROID) 1889 #endif // defined(OS_ANDROID)
1885 } 1890 }
1886 1891
1887 // Public members: 1892 // Public members:
1888 1893
1889 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1894 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1890 chrome_extra_parts_.push_back(parts); 1895 chrome_extra_parts_.push_back(parts);
1891 } 1896 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698