| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/browser_process_platform_part.h" | 10 #include "chrome/browser/browser_process_platform_part.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 // Tolerate ash crashing and coming back up. | 51 // Tolerate ash crashing and coming back up. |
| 52 system_tray_.set_connection_error_handler(base::Bind( | 52 system_tray_.set_connection_error_handler(base::Bind( |
| 53 &SystemTrayClient::OnClientConnectionError, base::Unretained(this))); | 53 &SystemTrayClient::OnClientConnectionError, base::Unretained(this))); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void SystemTrayClient::OnClientConnectionError() { | 56 void SystemTrayClient::OnClientConnectionError() { |
| 57 system_tray_.reset(); | 57 system_tray_.reset(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 //////////////////////////////////////////////////////////////////////////////// |
| 61 // ash::mojom::SystemTrayClient: |
| 62 |
| 63 void SystemTrayClient::ShowSettings() { |
| 64 SystemTrayCommon::ShowSettings(); |
| 65 } |
| 66 |
| 60 void SystemTrayClient::ShowDateSettings() { | 67 void SystemTrayClient::ShowDateSettings() { |
| 61 SystemTrayCommon::ShowDateSettings(); | 68 SystemTrayCommon::ShowDateSettings(); |
| 62 } | 69 } |
| 63 | 70 |
| 71 void SystemTrayClient::ShowDisplaySettings() { |
| 72 SystemTrayCommon::ShowDisplaySettings(); |
| 73 } |
| 74 |
| 75 void SystemTrayClient::ShowChromeSlow() { |
| 76 SystemTrayCommon::ShowChromeSlow(); |
| 77 } |
| 78 |
| 79 void SystemTrayClient::ShowIMESettings() { |
| 80 SystemTrayCommon::ShowIMESettings(); |
| 81 } |
| 82 |
| 83 void SystemTrayClient::ShowHelp() { |
| 84 SystemTrayCommon::ShowHelp(); |
| 85 } |
| 86 |
| 87 void SystemTrayClient::ShowAccessibilityHelp() { |
| 88 SystemTrayCommon::ShowAccessibilityHelp(); |
| 89 } |
| 90 |
| 91 void SystemTrayClient::ShowAccessibilitySettings() { |
| 92 SystemTrayCommon::ShowAccessibilitySettings(); |
| 93 } |
| 94 |
| 95 void SystemTrayClient::ShowPaletteHelp() { |
| 96 SystemTrayCommon::ShowPaletteHelp(); |
| 97 } |
| 98 |
| 99 void SystemTrayClient::ShowPaletteSettings() { |
| 100 SystemTrayCommon::ShowPaletteSettings(); |
| 101 } |
| 102 |
| 103 void SystemTrayClient::ShowPublicAccountInfo() { |
| 104 SystemTrayCommon::ShowPublicAccountInfo(); |
| 105 } |
| 106 |
| 107 void SystemTrayClient::ShowProxySettings() { |
| 108 SystemTrayCommon::ShowProxySettings(); |
| 109 } |
| 110 |
| 111 //////////////////////////////////////////////////////////////////////////////// |
| 112 // chromeos::system::SystemClockObserver: |
| 113 |
| 64 void SystemTrayClient::OnSystemClockChanged( | 114 void SystemTrayClient::OnSystemClockChanged( |
| 65 chromeos::system::SystemClock* clock) { | 115 chromeos::system::SystemClock* clock) { |
| 66 ConnectToSystemTray(); | 116 ConnectToSystemTray(); |
| 67 system_tray_->SetUse24HourClock(clock->ShouldUse24HourClock()); | 117 system_tray_->SetUse24HourClock(clock->ShouldUse24HourClock()); |
| 68 } | 118 } |
| OLD | NEW |