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 #ifndef ASH_SYSTEM_TOAST_TOAST_MANAGER_H_ | 5 #ifndef ASH_SYSTEM_TOAST_TOAST_MANAGER_H_ |
| 6 #define ASH_SYSTEM_TOAST_TOAST_MANAGER_H_ | 6 #define ASH_SYSTEM_TOAST_TOAST_MANAGER_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <string> | 9 #include <string> |
|
oshima
2016/04/08 07:09:41
include?
| |
| 10 | 10 |
| 11 #include "ash/ash_export.h" | 11 #include "ash/ash_export.h" |
| 12 #include "ash/shell_observer.h" | 12 #include "ash/shell_observer.h" |
| 13 #include "ash/system/toast/toast_overlay.h" | 13 #include "ash/system/toast/toast_overlay.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/threading/thread_checker.h" | 15 #include "base/threading/thread_checker.h" |
| 16 | 16 |
| 17 namespace ash { | 17 namespace ash { |
| 18 | 18 |
| 19 // Class managing toast requests. | 19 // Class managing toast requests. |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 34 | 34 |
| 35 void ShowLatest(); | 35 void ShowLatest(); |
| 36 void OnDurationPassed(int toast_id); | 36 void OnDurationPassed(int toast_id); |
| 37 | 37 |
| 38 int toast_id_for_testing() const { return toast_id_; } | 38 int toast_id_for_testing() const { return toast_id_; } |
| 39 ToastOverlay* GetCurrentOverlayForTesting() { return overlay_.get(); } | 39 ToastOverlay* GetCurrentOverlayForTesting() { return overlay_.get(); } |
| 40 void ResetToastIdForTesting() { toast_id_ = 0; } | 40 void ResetToastIdForTesting() { toast_id_ = 0; } |
| 41 | 41 |
| 42 int toast_id_ = 0; | 42 int toast_id_ = 0; |
| 43 std::queue<std::pair<std::string, uint64_t>> queue_; | 43 std::queue<std::pair<std::string, uint64_t>> queue_; |
| 44 scoped_ptr<ToastOverlay> overlay_; | 44 std::unique_ptr<ToastOverlay> overlay_; |
| 45 | 45 |
| 46 base::WeakPtrFactory<ToastManager> weak_ptr_factory_; | 46 base::WeakPtrFactory<ToastManager> weak_ptr_factory_; |
| 47 | 47 |
| 48 DISALLOW_COPY_AND_ASSIGN(ToastManager); | 48 DISALLOW_COPY_AND_ASSIGN(ToastManager); |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 } // namespace ash | 51 } // namespace ash |
| 52 | 52 |
| 53 #endif // ASH_SYSTEM_TOAST_TOAST_MANAGER_H_ | 53 #endif // ASH_SYSTEM_TOAST_TOAST_MANAGER_H_ |
| OLD | NEW |