| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 #include "chrome/browser/chromeos/enrollment_dialog_view.h" | 53 #include "chrome/browser/chromeos/enrollment_dialog_view.h" |
| 54 #include "chrome/browser/chromeos/events/system_key_event_listener.h" | 54 #include "chrome/browser/chromeos/events/system_key_event_listener.h" |
| 55 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 55 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
| 56 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" | 56 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
| 57 #include "chrome/browser/chromeos/login/help_app_launcher.h" | 57 #include "chrome/browser/chromeos/login/help_app_launcher.h" |
| 58 #include "chrome/browser/chromeos/login/login_wizard.h" | 58 #include "chrome/browser/chromeos/login/login_wizard.h" |
| 59 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | 59 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
| 60 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | 60 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" |
| 61 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" | 61 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" |
| 62 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" | 62 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" |
| 63 #include "chrome/browser/chromeos/login/users/user.h" | |
| 64 #include "chrome/browser/chromeos/login/users/user_manager.h" | 63 #include "chrome/browser/chromeos/login/users/user_manager.h" |
| 65 #include "chrome/browser/chromeos/options/network_config_view.h" | 64 #include "chrome/browser/chromeos/options/network_config_view.h" |
| 66 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 65 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 67 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" | 66 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" |
| 68 #include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h" | 67 #include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h" |
| 69 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 68 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 70 #include "chrome/browser/chromeos/set_time_dialog.h" | 69 #include "chrome/browser/chromeos/set_time_dialog.h" |
| 71 #include "chrome/browser/chromeos/settings/cros_settings.h" | 70 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 72 #include "chrome/browser/chromeos/sim_dialog_delegate.h" | 71 #include "chrome/browser/chromeos/sim_dialog_delegate.h" |
| 73 #include "chrome/browser/chromeos/ui/choose_mobile_network_dialog.h" | 72 #include "chrome/browser/chromeos/ui/choose_mobile_network_dialog.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 93 #include "chrome/common/url_constants.h" | 92 #include "chrome/common/url_constants.h" |
| 94 #include "chromeos/dbus/dbus_thread_manager.h" | 93 #include "chromeos/dbus/dbus_thread_manager.h" |
| 95 #include "chromeos/dbus/session_manager_client.h" | 94 #include "chromeos/dbus/session_manager_client.h" |
| 96 #include "chromeos/ime/extension_ime_util.h" | 95 #include "chromeos/ime/extension_ime_util.h" |
| 97 #include "chromeos/ime/ime_keyboard.h" | 96 #include "chromeos/ime/ime_keyboard.h" |
| 98 #include "chromeos/ime/input_method_manager.h" | 97 #include "chromeos/ime/input_method_manager.h" |
| 99 #include "chromeos/login/login_state.h" | 98 #include "chromeos/login/login_state.h" |
| 100 #include "chromeos/network/portal_detector/network_portal_detector.h" | 99 #include "chromeos/network/portal_detector/network_portal_detector.h" |
| 101 #include "components/google/core/browser/google_util.h" | 100 #include "components/google/core/browser/google_util.h" |
| 102 #include "components/policy/core/common/cloud/cloud_policy_store.h" | 101 #include "components/policy/core/common/cloud/cloud_policy_store.h" |
| 102 #include "components/user_manager/user.h" |
| 103 #include "components/user_manager/user_type.h" | 103 #include "components/user_manager/user_type.h" |
| 104 #include "content/public/browser/notification_observer.h" | 104 #include "content/public/browser/notification_observer.h" |
| 105 #include "content/public/browser/notification_service.h" | 105 #include "content/public/browser/notification_service.h" |
| 106 #include "content/public/browser/user_metrics.h" | 106 #include "content/public/browser/user_metrics.h" |
| 107 #include "content/public/browser/web_contents.h" | 107 #include "content/public/browser/web_contents.h" |
| 108 #include "device/bluetooth/bluetooth_adapter.h" | 108 #include "device/bluetooth/bluetooth_adapter.h" |
| 109 #include "device/bluetooth/bluetooth_adapter_factory.h" | 109 #include "device/bluetooth/bluetooth_adapter_factory.h" |
| 110 #include "device/bluetooth/bluetooth_device.h" | 110 #include "device/bluetooth/bluetooth_device.h" |
| 111 #include "grit/ash_strings.h" | 111 #include "grit/ash_strings.h" |
| 112 #include "grit/generated_resources.h" | 112 #include "grit/generated_resources.h" |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 | 606 |
| 607 if (static_cast<int>(UserManager::Get()->GetLoggedInUsers().size()) >= | 607 if (static_cast<int>(UserManager::Get()->GetLoggedInUsers().size()) >= |
| 608 shell->session_state_delegate()->GetMaximumNumberOfLoggedInUsers()) | 608 shell->session_state_delegate()->GetMaximumNumberOfLoggedInUsers()) |
| 609 return; | 609 return; |
| 610 | 610 |
| 611 // Launch sign in screen to add another user to current session. | 611 // Launch sign in screen to add another user to current session. |
| 612 if (UserManager::Get()->GetUsersAdmittedForMultiProfile().size()) { | 612 if (UserManager::Get()->GetUsersAdmittedForMultiProfile().size()) { |
| 613 // Don't show dialog if any logged in user in multi-profiles session | 613 // Don't show dialog if any logged in user in multi-profiles session |
| 614 // dismissed it. | 614 // dismissed it. |
| 615 bool show_intro = true; | 615 bool show_intro = true; |
| 616 const UserList logged_in_users = UserManager::Get()->GetLoggedInUsers(); | 616 const user_manager::UserList logged_in_users = |
| 617 for (UserList::const_iterator it = logged_in_users.begin(); | 617 UserManager::Get()->GetLoggedInUsers(); |
| 618 for (user_manager::UserList::const_iterator it = logged_in_users.begin(); |
| 618 it != logged_in_users.end(); | 619 it != logged_in_users.end(); |
| 619 ++it) { | 620 ++it) { |
| 620 show_intro &= !multi_user_util::GetProfileFromUserID( | 621 show_intro &= !multi_user_util::GetProfileFromUserID( |
| 621 multi_user_util::GetUserIDFromEmail((*it)->email())) | 622 multi_user_util::GetUserIDFromEmail((*it)->email())) |
| 622 ->GetPrefs() | 623 ->GetPrefs() |
| 623 ->GetBoolean(prefs::kMultiProfileNeverShowIntro); | 624 ->GetBoolean(prefs::kMultiProfileNeverShowIntro); |
| 624 if (!show_intro) | 625 if (!show_intro) |
| 625 break; | 626 break; |
| 626 } | 627 } |
| 627 if (show_intro) { | 628 if (show_intro) { |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 } | 902 } |
| 902 | 903 |
| 903 bool SystemTrayDelegateChromeOS::IsSearchKeyMappedToCapsLock() { | 904 bool SystemTrayDelegateChromeOS::IsSearchKeyMappedToCapsLock() { |
| 904 return search_key_mapped_to_ == input_method::kCapsLockKey; | 905 return search_key_mapped_to_ == input_method::kCapsLockKey; |
| 905 } | 906 } |
| 906 | 907 |
| 907 ash::tray::UserAccountsDelegate* | 908 ash::tray::UserAccountsDelegate* |
| 908 SystemTrayDelegateChromeOS::GetUserAccountsDelegate( | 909 SystemTrayDelegateChromeOS::GetUserAccountsDelegate( |
| 909 const std::string& user_id) { | 910 const std::string& user_id) { |
| 910 if (!accounts_delegates_.contains(user_id)) { | 911 if (!accounts_delegates_.contains(user_id)) { |
| 911 const User* user = UserManager::Get()->FindUser(user_id); | 912 const user_manager::User* user = UserManager::Get()->FindUser(user_id); |
| 912 Profile* user_profile = ProfileHelper::Get()->GetProfileByUser(user); | 913 Profile* user_profile = ProfileHelper::Get()->GetProfileByUser(user); |
| 913 CHECK(user_profile); | 914 CHECK(user_profile); |
| 914 accounts_delegates_.set( | 915 accounts_delegates_.set( |
| 915 user_id, | 916 user_id, |
| 916 scoped_ptr<ash::tray::UserAccountsDelegate>( | 917 scoped_ptr<ash::tray::UserAccountsDelegate>( |
| 917 new UserAccountsDelegateChromeOS(user_profile))); | 918 new UserAccountsDelegateChromeOS(user_profile))); |
| 918 } | 919 } |
| 919 return accounts_delegates_.get(user_id); | 920 return accounts_delegates_.get(user_id); |
| 920 } | 921 } |
| 921 | 922 |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1397 accessibility_subscription_.reset(); | 1398 accessibility_subscription_.reset(); |
| 1398 else | 1399 else |
| 1399 OnAccessibilityModeChanged(details.notify); | 1400 OnAccessibilityModeChanged(details.notify); |
| 1400 } | 1401 } |
| 1401 | 1402 |
| 1402 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1403 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1403 return new SystemTrayDelegateChromeOS(); | 1404 return new SystemTrayDelegateChromeOS(); |
| 1404 } | 1405 } |
| 1405 | 1406 |
| 1406 } // namespace chromeos | 1407 } // namespace chromeos |
| OLD | NEW |