OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ash/system_tray_delegate_chromeos.h" | 5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" | 64 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" |
65 #include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h" | 65 #include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h" |
66 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 66 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
67 #include "chrome/browser/chromeos/set_time_dialog.h" | 67 #include "chrome/browser/chromeos/set_time_dialog.h" |
68 #include "chrome/browser/chromeos/settings/cros_settings.h" | 68 #include "chrome/browser/chromeos/settings/cros_settings.h" |
69 #include "chrome/browser/chromeos/ui/choose_mobile_network_dialog.h" | 69 #include "chrome/browser/chromeos/ui/choose_mobile_network_dialog.h" |
70 #include "chrome/browser/lifetime/application_lifetime.h" | 70 #include "chrome/browser/lifetime/application_lifetime.h" |
71 #include "chrome/browser/profiles/profile_manager.h" | 71 #include "chrome/browser/profiles/profile_manager.h" |
72 #include "chrome/browser/supervised_user/supervised_user_service.h" | 72 #include "chrome/browser/supervised_user/supervised_user_service.h" |
73 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" | 73 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" |
| 74 #include "chrome/browser/ui/ash/cast_config_delegate_chromeos.h" |
74 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" | 75 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" |
75 #include "chrome/browser/ui/ash/networking_config_delegate_chromeos.h" | 76 #include "chrome/browser/ui/ash/networking_config_delegate_chromeos.h" |
76 #include "chrome/browser/ui/ash/system_tray_delegate_utils.h" | 77 #include "chrome/browser/ui/ash/system_tray_delegate_utils.h" |
77 #include "chrome/browser/ui/ash/user_accounts_delegate_chromeos.h" | 78 #include "chrome/browser/ui/ash/user_accounts_delegate_chromeos.h" |
78 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" | 79 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" |
79 #include "chrome/browser/ui/ash/vpn_delegate_chromeos.h" | 80 #include "chrome/browser/ui/ash/vpn_delegate_chromeos.h" |
80 #include "chrome/browser/ui/browser.h" | 81 #include "chrome/browser/ui/browser.h" |
81 #include "chrome/browser/ui/browser_finder.h" | 82 #include "chrome/browser/ui/browser_finder.h" |
82 #include "chrome/browser/ui/browser_list.h" | 83 #include "chrome/browser/ui/browser_list.h" |
83 #include "chrome/browser/ui/chrome_pages.h" | 84 #include "chrome/browser/ui/chrome_pages.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 189 |
189 SystemTrayDelegateChromeOS::SystemTrayDelegateChromeOS() | 190 SystemTrayDelegateChromeOS::SystemTrayDelegateChromeOS() |
190 : user_profile_(NULL), | 191 : user_profile_(NULL), |
191 clock_type_(base::GetHourClockType()), | 192 clock_type_(base::GetHourClockType()), |
192 search_key_mapped_to_(input_method::kSearchKey), | 193 search_key_mapped_to_(input_method::kSearchKey), |
193 screen_locked_(false), | 194 screen_locked_(false), |
194 have_session_start_time_(false), | 195 have_session_start_time_(false), |
195 have_session_length_limit_(false), | 196 have_session_length_limit_(false), |
196 should_run_bluetooth_discovery_(false), | 197 should_run_bluetooth_discovery_(false), |
197 session_started_(false), | 198 session_started_(false), |
| 199 cast_config_delegate_(new CastConfigDelegateChromeos()), |
198 networking_config_delegate_(new NetworkingConfigDelegateChromeos()), | 200 networking_config_delegate_(new NetworkingConfigDelegateChromeos()), |
199 volume_control_delegate_(new VolumeController()), | 201 volume_control_delegate_(new VolumeController()), |
200 device_settings_observer_(CrosSettings::Get()->AddSettingsObserver( | 202 device_settings_observer_(CrosSettings::Get()->AddSettingsObserver( |
201 kSystemUse24HourClock, | 203 kSystemUse24HourClock, |
202 base::Bind(&SystemTrayDelegateChromeOS::UpdateClockType, | 204 base::Bind(&SystemTrayDelegateChromeOS::UpdateClockType, |
203 base::Unretained(this)))), | 205 base::Unretained(this)))), |
204 vpn_delegate_(new VPNDelegateChromeOS), | 206 vpn_delegate_(new VPNDelegateChromeOS), |
205 weak_ptr_factory_(this) { | 207 weak_ptr_factory_(this) { |
206 // Register notifications on construction so that events such as | 208 // Register notifications on construction so that events such as |
207 // PROFILE_CREATED do not get missed if they happen before Initialize(). | 209 // PROFILE_CREATED do not get missed if they happen before Initialize(). |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
781 bool SystemTrayDelegateChromeOS::GetBluetoothDiscovering() { | 783 bool SystemTrayDelegateChromeOS::GetBluetoothDiscovering() { |
782 return (bluetooth_discovery_session_.get() && | 784 return (bluetooth_discovery_session_.get() && |
783 bluetooth_discovery_session_->IsActive()); | 785 bluetooth_discovery_session_->IsActive()); |
784 } | 786 } |
785 | 787 |
786 void SystemTrayDelegateChromeOS::ChangeProxySettings() { | 788 void SystemTrayDelegateChromeOS::ChangeProxySettings() { |
787 CHECK(GetUserLoginStatus() == ash::user::LOGGED_IN_NONE); | 789 CHECK(GetUserLoginStatus() == ash::user::LOGGED_IN_NONE); |
788 LoginDisplayHostImpl::default_host()->OpenProxySettings(); | 790 LoginDisplayHostImpl::default_host()->OpenProxySettings(); |
789 } | 791 } |
790 | 792 |
| 793 ash::CastConfigDelegate* SystemTrayDelegateChromeOS::GetCastConfigDelegate() |
| 794 const { |
| 795 return cast_config_delegate_.get(); |
| 796 } |
| 797 |
791 ash::NetworkingConfigDelegate* | 798 ash::NetworkingConfigDelegate* |
792 SystemTrayDelegateChromeOS::GetNetworkingConfigDelegate() const { | 799 SystemTrayDelegateChromeOS::GetNetworkingConfigDelegate() const { |
793 return networking_config_delegate_.get(); | 800 return networking_config_delegate_.get(); |
794 } | 801 } |
795 | 802 |
796 ash::VolumeControlDelegate* | 803 ash::VolumeControlDelegate* |
797 SystemTrayDelegateChromeOS::GetVolumeControlDelegate() const { | 804 SystemTrayDelegateChromeOS::GetVolumeControlDelegate() const { |
798 return volume_control_delegate_.get(); | 805 return volume_control_delegate_.get(); |
799 } | 806 } |
800 | 807 |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1418 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " | 1425 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " |
1419 << "ENABLE_SUPERVISED_USERS undefined."; | 1426 << "ENABLE_SUPERVISED_USERS undefined."; |
1420 return base::string16(); | 1427 return base::string16(); |
1421 } | 1428 } |
1422 | 1429 |
1423 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1430 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
1424 return new SystemTrayDelegateChromeOS(); | 1431 return new SystemTrayDelegateChromeOS(); |
1425 } | 1432 } |
1426 | 1433 |
1427 } // namespace chromeos | 1434 } // namespace chromeos |
OLD | NEW |