Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(366)

Side by Side Diff: ui/arc/notification/arc_notification_manager.cc

Issue 2738133003: Promotes a handful of members from WmShell to Shell (Closed)
Patch Set: merge Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/exo/wm_helper_ash.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 return; 238 return;
239 239
240 notifications_instance->OpenNotificationSettings(key); 240 notifications_instance->OpenNotificationSettings(key);
241 } 241 }
242 242
243 void ArcNotificationManager::OnToastPosted(mojom::ArcToastDataPtr data) { 243 void ArcNotificationManager::OnToastPosted(mojom::ArcToastDataPtr data) {
244 const base::string16 text16( 244 const base::string16 text16(
245 base::UTF8ToUTF16(data->text.has_value() ? *data->text : std::string())); 245 base::UTF8ToUTF16(data->text.has_value() ? *data->text : std::string()));
246 const base::string16 dismiss_text16(base::UTF8ToUTF16( 246 const base::string16 dismiss_text16(base::UTF8ToUTF16(
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::Shell::GetInstance()->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::Shell::GetInstance()->toast_manager()->Cancel(data->id);
254 } 254 }
255 255
256 } // namespace arc 256 } // namespace arc
OLDNEW
« no previous file with comments | « components/exo/wm_helper_ash.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698