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

Side by Side Diff: ui/message_center/popup_timers_controller.h

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr 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 | « ui/message_center/popup_timer.h ('k') | ui/message_center/popup_timers_controller.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 UI_MESSAGE_CENTER_POPUP_TIMERS_CONTROLLER_H_ 5 #ifndef UI_MESSAGE_CENTER_POPUP_TIMERS_CONTROLLER_H_
6 #define UI_MESSAGE_CENTER_POPUP_TIMERS_CONTROLLER_H_ 6 #define UI_MESSAGE_CENTER_POPUP_TIMERS_CONTROLLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory>
9 #include <string> 10 #include <string>
10 11
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "ui/message_center/message_center.h" 14 #include "ui/message_center/message_center.h"
15 #include "ui/message_center/message_center_observer.h" 15 #include "ui/message_center/message_center_observer.h"
16 #include "ui/message_center/popup_timer.h" 16 #include "ui/message_center/popup_timer.h"
17 17
18 namespace message_center { 18 namespace message_center {
19 19
20 // A class that manages all the timers running for individual notification popup 20 // A class that manages all the timers running for individual notification popup
21 // windows. It supports weak pointers in order to allow safe callbacks when 21 // windows. It supports weak pointers in order to allow safe callbacks when
22 // timers expire. 22 // timers expire.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void PauseTimer(const std::string& id); 62 void PauseTimer(const std::string& id);
63 63
64 // Removes and cancels a single popup timer, if it exists. 64 // Removes and cancels a single popup timer, if it exists.
65 void CancelTimer(const std::string& id); 65 void CancelTimer(const std::string& id);
66 66
67 private: 67 private:
68 // Weak, global. 68 // Weak, global.
69 MessageCenter* message_center_; 69 MessageCenter* message_center_;
70 70
71 // The PopupTimerCollection contains all the managed timers by their ID. 71 // The PopupTimerCollection contains all the managed timers by their ID.
72 using PopupTimerCollection = std::map<std::string, scoped_ptr<PopupTimer>>; 72 using PopupTimerCollection =
73 std::map<std::string, std::unique_ptr<PopupTimer>>;
73 PopupTimerCollection popup_timers_; 74 PopupTimerCollection popup_timers_;
74 75
75 DISALLOW_COPY_AND_ASSIGN(PopupTimersController); 76 DISALLOW_COPY_AND_ASSIGN(PopupTimersController);
76 }; 77 };
77 78
78 } // namespace message_center 79 } // namespace message_center
79 80
80 #endif // UI_MESSAGE_CENTER_POPUP_TIMERS_CONTROLLER_H_ 81 #endif // UI_MESSAGE_CENTER_POPUP_TIMERS_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ui/message_center/popup_timer.h ('k') | ui/message_center/popup_timers_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698