| 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/wm_shell.h" | 8 #include "ash/common/wm_shell.h" |
| 9 #include "ash/public/cpp/shell_window_ids.h" | 9 #include "ash/public/cpp/shell_window_ids.h" |
| 10 #include "ash/public/interfaces/constants.mojom.h" |
| 10 #include "ash/shell.h" | 11 #include "ash/shell.h" |
| 11 #include "base/feature_list.h" | 12 #include "base/feature_list.h" |
| 12 #include "base/logging.h" | 13 #include "base/logging.h" |
| 13 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
| 14 #include "chrome/browser/browser_process_platform_part.h" | 15 #include "chrome/browser/browser_process_platform_part.h" |
| 15 #include "chrome/browser/chrome_notification_types.h" | 16 #include "chrome/browser/chrome_notification_types.h" |
| 16 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 17 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
| 17 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | 18 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
| 18 #include "chrome/browser/chromeos/options/network_config_view.h" | 19 #include "chrome/browser/chromeos/options/network_config_view.h" |
| 19 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 20 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 } | 80 } |
| 80 NOTREACHED(); | 81 NOTREACHED(); |
| 81 return ash::mojom::UpdateSeverity::CRITICAL; | 82 return ash::mojom::UpdateSeverity::CRITICAL; |
| 82 } | 83 } |
| 83 | 84 |
| 84 } // namespace | 85 } // namespace |
| 85 | 86 |
| 86 SystemTrayClient::SystemTrayClient() : binding_(this) { | 87 SystemTrayClient::SystemTrayClient() : binding_(this) { |
| 87 content::ServiceManagerConnection::GetForProcess() | 88 content::ServiceManagerConnection::GetForProcess() |
| 88 ->GetConnector() | 89 ->GetConnector() |
| 89 ->BindInterface(ash_util::GetAshServiceName(), &system_tray_); | 90 ->BindInterface(ash::mojom::kServiceName, &system_tray_); |
| 90 // Register this object as the client interface implementation. | 91 // Register this object as the client interface implementation. |
| 91 system_tray_->SetClient(binding_.CreateInterfacePtrAndBind()); | 92 system_tray_->SetClient(binding_.CreateInterfacePtrAndBind()); |
| 92 | 93 |
| 93 // If this observes clock setting changes before ash comes up the IPCs will | 94 // If this observes clock setting changes before ash comes up the IPCs will |
| 94 // be queued on |system_tray_|. | 95 // be queued on |system_tray_|. |
| 95 g_browser_process->platform_part()->GetSystemClock()->AddObserver(this); | 96 g_browser_process->platform_part()->GetSystemClock()->AddObserver(this); |
| 96 | 97 |
| 97 registrar_.Add(this, chrome::NOTIFICATION_UPGRADE_RECOMMENDED, | 98 registrar_.Add(this, chrome::NOTIFICATION_UPGRADE_RECOMMENDED, |
| 98 content::NotificationService::AllSources()); | 99 content::NotificationService::AllSources()); |
| 99 | 100 |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 chromeos::system::SystemClock* clock) { | 374 chromeos::system::SystemClock* clock) { |
| 374 system_tray_->SetUse24HourClock(clock->ShouldUse24HourClock()); | 375 system_tray_->SetUse24HourClock(clock->ShouldUse24HourClock()); |
| 375 } | 376 } |
| 376 | 377 |
| 377 void SystemTrayClient::Observe(int type, | 378 void SystemTrayClient::Observe(int type, |
| 378 const content::NotificationSource& source, | 379 const content::NotificationSource& source, |
| 379 const content::NotificationDetails& details) { | 380 const content::NotificationDetails& details) { |
| 380 DCHECK_EQ(chrome::NOTIFICATION_UPGRADE_RECOMMENDED, type); | 381 DCHECK_EQ(chrome::NOTIFICATION_UPGRADE_RECOMMENDED, type); |
| 381 HandleUpdateAvailable(); | 382 HandleUpdateAvailable(); |
| 382 } | 383 } |
| OLD | NEW |