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

Side by Side Diff: ash/accelerators/exit_warning_handler.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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_ACCELERATORS_EXIT_WARNING_HANDLER_H_ 5 #ifndef ASH_ACCELERATORS_EXIT_WARNING_HANDLER_H_
6 #define ASH_ACCELERATORS_EXIT_WARNING_HANDLER_H_ 6 #define ASH_ACCELERATORS_EXIT_WARNING_HANDLER_H_
7 7
8 #include <memory>
9
8 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/timer/timer.h" 12 #include "base/timer/timer.h"
12 #include "ui/base/accelerators/accelerator.h" 13 #include "ui/base/accelerators/accelerator.h"
13 14
14 namespace views { 15 namespace views {
15 class Widget; 16 class Widget;
16 } 17 }
17 18
18 namespace ash { 19 namespace ash {
19 20
20 // In order to avoid accidental exits when the user presses the exit 21 // In order to avoid accidental exits when the user presses the exit
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // Performs actions when the time limit is exceeded. 67 // Performs actions when the time limit is exceeded.
67 void TimerAction(); 68 void TimerAction();
68 69
69 void StartTimer(); 70 void StartTimer();
70 void CancelTimer(); 71 void CancelTimer();
71 72
72 void Show(); 73 void Show();
73 void Hide(); 74 void Hide();
74 75
75 State state_; 76 State state_;
76 scoped_ptr<views::Widget> widget_; 77 std::unique_ptr<views::Widget> widget_;
77 base::OneShotTimer timer_; 78 base::OneShotTimer timer_;
78 79
79 // Flag to suppress starting the timer for testing. For test we call 80 // Flag to suppress starting the timer for testing. For test we call
80 // TimerAction() directly to simulate the expiration of the timer. 81 // TimerAction() directly to simulate the expiration of the timer.
81 bool stub_timer_for_test_; 82 bool stub_timer_for_test_;
82 83
83 DISALLOW_COPY_AND_ASSIGN(ExitWarningHandler); 84 DISALLOW_COPY_AND_ASSIGN(ExitWarningHandler);
84 }; 85 };
85 86
86 } // namespace ash 87 } // namespace ash
87 88
88 #endif // ASH_ACCELERATORS_EXIT_WARNING_HANDLER_H_ 89 #endif // ASH_ACCELERATORS_EXIT_WARNING_HANDLER_H_
OLDNEW
« no previous file with comments | « ash/accelerators/accelerator_interactive_uitest_chromeos.cc ('k') | ash/accelerators/key_hold_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698