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

Unified Diff: ash/shell.cc

Issue 1782793002: Ash: Implement Toasts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Comments and Added Tests Created 4 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 side-by-side diff with in-line comments
Download patch
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index d8987ee0d778acdc0fe4c865f63d5331ce22a4e2..eb563905222ff0135544ba8b2a0301f2dbc95887 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -53,6 +53,7 @@
#include "ash/shell_window_ids.h"
#include "ash/system/locale/locale_notification_controller.h"
#include "ash/system/status_area_widget.h"
+#include "ash/system/toast/toast_manager.h"
#include "ash/system/tray/system_tray_delegate.h"
#include "ash/system/tray/system_tray_notifier.h"
#include "ash/utility/partial_screenshot_controller.h"
@@ -732,6 +733,9 @@ Shell::~Shell() {
// layout.
DeactivateKeyboard();
+ // Destroy toasts
+ toast_manager_.reset();
+
// Destroy SystemTrayDelegate before destroying the status area(s). Make sure
// to deinitialize the shelf first, as it is initialized after the delegate.
HideShelf();
@@ -1051,6 +1055,9 @@ void Shell::Init(const ShellInitParams& init_params) {
// Initialize system_tray_delegate_ after StatusAreaWidget is created.
system_tray_delegate_->Initialize();
+ // Initialize toast manager
+ toast_manager_.reset(new ToastManager);
+
#if defined(OS_CHROMEOS)
// Create the LogoutConfirmationController after the SystemTrayDelegate.
logout_confirmation_controller_.reset(new LogoutConfirmationController(
« no previous file with comments | « ash/shell.h ('k') | ash/system/toast/OWNER » ('j') | ash/system/toast/toast_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698