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/browser_init.h" | 5 #include "chrome/browser/ui/browser_init.h" |
6 | 6 |
7 #include <algorithm> // For max(). | 7 #include <algorithm> // For max(). |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 profile_launch_observer.Get().AddLaunched(profile); | 747 profile_launch_observer.Get().AddLaunched(profile); |
748 | 748 |
749 #if defined(OS_CHROMEOS) | 749 #if defined(OS_CHROMEOS) |
750 // Initialize Chrome OS preferences like touch pad sensitivity. For the | 750 // Initialize Chrome OS preferences like touch pad sensitivity. For the |
751 // preferences to work in the guest mode, the initialization has to be | 751 // preferences to work in the guest mode, the initialization has to be |
752 // done after |profile| is switched to the incognito profile (which | 752 // done after |profile| is switched to the incognito profile (which |
753 // is actually GuestSessionProfile in the guest mode). See the | 753 // is actually GuestSessionProfile in the guest mode). See the |
754 // GetOffTheRecordProfile() call above. | 754 // GetOffTheRecordProfile() call above. |
755 profile->InitChromeOSPreferences(); | 755 profile->InitChromeOSPreferences(); |
756 | 756 |
757 #if defined(TOOLKIT_USES_GTK) | |
758 // Create the WmMessageListener so that it can listen for messages regardless | |
759 // of what window has focus. | |
760 chromeos::WmMessageListener::GetInstance(); | |
761 #endif | |
762 | |
763 if (process_startup) { | 757 if (process_startup) { |
764 // This observer is a singleton. It is never deleted but the pointer is kept | 758 // This observer is a singleton. It is never deleted but the pointer is kept |
765 // in a static so that it isn't reported as a leak. | 759 // in a static so that it isn't reported as a leak. |
766 static chromeos::LowBatteryObserver* low_battery_observer = | 760 static chromeos::LowBatteryObserver* low_battery_observer = |
767 new chromeos::LowBatteryObserver(profile); | 761 new chromeos::LowBatteryObserver(profile); |
768 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver( | 762 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver( |
769 low_battery_observer); | 763 low_battery_observer); |
770 | 764 |
771 static chromeos::NetworkMessageObserver* network_message_observer = | 765 static chromeos::NetworkMessageObserver* network_message_observer = |
772 new chromeos::NetworkMessageObserver(profile); | 766 new chromeos::NetworkMessageObserver(profile); |
(...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1953 | 1947 |
1954 Profile* profile = ProfileManager::GetLastUsedProfile(); | 1948 Profile* profile = ProfileManager::GetLastUsedProfile(); |
1955 if (!profile) { | 1949 if (!profile) { |
1956 // We should only be able to get here if the profile already exists and | 1950 // We should only be able to get here if the profile already exists and |
1957 // has been created. | 1951 // has been created. |
1958 NOTREACHED(); | 1952 NOTREACHED(); |
1959 return; | 1953 return; |
1960 } | 1954 } |
1961 ProcessCmdLineImpl(cmd_line, cur_dir, false, profile, Profiles(), NULL, NULL); | 1955 ProcessCmdLineImpl(cmd_line, cur_dir, false, profile, Profiles(), NULL, NULL); |
1962 } | 1956 } |
OLD | NEW |