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 23 matching lines...) Expand all Loading... |
34 const char SystemTrayCommon::kDisplaySettingsSubPageName[] = "display"; | 34 const char SystemTrayCommon::kDisplaySettingsSubPageName[] = "display"; |
35 const char SystemTrayCommon::kDisplayOverscanSettingsSubPageName[] = | 35 const char SystemTrayCommon::kDisplayOverscanSettingsSubPageName[] = |
36 "displayOverscan"; | 36 "displayOverscan"; |
37 | 37 |
38 // static | 38 // static |
39 void SystemTrayCommon::ShowSettings() { | 39 void SystemTrayCommon::ShowSettings() { |
40 ShowSettingsSubPageForActiveUser(std::string()); | 40 ShowSettingsSubPageForActiveUser(std::string()); |
41 } | 41 } |
42 | 42 |
43 // static | 43 // static |
44 void SystemTrayCommon::ShowDateSettings() { | |
45 content::RecordAction(base::UserMetricsAction("ShowDateOptions")); | |
46 std::string sub_page = | |
47 std::string(chrome::kSearchSubPage) + "#" + | |
48 l10n_util::GetStringUTF8(IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME); | |
49 // Everybody can change the time zone (even though it is a device setting). | |
50 chrome::ShowSettingsSubPageForProfile(ProfileManager::GetActiveUserProfile(), | |
51 sub_page); | |
52 } | |
53 | |
54 // static | |
55 void SystemTrayCommon::ShowDisplaySettings() { | 44 void SystemTrayCommon::ShowDisplaySettings() { |
56 content::RecordAction(base::UserMetricsAction("ShowDisplayOptions")); | 45 content::RecordAction(base::UserMetricsAction("ShowDisplayOptions")); |
57 ShowSettingsSubPageForActiveUser(kDisplaySettingsSubPageName); | 46 ShowSettingsSubPageForActiveUser(kDisplaySettingsSubPageName); |
58 } | 47 } |
59 | 48 |
60 // static | 49 // static |
61 void SystemTrayCommon::ShowChromeSlow() { | 50 void SystemTrayCommon::ShowChromeSlow() { |
62 chrome::ScopedTabbedBrowserDisplayer displayer( | 51 chrome::ScopedTabbedBrowserDisplayer displayer( |
63 ProfileManager::GetPrimaryUserProfile()); | 52 ProfileManager::GetPrimaryUserProfile()); |
64 chrome::ShowSlow(displayer.browser()); | 53 chrome::ShowSlow(displayer.browser()); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 } | 103 } |
115 | 104 |
116 // static | 105 // static |
117 void SystemTrayCommon::ShowProxySettings() { | 106 void SystemTrayCommon::ShowProxySettings() { |
118 LoginState* login_state = LoginState::Get(); | 107 LoginState* login_state = LoginState::Get(); |
119 // User is not logged in. | 108 // User is not logged in. |
120 CHECK(!login_state->IsUserLoggedIn() || | 109 CHECK(!login_state->IsUserLoggedIn() || |
121 login_state->GetLoggedInUserType() == LoginState::LOGGED_IN_USER_NONE); | 110 login_state->GetLoggedInUserType() == LoginState::LOGGED_IN_USER_NONE); |
122 chromeos::LoginDisplayHost::default_host()->OpenProxySettings(); | 111 chromeos::LoginDisplayHost::default_host()->OpenProxySettings(); |
123 } | 112 } |
OLD | NEW |