| 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_client.h" | 5 #include "chrome/browser/ui/ash/system_tray_client.h" |
| 6 | 6 |
| 7 #include "ash/common/login_status.h" | 7 #include "ash/common/login_status.h" |
| 8 #include "ash/common/session/session_state_delegate.h" | 8 #include "ash/common/session/session_state_delegate.h" |
| 9 #include "ash/common/wm_shell.h" | 9 #include "ash/common/wm_shell.h" |
| 10 #include "ash/public/cpp/shell_window_ids.h" | 10 #include "ash/public/cpp/shell_window_ids.h" |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 Widget* widget = new Widget; // Owned by native widget. | 195 Widget* widget = new Widget; // Owned by native widget. |
| 196 widget->Init(params); | 196 widget->Init(params); |
| 197 return widget; | 197 return widget; |
| 198 } | 198 } |
| 199 | 199 |
| 200 void SystemTrayClient::SetFlashUpdateAvailable() { | 200 void SystemTrayClient::SetFlashUpdateAvailable() { |
| 201 flash_update_available_ = true; | 201 flash_update_available_ = true; |
| 202 HandleUpdateAvailable(); | 202 HandleUpdateAvailable(); |
| 203 } | 203 } |
| 204 | 204 |
| 205 void SystemTrayClient::SetPrimaryTrayEnabled(bool enabled) { |
| 206 system_tray_->SetPrimaryTrayEnabled(enabled); |
| 207 } |
| 208 |
| 209 void SystemTrayClient::SetPrimaryTrayVisible(bool visible) { |
| 210 system_tray_->SetPrimaryTrayVisible(visible); |
| 211 } |
| 212 |
| 205 //////////////////////////////////////////////////////////////////////////////// | 213 //////////////////////////////////////////////////////////////////////////////// |
| 206 // ash::mojom::SystemTrayClient: | 214 // ash::mojom::SystemTrayClient: |
| 207 | 215 |
| 208 void SystemTrayClient::ShowSettings() { | 216 void SystemTrayClient::ShowSettings() { |
| 209 ShowSettingsSubPageForActiveUser(std::string()); | 217 ShowSettingsSubPageForActiveUser(std::string()); |
| 210 } | 218 } |
| 211 | 219 |
| 212 void SystemTrayClient::ShowDateSettings() { | 220 void SystemTrayClient::ShowDateSettings() { |
| 213 content::RecordAction(base::UserMetricsAction("ShowDateOptions")); | 221 content::RecordAction(base::UserMetricsAction("ShowDateOptions")); |
| 214 // Everybody can change the time zone (even though it is a device setting). | 222 // Everybody can change the time zone (even though it is a device setting). |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 chromeos::system::SystemClock* clock) { | 382 chromeos::system::SystemClock* clock) { |
| 375 system_tray_->SetUse24HourClock(clock->ShouldUse24HourClock()); | 383 system_tray_->SetUse24HourClock(clock->ShouldUse24HourClock()); |
| 376 } | 384 } |
| 377 | 385 |
| 378 void SystemTrayClient::Observe(int type, | 386 void SystemTrayClient::Observe(int type, |
| 379 const content::NotificationSource& source, | 387 const content::NotificationSource& source, |
| 380 const content::NotificationDetails& details) { | 388 const content::NotificationDetails& details) { |
| 381 DCHECK_EQ(chrome::NOTIFICATION_UPGRADE_RECOMMENDED, type); | 389 DCHECK_EQ(chrome::NOTIFICATION_UPGRADE_RECOMMENDED, type); |
| 382 HandleUpdateAvailable(); | 390 HandleUpdateAvailable(); |
| 383 } | 391 } |
| OLD | NEW |