OLD | NEW |
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_DISPLAY_SHUTDOWN_OBSERVER_CHROMEOS_H_ | 5 #ifndef ASH_DISPLAY_SHUTDOWN_OBSERVER_CHROMEOS_H_ |
6 #define ASH_DISPLAY_SHUTDOWN_OBSERVER_CHROMEOS_H_ | 6 #define ASH_DISPLAY_SHUTDOWN_OBSERVER_CHROMEOS_H_ |
7 | 7 |
8 #include "ash/common/shell_observer.h" | 8 #include "ash/shell_observer.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 | 10 |
11 namespace display { | 11 namespace display { |
12 class DisplayConfigurator; | 12 class DisplayConfigurator; |
13 } | 13 } |
14 | 14 |
15 namespace ash { | 15 namespace ash { |
16 | 16 |
17 // Adds self as ShellObserver and listens for OnAppTerminating() on behalf of | 17 // Adds self as ShellObserver and listens for OnAppTerminating() on behalf of |
18 // |display_configurator_|. | 18 // |display_configurator_|. |
19 class ShutdownObserver : public ShellObserver { | 19 class ShutdownObserver : public ShellObserver { |
20 public: | 20 public: |
21 explicit ShutdownObserver(display::DisplayConfigurator* display_configurator); | 21 explicit ShutdownObserver(display::DisplayConfigurator* display_configurator); |
22 ~ShutdownObserver() override; | 22 ~ShutdownObserver() override; |
23 | 23 |
24 private: | 24 private: |
25 // ShellObserver: | 25 // ShellObserver: |
26 void OnAppTerminating() override; | 26 void OnAppTerminating() override; |
27 | 27 |
28 display::DisplayConfigurator* display_configurator_; | 28 display::DisplayConfigurator* display_configurator_; |
29 | 29 |
30 DISALLOW_COPY_AND_ASSIGN(ShutdownObserver); | 30 DISALLOW_COPY_AND_ASSIGN(ShutdownObserver); |
31 }; | 31 }; |
32 | 32 |
33 } // namespace ash | 33 } // namespace ash |
34 | 34 |
35 #endif // ASH_DISPLAY_SHUTDOWN_OBSERVER_CHROMEOS_H_ | 35 #endif // ASH_DISPLAY_SHUTDOWN_OBSERVER_CHROMEOS_H_ |
OLD | NEW |