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

Side by Side Diff: ash/system/toast/toast_manager.h

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 8 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 | « ash/system/status_area_widget_delegate.cc ('k') | ash/system/toast/toast_manager_unittest.cc » ('j') | 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 #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 <memory>
8 #include <queue> 9 #include <queue>
9 #include <string> 10 #include <string>
10 11
11 #include "ash/ash_export.h" 12 #include "ash/ash_export.h"
12 #include "ash/shell_observer.h" 13 #include "ash/shell_observer.h"
13 #include "ash/system/toast/toast_overlay.h" 14 #include "ash/system/toast/toast_overlay.h"
14 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
15 #include "base/threading/thread_checker.h" 16 #include "base/threading/thread_checker.h"
16 17
17 namespace ash { 18 namespace ash {
(...skipping 16 matching lines...) Expand all
34 35
35 void ShowLatest(); 36 void ShowLatest();
36 void OnDurationPassed(int toast_id); 37 void OnDurationPassed(int toast_id);
37 38
38 int toast_id_for_testing() const { return toast_id_; } 39 int toast_id_for_testing() const { return toast_id_; }
39 ToastOverlay* GetCurrentOverlayForTesting() { return overlay_.get(); } 40 ToastOverlay* GetCurrentOverlayForTesting() { return overlay_.get(); }
40 void ResetToastIdForTesting() { toast_id_ = 0; } 41 void ResetToastIdForTesting() { toast_id_ = 0; }
41 42
42 int toast_id_ = 0; 43 int toast_id_ = 0;
43 std::queue<std::pair<std::string, uint64_t>> queue_; 44 std::queue<std::pair<std::string, uint64_t>> queue_;
44 scoped_ptr<ToastOverlay> overlay_; 45 std::unique_ptr<ToastOverlay> overlay_;
45 46
46 base::WeakPtrFactory<ToastManager> weak_ptr_factory_; 47 base::WeakPtrFactory<ToastManager> weak_ptr_factory_;
47 48
48 DISALLOW_COPY_AND_ASSIGN(ToastManager); 49 DISALLOW_COPY_AND_ASSIGN(ToastManager);
49 }; 50 };
50 51
51 } // namespace ash 52 } // namespace ash
52 53
53 #endif // ASH_SYSTEM_TOAST_TOAST_MANAGER_H_ 54 #endif // ASH_SYSTEM_TOAST_TOAST_MANAGER_H_
OLDNEW
« no previous file with comments | « ash/system/status_area_widget_delegate.cc ('k') | ash/system/toast/toast_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698