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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 #include "ui/shell_dialogs/select_file_dialog.h" | 175 #include "ui/shell_dialogs/select_file_dialog.h" |
176 #endif // defined(OS_WIN) | 176 #endif // defined(OS_WIN) |
177 | 177 |
178 #if defined(OS_MACOSX) | 178 #if defined(OS_MACOSX) |
179 #include <Security/Security.h> | 179 #include <Security/Security.h> |
180 | 180 |
181 #include "base/mac/scoped_nsautorelease_pool.h" | 181 #include "base/mac/scoped_nsautorelease_pool.h" |
182 #include "chrome/browser/mac/keystone_glue.h" | 182 #include "chrome/browser/mac/keystone_glue.h" |
183 #endif | 183 #endif |
184 | 184 |
| 185 #if !defined(OS_IOS) |
| 186 #include "chrome/browser/ui/app_modal_dialogs/chrome_javascript_native_dialog_fa
ctory.h" |
| 187 #endif |
| 188 |
185 #if !defined(DISABLE_NACL) | 189 #if !defined(DISABLE_NACL) |
186 #include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h" | 190 #include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h" |
187 #include "components/nacl/browser/nacl_process_host.h" | 191 #include "components/nacl/browser/nacl_process_host.h" |
188 #endif | 192 #endif |
189 | 193 |
190 #if defined(ENABLE_EXTENSIONS) | 194 #if defined(ENABLE_EXTENSIONS) |
191 #include "chrome/browser/extensions/startup_helper.h" | 195 #include "chrome/browser/extensions/startup_helper.h" |
192 #include "extensions/browser/extension_protocols.h" | 196 #include "extensions/browser/extension_protocols.h" |
| 197 #include "extensions/components/javascript_dialog_extensions_client/javascript_d
ialog_extension_client_impl.h" |
193 #endif | 198 #endif |
194 | 199 |
195 #if defined(ENABLE_FULL_PRINTING) && !defined(OFFICIAL_BUILD) | 200 #if defined(ENABLE_FULL_PRINTING) && !defined(OFFICIAL_BUILD) |
196 #include "printing/printed_document.h" | 201 #include "printing/printed_document.h" |
197 #endif | 202 #endif |
198 | 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 |
(...skipping 850 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(); |
| 1071 #endif |
| 1072 |
| 1073 #if !defined(OS_IOS) |
| 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 |