OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/browser_init.h" | 5 #include "chrome/browser/browser_init.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/event_recorder.h" | 9 #include "base/event_recorder.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "chrome/browser/renderer_host/render_process_host.h" | 26 #include "chrome/browser/renderer_host/render_process_host.h" |
27 #include "chrome/browser/search_engines/template_url_model.h" | 27 #include "chrome/browser/search_engines/template_url_model.h" |
28 #include "chrome/browser/session_startup_pref.h" | 28 #include "chrome/browser/session_startup_pref.h" |
29 #include "chrome/browser/sessions/session_restore.h" | 29 #include "chrome/browser/sessions/session_restore.h" |
30 #include "chrome/browser/shell_integration.h" | 30 #include "chrome/browser/shell_integration.h" |
31 #include "chrome/browser/tab_contents/infobar_delegate.h" | 31 #include "chrome/browser/tab_contents/infobar_delegate.h" |
32 #include "chrome/browser/tab_contents/navigation_controller.h" | 32 #include "chrome/browser/tab_contents/navigation_controller.h" |
33 #include "chrome/browser/tab_contents/tab_contents.h" | 33 #include "chrome/browser/tab_contents/tab_contents.h" |
34 #include "chrome/browser/tab_contents/tab_contents_view.h" | 34 #include "chrome/browser/tab_contents/tab_contents_view.h" |
35 #include "chrome/browser/net/url_fixer_upper.h" | 35 #include "chrome/browser/net/url_fixer_upper.h" |
| 36 #include "chrome/browser/status_icons/status_tray_manager.h" |
36 #include "chrome/browser/user_data_manager.h" | 37 #include "chrome/browser/user_data_manager.h" |
37 #include "chrome/common/chrome_constants.h" | 38 #include "chrome/common/chrome_constants.h" |
38 #include "chrome/common/chrome_paths.h" | 39 #include "chrome/common/chrome_paths.h" |
39 #include "chrome/common/chrome_switches.h" | 40 #include "chrome/common/chrome_switches.h" |
40 #include "chrome/common/pref_names.h" | 41 #include "chrome/common/pref_names.h" |
41 #include "chrome/common/result_codes.h" | 42 #include "chrome/common/result_codes.h" |
42 #include "chrome/common/url_constants.h" | 43 #include "chrome/common/url_constants.h" |
43 #include "chrome/installer/util/browser_distribution.h" | 44 #include "chrome/installer/util/browser_distribution.h" |
44 #include "grit/chromium_strings.h" | 45 #include "grit/chromium_strings.h" |
45 #include "grit/generated_resources.h" | 46 #include "grit/generated_resources.h" |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 } | 383 } |
383 if (process_startup) { | 384 if (process_startup) { |
384 // TODO(dhg): Try to make this just USBMountObserver::Get()->set_profile | 385 // TODO(dhg): Try to make this just USBMountObserver::Get()->set_profile |
385 // and have the constructor take care of everything else. | 386 // and have the constructor take care of everything else. |
386 chromeos::MountLibrary* lib = chromeos::MountLibrary::Get(); | 387 chromeos::MountLibrary* lib = chromeos::MountLibrary::Get(); |
387 chromeos::USBMountObserver* observe = chromeos::USBMountObserver::Get(); | 388 chromeos::USBMountObserver* observe = chromeos::USBMountObserver::Get(); |
388 observe->set_profile(profile); | 389 observe->set_profile(profile); |
389 lib->AddObserver(observe); | 390 lib->AddObserver(observe); |
390 } | 391 } |
391 #endif | 392 #endif |
| 393 #if defined(OS_MACOSX) |
| 394 // TODO(atwilson): Status tray UI is currently only supported on the mac |
| 395 // (http://crbug.com/37375). |
| 396 if (command_line.HasSwitch(switches::kLongLivedExtensions)) { |
| 397 // Create status icons |
| 398 StatusTrayManager* tray = g_browser_process->status_tray_manager(); |
| 399 if (tray) |
| 400 tray->Init(profile); |
| 401 } |
| 402 #endif |
| 403 |
392 return true; | 404 return true; |
393 } | 405 } |
394 | 406 |
395 // LaunchWithProfile ---------------------------------------------------------- | 407 // LaunchWithProfile ---------------------------------------------------------- |
396 | 408 |
397 BrowserInit::LaunchWithProfile::LaunchWithProfile( | 409 BrowserInit::LaunchWithProfile::LaunchWithProfile( |
398 const std::wstring& cur_dir, | 410 const std::wstring& cur_dir, |
399 const CommandLine& command_line) | 411 const CommandLine& command_line) |
400 : cur_dir_(cur_dir), | 412 : cur_dir_(cur_dir), |
401 command_line_(command_line), | 413 command_line_(command_line), |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
934 scoped_refptr<AutomationProviderClass> automation = | 946 scoped_refptr<AutomationProviderClass> automation = |
935 new AutomationProviderClass(profile); | 947 new AutomationProviderClass(profile); |
936 automation->ConnectToChannel(channel_id); | 948 automation->ConnectToChannel(channel_id); |
937 automation->SetExpectedTabCount(expected_tabs); | 949 automation->SetExpectedTabCount(expected_tabs); |
938 | 950 |
939 AutomationProviderList* list = | 951 AutomationProviderList* list = |
940 g_browser_process->InitAutomationProviderList(); | 952 g_browser_process->InitAutomationProviderList(); |
941 DCHECK(list); | 953 DCHECK(list); |
942 list->AddProvider(automation); | 954 list->AddProvider(automation); |
943 } | 955 } |
OLD | NEW |