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 17 matching lines...) Expand all Loading... |
28 #include "ash/system/tray/system_tray_notifier.h" | 28 #include "ash/system/tray/system_tray_notifier.h" |
29 #include "ash/system/tray_accessibility.h" | 29 #include "ash/system/tray_accessibility.h" |
30 #include "ash/system/tray_caps_lock.h" | 30 #include "ash/system/tray_caps_lock.h" |
31 #include "ash/system/user/login_status.h" | 31 #include "ash/system/user/login_status.h" |
32 #include "ash/system/user/update_observer.h" | 32 #include "ash/system/user/update_observer.h" |
33 #include "ash/system/user/user_observer.h" | 33 #include "ash/system/user/user_observer.h" |
34 #include "ash/volume_control_delegate.h" | 34 #include "ash/volume_control_delegate.h" |
35 #include "ash/wm/lock_state_controller.h" | 35 #include "ash/wm/lock_state_controller.h" |
36 #include "base/bind_helpers.h" | 36 #include "base/bind_helpers.h" |
37 #include "base/callback.h" | 37 #include "base/callback.h" |
38 #include "base/chromeos/chromeos_version.h" | |
39 #include "base/command_line.h" | 38 #include "base/command_line.h" |
40 #include "base/logging.h" | 39 #include "base/logging.h" |
41 #include "base/memory/weak_ptr.h" | 40 #include "base/memory/weak_ptr.h" |
42 #include "base/prefs/pref_service.h" | 41 #include "base/prefs/pref_service.h" |
43 #include "base/strings/stringprintf.h" | 42 #include "base/strings/stringprintf.h" |
44 #include "base/strings/utf_string_conversions.h" | 43 #include "base/strings/utf_string_conversions.h" |
| 44 #include "base/sys_info.h" |
45 #include "base/time/time.h" | 45 #include "base/time/time.h" |
46 #include "chrome/browser/browser_process.h" | 46 #include "chrome/browser/browser_process.h" |
47 #include "chrome/browser/chrome_notification_types.h" | 47 #include "chrome/browser/chrome_notification_types.h" |
48 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 48 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
49 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" | 49 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
50 #include "chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.h" | 50 #include "chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.h" |
51 #include "chrome/browser/chromeos/choose_mobile_network_dialog.h" | 51 #include "chrome/browser/chromeos/choose_mobile_network_dialog.h" |
52 #include "chrome/browser/chromeos/drive/drive_integration_service.h" | 52 #include "chrome/browser/chromeos/drive/drive_integration_service.h" |
53 #include "chrome/browser/chromeos/drive/job_list.h" | 53 #include "chrome/browser/chromeos/drive/job_list.h" |
54 #include "chrome/browser/chromeos/enrollment_dialog_view.h" | 54 #include "chrome/browser/chromeos/enrollment_dialog_view.h" |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 case LoginState::LOGGED_IN_USER_LOCALLY_MANAGED: | 497 case LoginState::LOGGED_IN_USER_LOCALLY_MANAGED: |
498 return ash::user::LOGGED_IN_LOCALLY_MANAGED; | 498 return ash::user::LOGGED_IN_LOCALLY_MANAGED; |
499 case LoginState::LOGGED_IN_USER_KIOSK_APP: | 499 case LoginState::LOGGED_IN_USER_KIOSK_APP: |
500 return ash::user::LOGGED_IN_KIOSK_APP; | 500 return ash::user::LOGGED_IN_KIOSK_APP; |
501 } | 501 } |
502 NOTREACHED(); | 502 NOTREACHED(); |
503 return ash::user::LOGGED_IN_NONE; | 503 return ash::user::LOGGED_IN_NONE; |
504 } | 504 } |
505 | 505 |
506 virtual bool IsOobeCompleted() const OVERRIDE { | 506 virtual bool IsOobeCompleted() const OVERRIDE { |
507 if (!base::chromeos::IsRunningOnChromeOS() && | 507 if (!base::SysInfo::IsRunningOnChromeOS() && |
508 LoginState::Get()->IsUserLoggedIn()) | 508 LoginState::Get()->IsUserLoggedIn()) |
509 return true; | 509 return true; |
510 return StartupUtils::IsOobeCompleted(); | 510 return StartupUtils::IsOobeCompleted(); |
511 } | 511 } |
512 | 512 |
513 virtual void ChangeProfilePicture() OVERRIDE { | 513 virtual void ChangeProfilePicture() OVERRIDE { |
514 content::RecordAction( | 514 content::RecordAction( |
515 content::UserMetricsAction("OpenChangeProfilePictureDialog")); | 515 content::UserMetricsAction("OpenChangeProfilePictureDialog")); |
516 chrome::ShowSettingsSubPage(GetAppropriateBrowser(), | 516 chrome::ShowSettingsSubPage(GetAppropriateBrowser(), |
517 chrome::kChangeProfilePictureSubPage); | 517 chrome::kChangeProfilePictureSubPage); |
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 } | 1284 } |
1285 | 1285 |
1286 virtual void DeviceRemoved(device::BluetoothAdapter* adapter, | 1286 virtual void DeviceRemoved(device::BluetoothAdapter* adapter, |
1287 device::BluetoothDevice* device) OVERRIDE { | 1287 device::BluetoothDevice* device) OVERRIDE { |
1288 GetSystemTrayNotifier()->NotifyRefreshBluetooth(); | 1288 GetSystemTrayNotifier()->NotifyRefreshBluetooth(); |
1289 } | 1289 } |
1290 | 1290 |
1291 // Overridden from SystemKeyEventListener::CapsLockObserver. | 1291 // Overridden from SystemKeyEventListener::CapsLockObserver. |
1292 virtual void OnCapsLockChange(bool enabled) OVERRIDE { | 1292 virtual void OnCapsLockChange(bool enabled) OVERRIDE { |
1293 bool search_mapped_to_caps_lock = false; | 1293 bool search_mapped_to_caps_lock = false; |
1294 if (!base::chromeos::IsRunningOnChromeOS() || | 1294 if (!base::SysInfo::IsRunningOnChromeOS() || |
1295 search_key_mapped_to_ == input_method::kCapsLockKey) | 1295 search_key_mapped_to_ == input_method::kCapsLockKey) |
1296 search_mapped_to_caps_lock = true; | 1296 search_mapped_to_caps_lock = true; |
1297 GetSystemTrayNotifier()->NotifyCapsLockChanged( | 1297 GetSystemTrayNotifier()->NotifyCapsLockChanged( |
1298 enabled, search_mapped_to_caps_lock); | 1298 enabled, search_mapped_to_caps_lock); |
1299 } | 1299 } |
1300 | 1300 |
1301 void UpdateEnterpriseDomain() { | 1301 void UpdateEnterpriseDomain() { |
1302 std::string enterprise_domain = | 1302 std::string enterprise_domain = |
1303 g_browser_process->browser_policy_connector()->GetEnterpriseDomain(); | 1303 g_browser_process->browser_policy_connector()->GetEnterpriseDomain(); |
1304 if (enterprise_domain_ != enterprise_domain) { | 1304 if (enterprise_domain_ != enterprise_domain) { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1343 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1343 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
1344 }; | 1344 }; |
1345 | 1345 |
1346 } // namespace | 1346 } // namespace |
1347 | 1347 |
1348 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1348 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
1349 return new chromeos::SystemTrayDelegate(); | 1349 return new chromeos::SystemTrayDelegate(); |
1350 } | 1350 } |
1351 | 1351 |
1352 } // namespace chromeos | 1352 } // namespace chromeos |
OLD | NEW |