| 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 "ui/arc/notification/arc_notification_manager.h" | 5 #include "ui/arc/notification/arc_notification_manager.h" |
| 6 | 6 |
| 7 #include "ash/common/system/toast/toast_manager.h" | 7 #include "ash/common/system/toast/toast_manager.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/common/wm_shell.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| 11 #include "ui/arc/notification/arc_custom_notification_item.h" | 11 #include "ui/arc/notification/arc_custom_notification_item.h" |
| 12 #include "ui/arc/notification/arc_notification_item.h" | 12 #include "ui/arc/notification/arc_notification_item.h" |
| 13 | 13 |
| 14 namespace arc { | 14 namespace arc { |
| 15 | 15 |
| 16 ArcNotificationManager::ArcNotificationManager(ArcBridgeService* bridge_service, | 16 ArcNotificationManager::ArcNotificationManager(ArcBridgeService* bridge_service, |
| 17 const AccountId& main_profile_id) | 17 const AccountId& main_profile_id) |
| 18 : ArcNotificationManager(bridge_service, | 18 : ArcNotificationManager(bridge_service, |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 default: | 185 default: |
| 186 VLOG(3) << "Invalid button index (key: " << key | 186 VLOG(3) << "Invalid button index (key: " << key |
| 187 << ", index: " << button_index << ")."; | 187 << ", index: " << button_index << ")."; |
| 188 return; | 188 return; |
| 189 } | 189 } |
| 190 | 190 |
| 191 notifications_instance->SendNotificationEventToAndroid(key, command); | 191 notifications_instance->SendNotificationEventToAndroid(key, command); |
| 192 } | 192 } |
| 193 | 193 |
| 194 void ArcNotificationManager::OnToastPosted(mojom::ArcToastDataPtr data) { | 194 void ArcNotificationManager::OnToastPosted(mojom::ArcToastDataPtr data) { |
| 195 ash::Shell::GetInstance()->toast_manager()->Show( | 195 ash::WmShell::Get()->toast_manager()->Show( |
| 196 ash::ToastData(data->id, data->text, data->duration, data->dismiss_text)); | 196 ash::ToastData(data->id, data->text, data->duration, data->dismiss_text)); |
| 197 } | 197 } |
| 198 | 198 |
| 199 void ArcNotificationManager::OnToastCancelled(mojom::ArcToastDataPtr data) { | 199 void ArcNotificationManager::OnToastCancelled(mojom::ArcToastDataPtr data) { |
| 200 ash::Shell::GetInstance()->toast_manager()->Cancel(data->id); | 200 ash::WmShell::Get()->toast_manager()->Cancel(data->id); |
| 201 } | 201 } |
| 202 | 202 |
| 203 } // namespace arc | 203 } // namespace arc |
| OLD | NEW |