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

Unified Diff: ash/common/system/toast/toast_manager.h

Issue 2732813002: chromeos: Move files in //ash/common to //ash, part 1 (Closed)
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/system/toast/toast_data.cc ('k') | ash/common/system/toast/toast_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/toast/toast_manager.h
diff --git a/ash/common/system/toast/toast_manager.h b/ash/common/system/toast/toast_manager.h
deleted file mode 100644
index 26b72a68c6960d82536f5571c8cda75eb8a62d91..0000000000000000000000000000000000000000
--- a/ash/common/system/toast/toast_manager.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_COMMON_SYSTEM_TOAST_TOAST_MANAGER_H_
-#define ASH_COMMON_SYSTEM_TOAST_TOAST_MANAGER_H_
-
-#include <deque>
-#include <memory>
-#include <string>
-
-#include "ash/ash_export.h"
-#include "ash/common/system/toast/toast_data.h"
-#include "ash/common/system/toast/toast_overlay.h"
-#include "base/memory/weak_ptr.h"
-
-namespace ash {
-
-// Class managing toast requests.
-class ASH_EXPORT ToastManager : public ToastOverlay::Delegate {
- public:
- ToastManager();
- ~ToastManager() override;
-
- // Show a toast. If there are queued toasts, succeeding toasts are queued as
- // well, and are shown one by one.
- void Show(const ToastData& data);
-
- void Cancel(const std::string& id);
-
- // ToastOverlay::Delegate overrides:
- void OnClosed() override;
-
- private:
- friend class ToastManagerTest;
-
- void ShowLatest();
- void OnDurationPassed(int toast_number);
-
- ToastOverlay* GetCurrentOverlayForTesting() { return overlay_.get(); }
- int serial_for_testing() const { return serial_; }
- void ResetSerialForTesting() { serial_ = 0; }
-
- // ID of the toast which is currently shown. Empty if no toast is visible.
- std::string current_toast_id_;
-
- int serial_ = 0;
- std::deque<ToastData> queue_;
- std::unique_ptr<ToastOverlay> overlay_;
-
- base::WeakPtrFactory<ToastManager> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(ToastManager);
-};
-
-} // namespace ash
-
-#endif // ASH_COMMON_SYSTEM_TOAST_TOAST_MANAGER_H_
« no previous file with comments | « ash/common/system/toast/toast_data.cc ('k') | ash/common/system/toast/toast_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698