OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_init.h" | 5 #include "chrome/browser/ui/browser_init.h" |
6 | 6 |
7 #include <algorithm> // For max(). | 7 #include <algorithm> // For max(). |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/environment.h" | 10 #include "base/environment.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 #if defined(OS_CHROMEOS) | 95 #if defined(OS_CHROMEOS) |
96 #include "chrome/browser/chromeos/cros/cros_library.h" | 96 #include "chrome/browser/chromeos/cros/cros_library.h" |
97 #include "chrome/browser/chromeos/cros/mount_library.h" | 97 #include "chrome/browser/chromeos/cros/mount_library.h" |
98 #include "chrome/browser/chromeos/cros/network_library.h" | 98 #include "chrome/browser/chromeos/cros/network_library.h" |
99 #include "chrome/browser/chromeos/customization_document.h" | 99 #include "chrome/browser/chromeos/customization_document.h" |
100 #include "chrome/browser/chromeos/enterprise_extension_observer.h" | 100 #include "chrome/browser/chromeos/enterprise_extension_observer.h" |
101 #include "chrome/browser/chromeos/gview_request_interceptor.h" | 101 #include "chrome/browser/chromeos/gview_request_interceptor.h" |
102 #include "chrome/browser/chromeos/low_battery_observer.h" | 102 #include "chrome/browser/chromeos/low_battery_observer.h" |
103 #include "chrome/browser/chromeos/network_message_observer.h" | 103 #include "chrome/browser/chromeos/network_message_observer.h" |
104 #include "chrome/browser/chromeos/sms_observer.h" | 104 #include "chrome/browser/chromeos/sms_observer.h" |
105 #include "chrome/browser/chromeos/update_observer.h" | |
106 #if defined(TOOLKIT_USES_GTK) | 105 #if defined(TOOLKIT_USES_GTK) |
107 #include "chrome/browser/chromeos/wm_message_listener.h" | 106 #include "chrome/browser/chromeos/wm_message_listener.h" |
108 #endif | 107 #endif |
109 #endif | 108 #endif |
110 | 109 |
111 #if defined(TOUCH_UI) | 110 #if defined(TOUCH_UI) |
112 #include "ui/base/touch/touch_factory.h" | 111 #include "ui/base/touch/touch_factory.h" |
113 #endif | 112 #endif |
114 | 113 |
115 namespace { | 114 namespace { |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 #endif | 609 #endif |
611 | 610 |
612 if (process_startup) { | 611 if (process_startup) { |
613 // This observer is a singleton. It is never deleted but the pointer is kept | 612 // This observer is a singleton. It is never deleted but the pointer is kept |
614 // in a static so that it isn't reported as a leak. | 613 // in a static so that it isn't reported as a leak. |
615 static chromeos::LowBatteryObserver* low_battery_observer = | 614 static chromeos::LowBatteryObserver* low_battery_observer = |
616 new chromeos::LowBatteryObserver(profile); | 615 new chromeos::LowBatteryObserver(profile); |
617 chromeos::CrosLibrary::Get()->GetPowerLibrary()->AddObserver( | 616 chromeos::CrosLibrary::Get()->GetPowerLibrary()->AddObserver( |
618 low_battery_observer); | 617 low_battery_observer); |
619 | 618 |
620 static chromeos::UpdateObserver* update_observer = | |
621 new chromeos::UpdateObserver(profile); | |
622 chromeos::CrosLibrary::Get()->GetUpdateLibrary()->AddObserver( | |
623 update_observer); | |
624 | |
625 static chromeos::NetworkMessageObserver* network_message_observer = | 619 static chromeos::NetworkMessageObserver* network_message_observer = |
626 new chromeos::NetworkMessageObserver(profile); | 620 new chromeos::NetworkMessageObserver(profile); |
627 chromeos::CrosLibrary::Get()->GetNetworkLibrary() | 621 chromeos::CrosLibrary::Get()->GetNetworkLibrary() |
628 ->AddNetworkManagerObserver(network_message_observer); | 622 ->AddNetworkManagerObserver(network_message_observer); |
629 chromeos::CrosLibrary::Get()->GetNetworkLibrary() | 623 chromeos::CrosLibrary::Get()->GetNetworkLibrary() |
630 ->AddCellularDataPlanObserver(network_message_observer); | 624 ->AddCellularDataPlanObserver(network_message_observer); |
631 chromeos::CrosLibrary::Get()->GetNetworkLibrary() | 625 chromeos::CrosLibrary::Get()->GetNetworkLibrary() |
632 ->AddUserActionObserver(network_message_observer); | 626 ->AddUserActionObserver(network_message_observer); |
633 | 627 |
634 static chromeos::SmsObserver* sms_observer = | 628 static chromeos::SmsObserver* sms_observer = |
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1534 if (!automation->InitializeChannel(channel_id)) | 1528 if (!automation->InitializeChannel(channel_id)) |
1535 return false; | 1529 return false; |
1536 automation->SetExpectedTabCount(expected_tabs); | 1530 automation->SetExpectedTabCount(expected_tabs); |
1537 | 1531 |
1538 AutomationProviderList* list = g_browser_process->GetAutomationProviderList(); | 1532 AutomationProviderList* list = g_browser_process->GetAutomationProviderList(); |
1539 DCHECK(list); | 1533 DCHECK(list); |
1540 list->AddProvider(automation); | 1534 list->AddProvider(automation); |
1541 | 1535 |
1542 return true; | 1536 return true; |
1543 } | 1537 } |
OLD | NEW |