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_MACOSX) || defined(OS_ANDROID) || defined(TOOLKIT_VIEWS) | |
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 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1053 for (size_t i = 0; i < profiles_to_delete.size(); ++i) { | 1058 for (size_t i = 0; i < profiles_to_delete.size(); ++i) { |
1054 profile_manager->ScheduleProfileForDeletion( | 1059 profile_manager->ScheduleProfileForDeletion( |
1055 profiles_to_delete[i], ProfileManager::CreateCallback()); | 1060 profiles_to_delete[i], ProfileManager::CreateCallback()); |
1056 } | 1061 } |
1057 // Clean up stale profiles immediately after browser start. | 1062 // Clean up stale profiles immediately after browser start. |
1058 BrowserThread::PostTask( | 1063 BrowserThread::PostTask( |
1059 BrowserThread::FILE, FROM_HERE, | 1064 BrowserThread::FILE, FROM_HERE, |
1060 base::Bind(&ProfileManager::CleanUpStaleProfiles, profiles_to_delete)); | 1065 base::Bind(&ProfileManager::CleanUpStaleProfiles, profiles_to_delete)); |
1061 } | 1066 } |
1062 #endif // OS_ANDROID | 1067 #endif // OS_ANDROID |
1068 | |
1069 #if defined(ENABLE_EXTENSIONS) | |
1070 InstallJavaScriptDialogExtensionsClient(); | |
pkotwicz
2014/10/31 17:02:43
We are leaking the pointer here. Does it matter?
pkotwicz
2014/10/31 17:07:41
Never mind, I stand corrected
| |
1071 #endif | |
1072 | |
1073 #if defined(OS_MACOSX) || defined(OS_ANDROID) || defined(TOOLKIT_VIEWS) | |
1074 InstallChromeJavaScriptNativeDialogFactory(); | |
1075 #endif | |
1063 } | 1076 } |
1064 | 1077 |
1065 void ChromeBrowserMainParts::PostProfileInit() { | 1078 void ChromeBrowserMainParts::PostProfileInit() { |
1066 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostProfileInit"); | 1079 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostProfileInit"); |
1067 LaunchDevToolsHandlerIfNeeded(parsed_command_line()); | 1080 LaunchDevToolsHandlerIfNeeded(parsed_command_line()); |
1068 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) | 1081 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) |
1069 chrome_extra_parts_[i]->PostProfileInit(); | 1082 chrome_extra_parts_[i]->PostProfileInit(); |
1070 } | 1083 } |
1071 | 1084 |
1072 void ChromeBrowserMainParts::PreBrowserStart() { | 1085 void ChromeBrowserMainParts::PreBrowserStart() { |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1697 chromeos::CrosSettings::Shutdown(); | 1710 chromeos::CrosSettings::Shutdown(); |
1698 #endif | 1711 #endif |
1699 #endif | 1712 #endif |
1700 } | 1713 } |
1701 | 1714 |
1702 // Public members: | 1715 // Public members: |
1703 | 1716 |
1704 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1717 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1705 chrome_extra_parts_.push_back(parts); | 1718 chrome_extra_parts_.push_back(parts); |
1706 } | 1719 } |
OLD | NEW |