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 <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "ash/system/tray/system_tray_notifier.h" | 27 #include "ash/system/tray/system_tray_notifier.h" |
28 #include "ash/system/tray_accessibility.h" | 28 #include "ash/system/tray_accessibility.h" |
29 #include "ash/system/tray_caps_lock.h" | 29 #include "ash/system/tray_caps_lock.h" |
30 #include "ash/system/user/login_status.h" | 30 #include "ash/system/user/login_status.h" |
31 #include "ash/system/user/update_observer.h" | 31 #include "ash/system/user/update_observer.h" |
32 #include "ash/system/user/user_observer.h" | 32 #include "ash/system/user/user_observer.h" |
33 #include "ash/volume_control_delegate.h" | 33 #include "ash/volume_control_delegate.h" |
34 #include "ash/wm/lock_state_controller.h" | 34 #include "ash/wm/lock_state_controller.h" |
35 #include "base/bind_helpers.h" | 35 #include "base/bind_helpers.h" |
36 #include "base/callback.h" | 36 #include "base/callback.h" |
37 #include "base/chromeos/chromeos_version.h" | |
38 #include "base/command_line.h" | 37 #include "base/command_line.h" |
39 #include "base/logging.h" | 38 #include "base/logging.h" |
40 #include "base/memory/weak_ptr.h" | 39 #include "base/memory/weak_ptr.h" |
41 #include "base/prefs/pref_service.h" | 40 #include "base/prefs/pref_service.h" |
42 #include "base/strings/stringprintf.h" | 41 #include "base/strings/stringprintf.h" |
43 #include "base/strings/utf_string_conversions.h" | 42 #include "base/strings/utf_string_conversions.h" |
| 43 #include "base/sys_info.h" |
44 #include "base/time/time.h" | 44 #include "base/time/time.h" |
45 #include "chrome/browser/browser_process.h" | 45 #include "chrome/browser/browser_process.h" |
46 #include "chrome/browser/chrome_notification_types.h" | 46 #include "chrome/browser/chrome_notification_types.h" |
47 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 47 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
48 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" | 48 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
49 #include "chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.h" | 49 #include "chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.h" |
50 #include "chrome/browser/chromeos/choose_mobile_network_dialog.h" | 50 #include "chrome/browser/chromeos/choose_mobile_network_dialog.h" |
51 #include "chrome/browser/chromeos/drive/drive_integration_service.h" | 51 #include "chrome/browser/chromeos/drive/drive_integration_service.h" |
52 #include "chrome/browser/chromeos/drive/job_list.h" | 52 #include "chrome/browser/chromeos/drive/job_list.h" |
53 #include "chrome/browser/chromeos/enrollment_dialog_view.h" | 53 #include "chrome/browser/chromeos/enrollment_dialog_view.h" |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 case LoginState::LOGGED_IN_USER_LOCALLY_MANAGED: | 487 case LoginState::LOGGED_IN_USER_LOCALLY_MANAGED: |
488 return ash::user::LOGGED_IN_LOCALLY_MANAGED; | 488 return ash::user::LOGGED_IN_LOCALLY_MANAGED; |
489 case LoginState::LOGGED_IN_USER_KIOSK_APP: | 489 case LoginState::LOGGED_IN_USER_KIOSK_APP: |
490 return ash::user::LOGGED_IN_KIOSK_APP; | 490 return ash::user::LOGGED_IN_KIOSK_APP; |
491 } | 491 } |
492 NOTREACHED(); | 492 NOTREACHED(); |
493 return ash::user::LOGGED_IN_NONE; | 493 return ash::user::LOGGED_IN_NONE; |
494 } | 494 } |
495 | 495 |
496 virtual bool IsOobeCompleted() const OVERRIDE { | 496 virtual bool IsOobeCompleted() const OVERRIDE { |
497 if (!base::chromeos::IsRunningOnChromeOS() && | 497 if (!base::SysInfo::IsRunningOnChromeOS() && |
498 LoginState::Get()->IsUserLoggedIn()) | 498 LoginState::Get()->IsUserLoggedIn()) |
499 return true; | 499 return true; |
500 return StartupUtils::IsOobeCompleted(); | 500 return StartupUtils::IsOobeCompleted(); |
501 } | 501 } |
502 | 502 |
503 virtual void ChangeProfilePicture() OVERRIDE { | 503 virtual void ChangeProfilePicture() OVERRIDE { |
504 content::RecordAction( | 504 content::RecordAction( |
505 content::UserMetricsAction("OpenChangeProfilePictureDialog")); | 505 content::UserMetricsAction("OpenChangeProfilePictureDialog")); |
506 chrome::ShowSettingsSubPage(GetAppropriateBrowser(), | 506 chrome::ShowSettingsSubPage(GetAppropriateBrowser(), |
507 chrome::kChangeProfilePictureSubPage); | 507 chrome::kChangeProfilePictureSubPage); |
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1256 } | 1256 } |
1257 | 1257 |
1258 virtual void DeviceRemoved(device::BluetoothAdapter* adapter, | 1258 virtual void DeviceRemoved(device::BluetoothAdapter* adapter, |
1259 device::BluetoothDevice* device) OVERRIDE { | 1259 device::BluetoothDevice* device) OVERRIDE { |
1260 GetSystemTrayNotifier()->NotifyRefreshBluetooth(); | 1260 GetSystemTrayNotifier()->NotifyRefreshBluetooth(); |
1261 } | 1261 } |
1262 | 1262 |
1263 // Overridden from SystemKeyEventListener::CapsLockObserver. | 1263 // Overridden from SystemKeyEventListener::CapsLockObserver. |
1264 virtual void OnCapsLockChange(bool enabled) OVERRIDE { | 1264 virtual void OnCapsLockChange(bool enabled) OVERRIDE { |
1265 bool search_mapped_to_caps_lock = false; | 1265 bool search_mapped_to_caps_lock = false; |
1266 if (!base::chromeos::IsRunningOnChromeOS() || | 1266 if (!base::SysInfo::IsRunningOnChromeOS() || |
1267 search_key_mapped_to_ == input_method::kCapsLockKey) | 1267 search_key_mapped_to_ == input_method::kCapsLockKey) |
1268 search_mapped_to_caps_lock = true; | 1268 search_mapped_to_caps_lock = true; |
1269 GetSystemTrayNotifier()->NotifyCapsLockChanged( | 1269 GetSystemTrayNotifier()->NotifyCapsLockChanged( |
1270 enabled, search_mapped_to_caps_lock); | 1270 enabled, search_mapped_to_caps_lock); |
1271 } | 1271 } |
1272 | 1272 |
1273 void UpdateEnterpriseDomain() { | 1273 void UpdateEnterpriseDomain() { |
1274 std::string enterprise_domain = | 1274 std::string enterprise_domain = |
1275 g_browser_process->browser_policy_connector()->GetEnterpriseDomain(); | 1275 g_browser_process->browser_policy_connector()->GetEnterpriseDomain(); |
1276 if (enterprise_domain_ != enterprise_domain) { | 1276 if (enterprise_domain_ != enterprise_domain) { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1315 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1315 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
1316 }; | 1316 }; |
1317 | 1317 |
1318 } // namespace | 1318 } // namespace |
1319 | 1319 |
1320 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1320 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
1321 return new chromeos::SystemTrayDelegate(); | 1321 return new chromeos::SystemTrayDelegate(); |
1322 } | 1322 } |
1323 | 1323 |
1324 } // namespace chromeos | 1324 } // namespace chromeos |
OLD | NEW |