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/ui/startup/startup_browser_creator_impl.h" | 5 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "apps/app_restore_service.h" | 10 #include "apps/app_restore_service.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "base/strings/utf_string_conversions.h" | 25 #include "base/strings/utf_string_conversions.h" |
26 #include "base/threading/thread_restrictions.h" | 26 #include "base/threading/thread_restrictions.h" |
27 #include "chrome/browser/auto_launch_trial.h" | 27 #include "chrome/browser/auto_launch_trial.h" |
28 #include "chrome/browser/browser_process.h" | 28 #include "chrome/browser/browser_process.h" |
29 #include "chrome/browser/chrome_notification_types.h" | 29 #include "chrome/browser/chrome_notification_types.h" |
30 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 30 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
31 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" | 31 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" |
32 #include "chrome/browser/defaults.h" | 32 #include "chrome/browser/defaults.h" |
33 #include "chrome/browser/extensions/extension_creator.h" | 33 #include "chrome/browser/extensions/extension_creator.h" |
34 #include "chrome/browser/extensions/extension_service.h" | 34 #include "chrome/browser/extensions/extension_service.h" |
| 35 #include "chrome/browser/extensions/extension_system.h" |
35 #include "chrome/browser/extensions/pack_extension_job.h" | 36 #include "chrome/browser/extensions/pack_extension_job.h" |
36 #include "chrome/browser/first_run/first_run.h" | 37 #include "chrome/browser/first_run/first_run.h" |
37 #include "chrome/browser/google/google_util.h" | 38 #include "chrome/browser/google/google_util.h" |
38 #include "chrome/browser/infobars/infobar_service.h" | 39 #include "chrome/browser/infobars/infobar_service.h" |
39 #include "chrome/browser/net/predictor.h" | 40 #include "chrome/browser/net/predictor.h" |
40 #include "chrome/browser/notifications/desktop_notification_service.h" | 41 #include "chrome/browser/notifications/desktop_notification_service.h" |
41 #include "chrome/browser/performance_monitor/startup_timer.h" | 42 #include "chrome/browser/performance_monitor/startup_timer.h" |
42 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 43 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
43 #include "chrome/browser/prefs/session_startup_pref.h" | 44 #include "chrome/browser/prefs/session_startup_pref.h" |
44 #include "chrome/browser/profiles/profile.h" | 45 #include "chrome/browser/profiles/profile.h" |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 KeystoneInfoBar::PromotionInfoBar(profile); | 383 KeystoneInfoBar::PromotionInfoBar(profile); |
383 } | 384 } |
384 #endif | 385 #endif |
385 } | 386 } |
386 | 387 |
387 #if defined(OS_WIN) | 388 #if defined(OS_WIN) |
388 if (process_startup) | 389 if (process_startup) |
389 ShellIntegration::MigrateChromiumShortcuts(); | 390 ShellIntegration::MigrateChromiumShortcuts(); |
390 #endif // defined(OS_WIN) | 391 #endif // defined(OS_WIN) |
391 | 392 |
| 393 // If we deferred creation of background extension hosts, we want to create |
| 394 // them now that the session (if any) has been restored. |
| 395 ExtensionProcessManager* process_manager = |
| 396 extensions::ExtensionSystem::Get(profile)->process_manager(); |
| 397 process_manager->DeferBackgroundHostCreation(false); |
| 398 |
392 return true; | 399 return true; |
393 } | 400 } |
394 | 401 |
395 void StartupBrowserCreatorImpl::ExtractOptionalAppWindowSize( | 402 void StartupBrowserCreatorImpl::ExtractOptionalAppWindowSize( |
396 gfx::Rect* bounds) { | 403 gfx::Rect* bounds) { |
397 if (command_line_.HasSwitch(switches::kAppWindowSize)) { | 404 if (command_line_.HasSwitch(switches::kAppWindowSize)) { |
398 int width, height; | 405 int width, height; |
399 width = height = 0; | 406 width = height = 0; |
400 std::string switch_value = | 407 std::string switch_value = |
401 command_line_.GetSwitchValueASCII(switches::kAppWindowSize); | 408 command_line_.GetSwitchValueASCII(switches::kAppWindowSize); |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
954 } | 961 } |
955 | 962 |
956 #if !defined(OS_WIN) | 963 #if !defined(OS_WIN) |
957 // static | 964 // static |
958 bool StartupBrowserCreatorImpl::OpenStartupURLsInExistingBrowser( | 965 bool StartupBrowserCreatorImpl::OpenStartupURLsInExistingBrowser( |
959 Profile* profile, | 966 Profile* profile, |
960 const std::vector<GURL>& startup_urls) { | 967 const std::vector<GURL>& startup_urls) { |
961 return false; | 968 return false; |
962 } | 969 } |
963 #endif | 970 #endif |
OLD | NEW |