| 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.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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 #endif | 183 #endif |
| 184 | 184 |
| 185 #if !defined(DISABLE_NACL) | 185 #if !defined(DISABLE_NACL) |
| 186 #include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h" | 186 #include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h" |
| 187 #include "components/nacl/browser/nacl_process_host.h" | 187 #include "components/nacl/browser/nacl_process_host.h" |
| 188 #endif | 188 #endif |
| 189 | 189 |
| 190 #if defined(ENABLE_EXTENSIONS) | 190 #if defined(ENABLE_EXTENSIONS) |
| 191 #include "chrome/browser/extensions/startup_helper.h" | 191 #include "chrome/browser/extensions/startup_helper.h" |
| 192 #include "extensions/browser/extension_protocols.h" | 192 #include "extensions/browser/extension_protocols.h" |
| 193 #include "extensions/components/javascript_dialog_extensions_client/javascript_d
ialog_extension_client_impl.h" |
| 193 #endif | 194 #endif |
| 194 | 195 |
| 195 #if defined(ENABLE_FULL_PRINTING) && !defined(OFFICIAL_BUILD) | 196 #if defined(ENABLE_FULL_PRINTING) && !defined(OFFICIAL_BUILD) |
| 196 #include "printing/printed_document.h" | 197 #include "printing/printed_document.h" |
| 197 #endif | 198 #endif |
| 198 | 199 |
| 200 #if !defined(OS_IOS) |
| 201 #include "chrome/browser/ui/app_modal_dialogs/chrome_javascript_native_dialog_fa
ctory.h" |
| 202 #endif |
| 203 |
| 199 #if defined(ENABLE_RLZ) | 204 #if defined(ENABLE_RLZ) |
| 200 #include "chrome/browser/rlz/rlz.h" | 205 #include "chrome/browser/rlz/rlz.h" |
| 201 #endif | 206 #endif |
| 202 | 207 |
| 203 #if defined(ENABLE_WEBRTC) | 208 #if defined(ENABLE_WEBRTC) |
| 204 #include "chrome/browser/media/webrtc_log_util.h" | 209 #include "chrome/browser/media/webrtc_log_util.h" |
| 205 #endif | 210 #endif |
| 206 | 211 |
| 207 #if defined(USE_AURA) | 212 #if defined(USE_AURA) |
| 208 #include "ui/aura/env.h" | 213 #include "ui/aura/env.h" |
| (...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1054 for (size_t i = 0; i < profiles_to_delete.size(); ++i) { | 1059 for (size_t i = 0; i < profiles_to_delete.size(); ++i) { |
| 1055 profile_manager->ScheduleProfileForDeletion( | 1060 profile_manager->ScheduleProfileForDeletion( |
| 1056 profiles_to_delete[i], ProfileManager::CreateCallback()); | 1061 profiles_to_delete[i], ProfileManager::CreateCallback()); |
| 1057 } | 1062 } |
| 1058 // Clean up stale profiles immediately after browser start. | 1063 // Clean up stale profiles immediately after browser start. |
| 1059 BrowserThread::PostTask( | 1064 BrowserThread::PostTask( |
| 1060 BrowserThread::FILE, FROM_HERE, | 1065 BrowserThread::FILE, FROM_HERE, |
| 1061 base::Bind(&ProfileManager::CleanUpStaleProfiles, profiles_to_delete)); | 1066 base::Bind(&ProfileManager::CleanUpStaleProfiles, profiles_to_delete)); |
| 1062 } | 1067 } |
| 1063 #endif // OS_ANDROID | 1068 #endif // OS_ANDROID |
| 1069 |
| 1070 #if defined(ENABLE_EXTENSIONS) |
| 1071 InstallJavaScriptDialogExtensionsClient(); |
| 1072 #endif |
| 1073 |
| 1074 #if !defined(OS_IOS) |
| 1075 InstallChromeJavaScriptNativeDialogFactory(); |
| 1076 #endif |
| 1064 } | 1077 } |
| 1065 | 1078 |
| 1066 void ChromeBrowserMainParts::PostProfileInit() { | 1079 void ChromeBrowserMainParts::PostProfileInit() { |
| 1067 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostProfileInit"); | 1080 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostProfileInit"); |
| 1068 LaunchDevToolsHandlerIfNeeded(parsed_command_line()); | 1081 LaunchDevToolsHandlerIfNeeded(parsed_command_line()); |
| 1069 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) | 1082 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) |
| 1070 chrome_extra_parts_[i]->PostProfileInit(); | 1083 chrome_extra_parts_[i]->PostProfileInit(); |
| 1071 } | 1084 } |
| 1072 | 1085 |
| 1073 void ChromeBrowserMainParts::PreBrowserStart() { | 1086 void ChromeBrowserMainParts::PreBrowserStart() { |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1698 chromeos::CrosSettings::Shutdown(); | 1711 chromeos::CrosSettings::Shutdown(); |
| 1699 #endif | 1712 #endif |
| 1700 #endif | 1713 #endif |
| 1701 } | 1714 } |
| 1702 | 1715 |
| 1703 // Public members: | 1716 // Public members: |
| 1704 | 1717 |
| 1705 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1718 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1706 chrome_extra_parts_.push_back(parts); | 1719 chrome_extra_parts_.push_back(parts); |
| 1707 } | 1720 } |
| OLD | NEW |