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/chromeos/system/ash_system_tray_delegate.h" | 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
9 #include "ash/system/audio/audio_observer.h" | 9 #include "ash/system/audio/audio_observer.h" |
10 #include "ash/system/bluetooth/bluetooth_observer.h" | 10 #include "ash/system/bluetooth/bluetooth_observer.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #include "chrome/browser/chromeos/login/user_manager.h" | 45 #include "chrome/browser/chromeos/login/user_manager.h" |
46 #include "chrome/browser/chromeos/mobile_config.h" | 46 #include "chrome/browser/chromeos/mobile_config.h" |
47 #include "chrome/browser/chromeos/status/data_promo_notification.h" | 47 #include "chrome/browser/chromeos/status/data_promo_notification.h" |
48 #include "chrome/browser/chromeos/status/network_menu.h" | 48 #include "chrome/browser/chromeos/status/network_menu.h" |
49 #include "chrome/browser/chromeos/status/network_menu_icon.h" | 49 #include "chrome/browser/chromeos/status/network_menu_icon.h" |
50 #include "chrome/browser/chromeos/system/timezone_settings.h" | 50 #include "chrome/browser/chromeos/system/timezone_settings.h" |
51 #include "chrome/browser/chromeos/system_key_event_listener.h" | 51 #include "chrome/browser/chromeos/system_key_event_listener.h" |
52 #include "chrome/browser/prefs/pref_service.h" | 52 #include "chrome/browser/prefs/pref_service.h" |
53 #include "chrome/browser/profiles/profile_manager.h" | 53 #include "chrome/browser/profiles/profile_manager.h" |
54 #include "chrome/browser/ui/browser.h" | 54 #include "chrome/browser/ui/browser.h" |
| 55 #include "chrome/browser/ui/browser_finder.h" |
55 #include "chrome/browser/ui/browser_list.h" | 56 #include "chrome/browser/ui/browser_list.h" |
56 #include "chrome/browser/upgrade_detector.h" | 57 #include "chrome/browser/upgrade_detector.h" |
57 #include "chrome/common/chrome_notification_types.h" | 58 #include "chrome/common/chrome_notification_types.h" |
58 #include "chrome/common/pref_names.h" | 59 #include "chrome/common/pref_names.h" |
59 #include "chrome/common/url_constants.h" | 60 #include "chrome/common/url_constants.h" |
60 #include "chromeos/dbus/dbus_thread_manager.h" | 61 #include "chromeos/dbus/dbus_thread_manager.h" |
61 #include "chromeos/dbus/power_manager_client.h" | 62 #include "chromeos/dbus/power_manager_client.h" |
62 #include "content/public/browser/browser_thread.h" | 63 #include "content/public/browser/browser_thread.h" |
63 #include "content/public/browser/notification_observer.h" | 64 #include "content/public/browser/notification_observer.h" |
64 #include "content/public/browser/notification_service.h" | 65 #include "content/public/browser/notification_service.h" |
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 | 714 |
714 virtual void ChangeProxySettings() OVERRIDE { | 715 virtual void ChangeProxySettings() OVERRIDE { |
715 CHECK(GetUserLoginStatus() == ash::user::LOGGED_IN_NONE); | 716 CHECK(GetUserLoginStatus() == ash::user::LOGGED_IN_NONE); |
716 BaseLoginDisplayHost::default_host()->OpenProxySettings(); | 717 BaseLoginDisplayHost::default_host()->OpenProxySettings(); |
717 } | 718 } |
718 | 719 |
719 private: | 720 private: |
720 // Returns the last active browser. If there is no such browser, creates a new | 721 // Returns the last active browser. If there is no such browser, creates a new |
721 // browser window with an empty tab and returns it. | 722 // browser window with an empty tab and returns it. |
722 Browser* GetAppropriateBrowser() { | 723 Browser* GetAppropriateBrowser() { |
723 return Browser::GetOrCreateTabbedBrowser( | 724 return browser::FindOrCreateTabbedBrowser( |
724 ProfileManager::GetDefaultProfileOrOffTheRecord()); | 725 ProfileManager::GetDefaultProfileOrOffTheRecord()); |
725 } | 726 } |
726 | 727 |
727 void SetProfile(Profile* profile) { | 728 void SetProfile(Profile* profile) { |
728 pref_registrar_.reset(new PrefChangeRegistrar); | 729 pref_registrar_.reset(new PrefChangeRegistrar); |
729 pref_registrar_->Init(profile->GetPrefs()); | 730 pref_registrar_->Init(profile->GetPrefs()); |
730 pref_registrar_->Add(prefs::kUse24HourClock, this); | 731 pref_registrar_->Add(prefs::kUse24HourClock, this); |
731 pref_registrar_->Add(prefs::kLanguageXkbRemapSearchKeyTo, this); | 732 pref_registrar_->Add(prefs::kLanguageXkbRemapSearchKeyTo, this); |
732 UpdateClockType(profile->GetPrefs()); | 733 UpdateClockType(profile->GetPrefs()); |
733 search_key_mapped_to_ = | 734 search_key_mapped_to_ = |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1124 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1125 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
1125 }; | 1126 }; |
1126 | 1127 |
1127 } // namespace | 1128 } // namespace |
1128 | 1129 |
1129 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { | 1130 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { |
1130 return new chromeos::SystemTrayDelegate(tray); | 1131 return new chromeos::SystemTrayDelegate(tray); |
1131 } | 1132 } |
1132 | 1133 |
1133 } // namespace chromeos | 1134 } // namespace chromeos |
OLD | NEW |