Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_common.h" | 5 #include "chrome/browser/ui/ash/system_tray_common.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 8 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
| 9 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | 9 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
| 10 #include "chrome/browser/profiles/profile_manager.h" | 10 #include "chrome/browser/profiles/profile_manager.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 51 sub_page); | 51 sub_page); |
| 52 } | 52 } |
| 53 | 53 |
| 54 // static | 54 // static |
| 55 void SystemTrayCommon::ShowDisplaySettings() { | 55 void SystemTrayCommon::ShowDisplaySettings() { |
| 56 content::RecordAction(base::UserMetricsAction("ShowDisplayOptions")); | 56 content::RecordAction(base::UserMetricsAction("ShowDisplayOptions")); |
| 57 ShowSettingsSubPageForActiveUser(kDisplaySettingsSubPageName); | 57 ShowSettingsSubPageForActiveUser(kDisplaySettingsSubPageName); |
| 58 } | 58 } |
| 59 | 59 |
| 60 // static | 60 // static |
| 61 void SystemTrayCommon::ShowPowerSettings() { | |
|
James Cook
2016/09/27 23:23:13
The reason for moving the if() conditions into //a
| |
| 62 content::RecordAction(base::UserMetricsAction("Tray_ShowPowerOptions")); | |
| 63 ShowSettingsSubPageForActiveUser(chrome::kPowerOptionsSubPage); | |
| 64 } | |
| 65 | |
| 66 // static | |
| 61 void SystemTrayCommon::ShowChromeSlow() { | 67 void SystemTrayCommon::ShowChromeSlow() { |
| 62 chrome::ScopedTabbedBrowserDisplayer displayer( | 68 chrome::ScopedTabbedBrowserDisplayer displayer( |
| 63 ProfileManager::GetPrimaryUserProfile()); | 69 ProfileManager::GetPrimaryUserProfile()); |
| 64 chrome::ShowSlow(displayer.browser()); | 70 chrome::ShowSlow(displayer.browser()); |
| 65 } | 71 } |
| 66 | 72 |
| 67 // static | 73 // static |
| 68 void SystemTrayCommon::ShowIMESettings() { | 74 void SystemTrayCommon::ShowIMESettings() { |
| 69 content::RecordAction(base::UserMetricsAction("OpenLanguageOptionsDialog")); | 75 content::RecordAction(base::UserMetricsAction("OpenLanguageOptionsDialog")); |
| 70 ShowSettingsSubPageForActiveUser(chrome::kLanguageOptionsSubPage); | 76 ShowSettingsSubPageForActiveUser(chrome::kLanguageOptionsSubPage); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 114 } | 120 } |
| 115 | 121 |
| 116 // static | 122 // static |
| 117 void SystemTrayCommon::ShowProxySettings() { | 123 void SystemTrayCommon::ShowProxySettings() { |
| 118 LoginState* login_state = LoginState::Get(); | 124 LoginState* login_state = LoginState::Get(); |
| 119 // User is not logged in. | 125 // User is not logged in. |
| 120 CHECK(!login_state->IsUserLoggedIn() || | 126 CHECK(!login_state->IsUserLoggedIn() || |
| 121 login_state->GetLoggedInUserType() == LoginState::LOGGED_IN_USER_NONE); | 127 login_state->GetLoggedInUserType() == LoginState::LOGGED_IN_USER_NONE); |
| 122 chromeos::LoginDisplayHost::default_host()->OpenProxySettings(); | 128 chromeos::LoginDisplayHost::default_host()->OpenProxySettings(); |
| 123 } | 129 } |
| OLD | NEW |