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

Side by Side Diff: ash/accelerators/exit_warning_handler.h

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 3 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 "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 void TimerAction(); 66 void TimerAction();
67 67
68 void StartTimer(); 68 void StartTimer();
69 void CancelTimer(); 69 void CancelTimer();
70 70
71 void Show(); 71 void Show();
72 void Hide(); 72 void Hide();
73 73
74 State state_; 74 State state_;
75 scoped_ptr<views::Widget> widget_; 75 scoped_ptr<views::Widget> widget_;
76 base::OneShotTimer<ExitWarningHandler> timer_; 76 base::OneShotTimer timer_;
77 77
78 // Flag to suppress starting the timer for testing. For test we call 78 // Flag to suppress starting the timer for testing. For test we call
79 // TimerAction() directly to simulate the expiration of the timer. 79 // TimerAction() directly to simulate the expiration of the timer.
80 bool stub_timer_for_test_; 80 bool stub_timer_for_test_;
81 81
82 DISALLOW_COPY_AND_ASSIGN(ExitWarningHandler); 82 DISALLOW_COPY_AND_ASSIGN(ExitWarningHandler);
83 }; 83 };
84 84
85 } // namespace ash 85 } // namespace ash
86 86
87 #endif // ASH_ACCELERATORS_EXIT_WARNING_HANDLER_H_ 87 #endif // ASH_ACCELERATORS_EXIT_WARNING_HANDLER_H_
OLDNEW
« no previous file with comments | « android_webview/renderer/aw_render_view_ext.h ('k') | ash/desktop_background/desktop_background_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698