| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/ui/ash/system_tray_controller_mus.h" |
| 6 |
| 7 #include "chrome/browser/browser_process.h" |
| 8 #include "chrome/browser/browser_process_platform_part.h" |
| 9 #include "chrome/browser/chromeos/system/system_clock.h" |
| 10 #include "content/public/common/mojo_shell_connection.h" |
| 11 #include "services/shell/public/cpp/connector.h" |
| 12 |
| 13 SystemTrayControllerMus::SystemTrayControllerMus() { |
| 14 shell::Connector* connector = |
| 15 content::MojoShellConnection::GetForProcess()->GetConnector(); |
| 16 connector->ConnectToInterface("mojo:ash", &system_tray_); |
| 17 |
| 18 g_browser_process->platform_part()->GetSystemClock()->AddObserver(this); |
| 19 } |
| 20 |
| 21 SystemTrayControllerMus::~SystemTrayControllerMus() { |
| 22 g_browser_process->platform_part()->GetSystemClock()->RemoveObserver(this); |
| 23 } |
| 24 |
| 25 void SystemTrayControllerMus::OnSystemClockChanged( |
| 26 chromeos::system::SystemClock* clock) { |
| 27 system_tray_->SetUse24HourClock(clock->ShouldUse24HourClock()); |
| 28 } |
| OLD | NEW |