OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 if (parsed_command_line.HasSwitch(switches::kEnableGView)) { | 410 if (parsed_command_line.HasSwitch(switches::kEnableGView)) { |
411 chromeos::GViewRequestInterceptor::GetGViewRequestInterceptor(); | 411 chromeos::GViewRequestInterceptor::GetGViewRequestInterceptor(); |
412 } | 412 } |
413 if (process_startup) { | 413 if (process_startup) { |
414 // TODO(dhg): Try to make this just USBMountObserver::Get()->set_profile | 414 // TODO(dhg): Try to make this just USBMountObserver::Get()->set_profile |
415 // and have the constructor take care of everything else. | 415 // and have the constructor take care of everything else. |
416 chromeos::MountLibrary* lib = | 416 chromeos::MountLibrary* lib = |
417 chromeos::CrosLibrary::Get()->GetMountLibrary(); | 417 chromeos::CrosLibrary::Get()->GetMountLibrary(); |
418 chromeos::USBMountObserver* observe = chromeos::USBMountObserver::Get(); | 418 chromeos::USBMountObserver* observe = chromeos::USBMountObserver::Get(); |
419 lib->AddObserver(observe); | 419 lib->AddObserver(observe); |
420 | 420 observe->ScanForDevices(lib); |
421 // Connect the chromeos notifications | 421 // Connect the chromeos notifications |
422 | 422 |
423 // This observer is a singleton. It is never deleted but the pointer is kept | 423 // This observer is a singleton. It is never deleted but the pointer is kept |
424 // in a global so that it isn't reported as a leak. | 424 // in a global so that it isn't reported as a leak. |
425 static chromeos::LowBatteryObserver* low_battery_observer = | 425 static chromeos::LowBatteryObserver* low_battery_observer = |
426 new chromeos::LowBatteryObserver(profile); | 426 new chromeos::LowBatteryObserver(profile); |
427 chromeos::CrosLibrary::Get()->GetPowerLibrary()->AddObserver( | 427 chromeos::CrosLibrary::Get()->GetPowerLibrary()->AddObserver( |
428 low_battery_observer); | 428 low_battery_observer); |
429 | 429 |
430 static chromeos::NetworkMessageObserver* network_message_observer = | 430 static chromeos::NetworkMessageObserver* network_message_observer = |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1041 scoped_refptr<AutomationProviderClass> automation = | 1041 scoped_refptr<AutomationProviderClass> automation = |
1042 new AutomationProviderClass(profile); | 1042 new AutomationProviderClass(profile); |
1043 automation->ConnectToChannel(channel_id); | 1043 automation->ConnectToChannel(channel_id); |
1044 automation->SetExpectedTabCount(expected_tabs); | 1044 automation->SetExpectedTabCount(expected_tabs); |
1045 | 1045 |
1046 AutomationProviderList* list = | 1046 AutomationProviderList* list = |
1047 g_browser_process->InitAutomationProviderList(); | 1047 g_browser_process->InitAutomationProviderList(); |
1048 DCHECK(list); | 1048 DCHECK(list); |
1049 list->AddProvider(automation); | 1049 list->AddProvider(automation); |
1050 } | 1050 } |
OLD | NEW |