| 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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 // Everybody can change the time zone (even though it is a device setting). | 481 // Everybody can change the time zone (even though it is a device setting). |
| 482 ShowSettingsSubPageForActiveUser(sub_page); | 482 ShowSettingsSubPageForActiveUser(sub_page); |
| 483 } | 483 } |
| 484 | 484 |
| 485 void SystemTrayDelegateChromeOS::ShowSetTimeDialog() { | 485 void SystemTrayDelegateChromeOS::ShowSetTimeDialog() { |
| 486 SetTimeDialog::ShowDialog(GetNativeWindow()); | 486 SetTimeDialog::ShowDialog(GetNativeWindow()); |
| 487 } | 487 } |
| 488 | 488 |
| 489 void SystemTrayDelegateChromeOS::ShowNetworkSettings( | 489 void SystemTrayDelegateChromeOS::ShowNetworkSettings( |
| 490 const std::string& service_path) { | 490 const std::string& service_path) { |
| 491 if (!LoginState::Get()->IsUserLoggedIn()) | 491 if (!LoginState::Get()->IsUserLoggedIn() || |
| 492 ash::Shell::GetInstance()->session_state_delegate()->GetSessionState() == |
| 493 ash::SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY) |
| 492 return; | 494 return; |
| 493 ShowNetworkSettingsPage(service_path); | 495 ShowNetworkSettingsPage(service_path); |
| 494 } | 496 } |
| 495 | 497 |
| 496 void SystemTrayDelegateChromeOS::ShowBluetoothSettings() { | 498 void SystemTrayDelegateChromeOS::ShowBluetoothSettings() { |
| 497 // TODO(sad): Make this work. | 499 // TODO(sad): Make this work. |
| 498 } | 500 } |
| 499 | 501 |
| 500 void SystemTrayDelegateChromeOS::ShowDisplaySettings() { | 502 void SystemTrayDelegateChromeOS::ShowDisplaySettings() { |
| 501 content::RecordAction(base::UserMetricsAction("ShowDisplayOptions")); | 503 content::RecordAction(base::UserMetricsAction("ShowDisplayOptions")); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 } | 576 } |
| 575 | 577 |
| 576 void SystemTrayDelegateChromeOS::ShowSupervisedUserInfo() { | 578 void SystemTrayDelegateChromeOS::ShowSupervisedUserInfo() { |
| 577 // TODO(antrim): find out what should we show in this case. | 579 // TODO(antrim): find out what should we show in this case. |
| 578 // http://crbug.com/229762 | 580 // http://crbug.com/229762 |
| 579 } | 581 } |
| 580 | 582 |
| 581 void SystemTrayDelegateChromeOS::ShowEnterpriseInfo() { | 583 void SystemTrayDelegateChromeOS::ShowEnterpriseInfo() { |
| 582 ash::user::LoginStatus status = GetUserLoginStatus(); | 584 ash::user::LoginStatus status = GetUserLoginStatus(); |
| 583 if (status == ash::user::LOGGED_IN_NONE || | 585 if (status == ash::user::LOGGED_IN_NONE || |
| 584 status == ash::user::LOGGED_IN_LOCKED) { | 586 status == ash::user::LOGGED_IN_LOCKED || |
| 587 ash::Shell::GetInstance()->session_state_delegate()->GetSessionState() == |
| 588 ash::SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY) { |
| 585 scoped_refptr<chromeos::HelpAppLauncher> help_app( | 589 scoped_refptr<chromeos::HelpAppLauncher> help_app( |
| 586 new chromeos::HelpAppLauncher(GetNativeWindow())); | 590 new chromeos::HelpAppLauncher(GetNativeWindow())); |
| 587 help_app->ShowHelpTopic(chromeos::HelpAppLauncher::HELP_ENTERPRISE); | 591 help_app->ShowHelpTopic(chromeos::HelpAppLauncher::HELP_ENTERPRISE); |
| 588 } else { | 592 } else { |
| 589 chrome::ScopedTabbedBrowserDisplayer displayer( | 593 chrome::ScopedTabbedBrowserDisplayer displayer( |
| 590 ProfileManager::GetActiveUserProfile(), chrome::HOST_DESKTOP_TYPE_ASH); | 594 ProfileManager::GetActiveUserProfile(), chrome::HOST_DESKTOP_TYPE_ASH); |
| 591 chrome::ShowSingletonTab(displayer.browser(), | 595 chrome::ShowSingletonTab(displayer.browser(), |
| 592 GURL(chrome::kLearnMoreEnterpriseURL)); | 596 GURL(chrome::kLearnMoreEnterpriseURL)); |
| 593 } | 597 } |
| 594 } | 598 } |
| (...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1397 accessibility_subscription_.reset(); | 1401 accessibility_subscription_.reset(); |
| 1398 else | 1402 else |
| 1399 OnAccessibilityModeChanged(details.notify); | 1403 OnAccessibilityModeChanged(details.notify); |
| 1400 } | 1404 } |
| 1401 | 1405 |
| 1402 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1406 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1403 return new SystemTrayDelegateChromeOS(); | 1407 return new SystemTrayDelegateChromeOS(); |
| 1404 } | 1408 } |
| 1405 | 1409 |
| 1406 } // namespace chromeos | 1410 } // namespace chromeos |
| OLD | NEW |