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