| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 #endif | 89 #endif |
| 90 | 90 |
| 91 #if defined(TOOLKIT_USES_GTK) | 91 #if defined(TOOLKIT_USES_GTK) |
| 92 #include "chrome/browser/ui/gtk/gtk_util.h" | 92 #include "chrome/browser/ui/gtk/gtk_util.h" |
| 93 #endif | 93 #endif |
| 94 | 94 |
| 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/dbus/dbus_thread_manager.h" |
| 99 #include "chrome/browser/chromeos/customization_document.h" | 100 #include "chrome/browser/chromeos/customization_document.h" |
| 100 #include "chrome/browser/chromeos/enterprise_extension_observer.h" | 101 #include "chrome/browser/chromeos/enterprise_extension_observer.h" |
| 101 #include "chrome/browser/chromeos/gview_request_interceptor.h" | 102 #include "chrome/browser/chromeos/gview_request_interceptor.h" |
| 102 #include "chrome/browser/chromeos/low_battery_observer.h" | 103 #include "chrome/browser/chromeos/low_battery_observer.h" |
| 103 #include "chrome/browser/chromeos/network_message_observer.h" | 104 #include "chrome/browser/chromeos/network_message_observer.h" |
| 104 #include "chrome/browser/chromeos/sms_observer.h" | 105 #include "chrome/browser/chromeos/sms_observer.h" |
| 105 #if defined(TOOLKIT_USES_GTK) | 106 #if defined(TOOLKIT_USES_GTK) |
| 106 #include "chrome/browser/chromeos/wm_message_listener.h" | 107 #include "chrome/browser/chromeos/wm_message_listener.h" |
| 107 #endif | 108 #endif |
| 108 #endif | 109 #endif |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 // Create the WmMessageListener so that it can listen for messages regardless | 609 // Create the WmMessageListener so that it can listen for messages regardless |
| 609 // of what window has focus. | 610 // of what window has focus. |
| 610 chromeos::WmMessageListener::GetInstance(); | 611 chromeos::WmMessageListener::GetInstance(); |
| 611 #endif | 612 #endif |
| 612 | 613 |
| 613 if (process_startup) { | 614 if (process_startup) { |
| 614 // This observer is a singleton. It is never deleted but the pointer is kept | 615 // This observer is a singleton. It is never deleted but the pointer is kept |
| 615 // in a static so that it isn't reported as a leak. | 616 // in a static so that it isn't reported as a leak. |
| 616 static chromeos::LowBatteryObserver* low_battery_observer = | 617 static chromeos::LowBatteryObserver* low_battery_observer = |
| 617 new chromeos::LowBatteryObserver(profile); | 618 new chromeos::LowBatteryObserver(profile); |
| 618 chromeos::CrosLibrary::Get()->GetPowerLibrary()->AddObserver( | 619 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver( |
| 619 low_battery_observer); | 620 low_battery_observer); |
| 620 | 621 |
| 621 static chromeos::NetworkMessageObserver* network_message_observer = | 622 static chromeos::NetworkMessageObserver* network_message_observer = |
| 622 new chromeos::NetworkMessageObserver(profile); | 623 new chromeos::NetworkMessageObserver(profile); |
| 623 chromeos::CrosLibrary::Get()->GetNetworkLibrary() | 624 chromeos::CrosLibrary::Get()->GetNetworkLibrary() |
| 624 ->AddNetworkManagerObserver(network_message_observer); | 625 ->AddNetworkManagerObserver(network_message_observer); |
| 625 chromeos::CrosLibrary::Get()->GetNetworkLibrary() | 626 chromeos::CrosLibrary::Get()->GetNetworkLibrary() |
| 626 ->AddCellularDataPlanObserver(network_message_observer); | 627 ->AddCellularDataPlanObserver(network_message_observer); |
| 627 chromeos::CrosLibrary::Get()->GetNetworkLibrary() | 628 chromeos::CrosLibrary::Get()->GetNetworkLibrary() |
| 628 ->AddUserActionObserver(network_message_observer); | 629 ->AddUserActionObserver(network_message_observer); |
| (...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1549 if (!automation->InitializeChannel(channel_id)) | 1550 if (!automation->InitializeChannel(channel_id)) |
| 1550 return false; | 1551 return false; |
| 1551 automation->SetExpectedTabCount(expected_tabs); | 1552 automation->SetExpectedTabCount(expected_tabs); |
| 1552 | 1553 |
| 1553 AutomationProviderList* list = g_browser_process->GetAutomationProviderList(); | 1554 AutomationProviderList* list = g_browser_process->GetAutomationProviderList(); |
| 1554 DCHECK(list); | 1555 DCHECK(list); |
| 1555 list->AddProvider(automation); | 1556 list->AddProvider(automation); |
| 1556 | 1557 |
| 1557 return true; | 1558 return true; |
| 1558 } | 1559 } |
| OLD | NEW |