OLD | NEW |
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_ENV_PUBLIC_ATHENA_ENV_H_ | 5 #ifndef ATHENA_ENV_PUBLIC_ATHENA_ENV_H_ |
6 #define ATHENA_ENV_PUBLIC_ATHENA_ENV_H_ | 6 #define ATHENA_ENV_PUBLIC_ATHENA_ENV_H_ |
7 | 7 |
8 #include "athena/athena_export.h" | 8 #include "athena/athena_export.h" |
| 9 #include "base/callback_forward.h" |
| 10 |
| 11 namespace aura { |
| 12 class WindowTreeHost; |
| 13 } |
9 | 14 |
10 namespace gfx { | 15 namespace gfx { |
11 class Insets; | 16 class Insets; |
12 } | 17 } |
13 | 18 |
14 namespace aura { | |
15 class WindowTreeHost; | |
16 } | |
17 | |
18 namespace athena { | 19 namespace athena { |
19 | 20 |
20 // AthenaEnv creates/shuts down the environment necessary to | 21 // AthenaEnv creates/shuts down the environment necessary to |
21 // start Athena shell. | 22 // start Athena shell. |
22 class ATHENA_EXPORT AthenaEnv { | 23 class ATHENA_EXPORT AthenaEnv { |
23 public: | 24 public: |
24 static void Create(); | 25 static void Create(); |
25 static AthenaEnv* Get(); | 26 static AthenaEnv* Get(); |
26 static void Shutdown(); | 27 static void Shutdown(); |
27 | 28 |
28 virtual ~AthenaEnv() {} | 29 virtual ~AthenaEnv() {} |
29 | 30 |
30 // Returns the single WindowTreeHost for the primary display. | 31 // Returns the single WindowTreeHost for the primary display. |
31 virtual aura::WindowTreeHost* GetHost() = 0; | 32 virtual aura::WindowTreeHost* GetHost() = 0; |
32 | 33 |
33 // Sets the insets for the primary displays's work area. | 34 // Sets the insets for the primary displays's work area. |
34 virtual void SetDisplayWorkAreaInsets(const gfx::Insets& insets) = 0; | 35 virtual void SetDisplayWorkAreaInsets(const gfx::Insets& insets) = 0; |
| 36 |
| 37 // Adds the callback called when the athena is about to exit. |
| 38 virtual void AddTerminatingCallback(const base::Closure& closure) = 0; |
| 39 virtual void RemoveTerminatingCallback(const base::Closure& closure) = 0; |
| 40 |
| 41 // Called when the athena is about to exist. |
| 42 virtual void OnTerminating() = 0; |
35 }; | 43 }; |
36 | 44 |
37 } // namespace athena | 45 } // namespace athena |
38 | 46 |
39 #endif // ATHENA_ENV_PUBLIC_ATHENA_ENV_H_ | 47 #endif // ATHENA_ENV_PUBLIC_ATHENA_ENV_H_ |
OLD | NEW |