summaryrefslogtreecommitdiffstats
path: root/ash/shell.cc
diff options
context:
space:
mode:
authoryoshiki <yoshiki@chromium.org>2016-03-23 18:24:43 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-24 01:26:06 +0000
commit32f516395c1d165053be9b93ef9d2cbdfd94685a (patch)
tree7e11f0316ea16dc9ddc52a4e322a2a773aad7ad8 /ash/shell.cc
parent5cb6ce43b7cb7d64d170d91a165910563537d10c (diff)
downloadchromium_src-32f516395c1d165053be9b93ef9d2cbdfd94685a.zip
chromium_src-32f516395c1d165053be9b93ef9d2cbdfd94685a.tar.gz
chromium_src-32f516395c1d165053be9b93ef9d2cbdfd94685a.tar.bz2
Ash: Implement Toasts
This patch adds the implementation of toast. Currently this is not used from anywhere. The client code will be added in separated patch. BUG=b/25797993 Review URL: https://codereview.chromium.org/1782793002 Cr-Commit-Position: refs/heads/master@{#383003}
Diffstat (limited to 'ash/shell.cc')
-rw-r--r--ash/shell.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/ash/shell.cc b/ash/shell.cc
index 71231a2..2e100f0 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"
@@ -734,6 +735,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();
@@ -1059,6 +1063,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(