OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_WM_PUBLIC_ACTIVATION_CLIENT_H_ | 5 #ifndef UI_WM_PUBLIC_ACTIVATION_CLIENT_H_ |
6 #define UI_WM_PUBLIC_ACTIVATION_CLIENT_H_ | 6 #define UI_WM_PUBLIC_ACTIVATION_CLIENT_H_ |
7 | 7 |
8 #include "ui/aura/aura_export.h" | 8 #include "ui/wm/wm_export.h" |
9 | 9 |
10 namespace ui { | 10 namespace ui { |
11 class Event; | 11 class Event; |
12 } | 12 } |
13 | 13 |
14 namespace aura { | 14 namespace aura { |
15 class Window; | 15 class Window; |
16 | 16 |
17 namespace client { | 17 namespace client { |
18 class ActivationChangeObserver; | 18 class ActivationChangeObserver; |
19 | 19 |
20 // An interface implemented by an object that manages window activation. | 20 // An interface implemented by an object that manages window activation. |
21 class AURA_EXPORT ActivationClient { | 21 class WM_EXPORT ActivationClient { |
22 public: | 22 public: |
23 // Adds/Removes ActivationChangeObservers. | 23 // Adds/Removes ActivationChangeObservers. |
24 virtual void AddObserver(ActivationChangeObserver* observer) = 0; | 24 virtual void AddObserver(ActivationChangeObserver* observer) = 0; |
25 virtual void RemoveObserver(ActivationChangeObserver* observer) = 0; | 25 virtual void RemoveObserver(ActivationChangeObserver* observer) = 0; |
26 | 26 |
27 // Activates |window|. If |window| is NULL, nothing happens. | 27 // Activates |window|. If |window| is NULL, nothing happens. |
28 virtual void ActivateWindow(Window* window) = 0; | 28 virtual void ActivateWindow(Window* window) = 0; |
29 | 29 |
30 // Deactivates |window|. What (if anything) is activated next is up to the | 30 // Deactivates |window|. What (if anything) is activated next is up to the |
31 // client. If |window| is NULL, nothing happens. | 31 // client. If |window| is NULL, nothing happens. |
(...skipping 18 matching lines...) Expand all Loading... |
50 | 50 |
51 // Returns true if |window| can be activated, false otherwise. If |window| has | 51 // Returns true if |window| can be activated, false otherwise. If |window| has |
52 // a modal child it can not be activated. | 52 // a modal child it can not be activated. |
53 virtual bool CanActivateWindow(Window* window) const = 0; | 53 virtual bool CanActivateWindow(Window* window) const = 0; |
54 | 54 |
55 protected: | 55 protected: |
56 virtual ~ActivationClient() {} | 56 virtual ~ActivationClient() {} |
57 }; | 57 }; |
58 | 58 |
59 // Sets/Gets the activation client on the root Window. | 59 // Sets/Gets the activation client on the root Window. |
60 AURA_EXPORT void SetActivationClient(Window* root_window, | 60 WM_EXPORT void SetActivationClient(Window* root_window, |
61 ActivationClient* client); | 61 ActivationClient* client); |
62 AURA_EXPORT ActivationClient* GetActivationClient(Window* root_window); | 62 WM_EXPORT ActivationClient* GetActivationClient(Window* root_window); |
63 | 63 |
64 // Some types of transient window are only visible when active. | 64 // Some types of transient window are only visible when active. |
65 // The transient parents of these windows may have visual appearance properties | 65 // The transient parents of these windows may have visual appearance properties |
66 // that differ from transient parents that can be deactivated. | 66 // that differ from transient parents that can be deactivated. |
67 // The presence of this property implies these traits. | 67 // The presence of this property implies these traits. |
68 // TODO(beng): currently the UI framework (views) implements the actual | 68 // TODO(beng): currently the UI framework (views) implements the actual |
69 // close-on-deactivate component of this feature but it should be | 69 // close-on-deactivate component of this feature but it should be |
70 // possible to implement in the aura client. | 70 // possible to implement in the aura client. |
71 AURA_EXPORT void SetHideOnDeactivate(Window* window, bool hide_on_deactivate); | 71 WM_EXPORT void SetHideOnDeactivate(Window* window, bool hide_on_deactivate); |
72 AURA_EXPORT bool GetHideOnDeactivate(Window* window); | 72 WM_EXPORT bool GetHideOnDeactivate(Window* window); |
73 | 73 |
74 } // namespace clients | 74 } // namespace clients |
75 } // namespace aura | 75 } // namespace aura |
76 | 76 |
77 #endif // UI_WM_PUBLIC_ACTIVATION_CLIENT_H_ | 77 #endif // UI_WM_PUBLIC_ACTIVATION_CLIENT_H_ |
OLD | NEW |