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/wm_shell.h" | |
11 #include "ash/system/toast/toast_manager.h" | 10 #include "ash/system/toast/toast_manager.h" |
| 11 #include "ash/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 "ui/arc/notification/arc_custom_notification_item.h" | 16 #include "ui/arc/notification/arc_custom_notification_item.h" |
17 #include "ui/arc/notification/arc_notification_item.h" | 17 #include "ui/arc/notification/arc_notification_item.h" |
18 | 18 |
19 namespace arc { | 19 namespace arc { |
20 | 20 |
21 ArcNotificationManager::ArcNotificationManager(ArcBridgeService* bridge_service, | 21 ArcNotificationManager::ArcNotificationManager(ArcBridgeService* bridge_service, |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 data->dismiss_text.has_value() ? *data->dismiss_text : std::string())); | 247 data->dismiss_text.has_value() ? *data->dismiss_text : std::string())); |
248 ash::WmShell::Get()->toast_manager()->Show( | 248 ash::WmShell::Get()->toast_manager()->Show( |
249 ash::ToastData(data->id, text16, data->duration, dismiss_text16)); | 249 ash::ToastData(data->id, text16, data->duration, dismiss_text16)); |
250 } | 250 } |
251 | 251 |
252 void ArcNotificationManager::OnToastCancelled(mojom::ArcToastDataPtr data) { | 252 void ArcNotificationManager::OnToastCancelled(mojom::ArcToastDataPtr data) { |
253 ash::WmShell::Get()->toast_manager()->Cancel(data->id); | 253 ash::WmShell::Get()->toast_manager()->Cancel(data->id); |
254 } | 254 } |
255 | 255 |
256 } // namespace arc | 256 } // namespace arc |
OLD | NEW |