| 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 <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "ash/common/system/toast/toast_manager.h" | 10 #include "ash/common/system/toast/toast_manager.h" |
| 11 #include "ash/common/wm_shell.h" | 11 #include "ash/common/wm_shell.h" |
| 12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
| 13 #include "base/stl_util.h" | 13 #include "base/stl_util.h" |
| 14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
| 15 #include "components/arc/arc_bridge_service.h" | 15 #include "components/arc/arc_bridge_service.h" |
| 16 #include "mojo/common/common_type_converters.h" | |
| 17 #include "ui/arc/notification/arc_custom_notification_item.h" | 16 #include "ui/arc/notification/arc_custom_notification_item.h" |
| 18 #include "ui/arc/notification/arc_notification_item.h" | 17 #include "ui/arc/notification/arc_notification_item.h" |
| 19 | 18 |
| 20 namespace arc { | 19 namespace arc { |
| 21 | 20 |
| 22 ArcNotificationManager::ArcNotificationManager(ArcBridgeService* bridge_service, | 21 ArcNotificationManager::ArcNotificationManager(ArcBridgeService* bridge_service, |
| 23 const AccountId& main_profile_id) | 22 const AccountId& main_profile_id) |
| 24 : ArcNotificationManager(bridge_service, | 23 : ArcNotificationManager(bridge_service, |
| 25 main_profile_id, | 24 main_profile_id, |
| 26 message_center::MessageCenter::Get()) {} | 25 message_center::MessageCenter::Get()) {} |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 data->dismiss_text.has_value() ? *data->dismiss_text : std::string())); | 230 data->dismiss_text.has_value() ? *data->dismiss_text : std::string())); |
| 232 ash::WmShell::Get()->toast_manager()->Show( | 231 ash::WmShell::Get()->toast_manager()->Show( |
| 233 ash::ToastData(data->id, text16, data->duration, dismiss_text16)); | 232 ash::ToastData(data->id, text16, data->duration, dismiss_text16)); |
| 234 } | 233 } |
| 235 | 234 |
| 236 void ArcNotificationManager::OnToastCancelled(mojom::ArcToastDataPtr data) { | 235 void ArcNotificationManager::OnToastCancelled(mojom::ArcToastDataPtr data) { |
| 237 ash::WmShell::Get()->toast_manager()->Cancel(data->id); | 236 ash::WmShell::Get()->toast_manager()->Cancel(data->id); |
| 238 } | 237 } |
| 239 | 238 |
| 240 } // namespace arc | 239 } // namespace arc |
| OLD | NEW |