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

Side by Side Diff: athena/system/shutdown_dialog.h

Issue 665803003: Revert of Support modal windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Created 6 years, 2 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 | « athena/system/network_selector.cc ('k') | athena/system/shutdown_dialog.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 ATHENA_SYSTEM_SHUTDOWN_DIALOG_H_ 5 #ifndef ATHENA_SYSTEM_SHUTDOWN_DIALOG_H_
6 #define ATHENA_SYSTEM_SHUTDOWN_DIALOG_H_ 6 #define ATHENA_SYSTEM_SHUTDOWN_DIALOG_H_
7 7
8 #include "athena/input/public/input_manager.h" 8 #include "athena/input/public/input_manager.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "base/timer/timer.h" 11 #include "base/timer/timer.h"
12 12
13 namespace aura { 13 namespace aura {
14 class Window; 14 class Window;
15 } 15 }
16 16
17 namespace views { 17 namespace views {
18 class Widget; 18 class Widget;
19 } 19 }
20 20
21 namespace athena { 21 namespace athena {
22 22
23 // Shuts down in response to the power button being pressed. 23 // Shuts down in response to the power button being pressed.
24 class ShutdownDialog : public PowerButtonObserver { 24 class ShutdownDialog : public PowerButtonObserver {
25 public: 25 public:
26 explicit ShutdownDialog(); 26 explicit ShutdownDialog(aura::Window* dialog_container);
27 virtual ~ShutdownDialog(); 27 virtual ~ShutdownDialog();
28 28
29 private: 29 private:
30 enum State { 30 enum State {
31 // Releasing the power button sends a suspend request. 31 // Releasing the power button sends a suspend request.
32 STATE_SUSPEND_ON_RELEASE, 32 STATE_SUSPEND_ON_RELEASE,
33 33
34 // A warning that the device is about to be shutdown is visible. Releasing 34 // A warning that the device is about to be shutdown is visible. Releasing
35 // the power button does not send a suspend or a shutdown request. 35 // the power button does not send a suspend or a shutdown request.
36 STATE_SHUTDOWN_WARNING_VISIBLE, 36 STATE_SHUTDOWN_WARNING_VISIBLE,
(...skipping 23 matching lines...) Expand all
60 State state_; 60 State state_;
61 61
62 base::OneShotTimer<ShutdownDialog> timer_; 62 base::OneShotTimer<ShutdownDialog> timer_;
63 63
64 DISALLOW_COPY_AND_ASSIGN(ShutdownDialog); 64 DISALLOW_COPY_AND_ASSIGN(ShutdownDialog);
65 }; 65 };
66 66
67 } // namespace athena 67 } // namespace athena
68 68
69 #endif // ATHENA_SYSTEM_SHUTDOWN_DIALOG_H_ 69 #endif // ATHENA_SYSTEM_SHUTDOWN_DIALOG_H_
OLDNEW
« no previous file with comments | « athena/system/network_selector.cc ('k') | athena/system/shutdown_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698