| 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/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/system/toast/toast_manager.h" | 8 #include "ash/system/toast/toast_manager.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" |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 default: | 172 default: |
| 173 VLOG(3) << "Invalid button index (key: " << key << ", index: " << | 173 VLOG(3) << "Invalid button index (key: " << key << ", index: " << |
| 174 button_index << ")."; | 174 button_index << ")."; |
| 175 return; | 175 return; |
| 176 } | 176 } |
| 177 | 177 |
| 178 notifications_instance->SendNotificationEventToAndroid(key, command); | 178 notifications_instance->SendNotificationEventToAndroid(key, command); |
| 179 } | 179 } |
| 180 | 180 |
| 181 void ArcNotificationManager::OnToastPosted(mojom::ArcToastDataPtr data) { | 181 void ArcNotificationManager::OnToastPosted(mojom::ArcToastDataPtr data) { |
| 182 ash::Shell::GetInstance()->toast_manager()->Show(data->text, data->duration); | 182 ash::Shell::GetInstance()->toast_manager()->Show( |
| 183 ash::ToastData(data->id, data->text, data->duration)); |
| 183 } | 184 } |
| 184 | 185 |
| 185 void ArcNotificationManager::OnToastCancelled(mojom::ArcToastDataPtr data) { | 186 void ArcNotificationManager::OnToastCancelled(mojom::ArcToastDataPtr data) { |
| 186 // TODO(yoshiki): Implement cancel. | 187 ash::Shell::GetInstance()->toast_manager()->Cancel(data->id); |
| 187 } | 188 } |
| 188 | 189 |
| 189 } // namespace arc | 190 } // namespace arc |
| OLD | NEW |