| 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_AURA_CLIENT_ACTIVATION_CLIENT_H_ | 5 #ifndef UI_AURA_CLIENT_ACTIVATION_CLIENT_H_ |
| 6 #define UI_AURA_CLIENT_ACTIVATION_CLIENT_H_ | 6 #define UI_AURA_CLIENT_ACTIVATION_CLIENT_H_ |
| 7 | 7 |
| 8 #include "ui/aura/aura_export.h" | 8 #include "ui/aura/aura_export.h" |
| 9 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // Activates |window|. If |window| is NULL, nothing happens. | 28 // Activates |window|. If |window| is NULL, nothing happens. |
| 29 virtual void ActivateWindow(Window* window) = 0; | 29 virtual void ActivateWindow(Window* window) = 0; |
| 30 | 30 |
| 31 // Deactivates |window|. What (if anything) is activated next is up to the | 31 // Deactivates |window|. What (if anything) is activated next is up to the |
| 32 // client. If |window| is NULL, nothing happens. | 32 // client. If |window| is NULL, nothing happens. |
| 33 virtual void DeactivateWindow(Window* window) = 0; | 33 virtual void DeactivateWindow(Window* window) = 0; |
| 34 | 34 |
| 35 // Retrieves the active window, or NULL if there is none. | 35 // Retrieves the active window, or NULL if there is none. |
| 36 virtual Window* GetActiveWindow() = 0; | 36 virtual Window* GetActiveWindow() = 0; |
| 37 | 37 |
| 38 // Retrieves the activatable window for |window|, or NULL if there is none. |
| 39 virtual Window* GetActivatableWindow(Window* window) = 0; |
| 40 |
| 38 // Invoked prior to |window| getting focus as a result of the |event|. |event| | 41 // Invoked prior to |window| getting focus as a result of the |event|. |event| |
| 39 // may be NULL. Returning false blocks |window| from getting focus. | 42 // may be NULL. Returning false blocks |window| from getting focus. |
| 40 virtual bool OnWillFocusWindow(Window* window, const ui::Event* event) = 0; | 43 virtual bool OnWillFocusWindow(Window* window, const ui::Event* event) = 0; |
| 41 | 44 |
| 42 // Returns true if |window| can be activated, false otherwise. If |window| has | 45 // Returns true if |window| can be activated, false otherwise. If |window| has |
| 43 // a modal child it can not be activated. | 46 // a modal child it can not be activated. |
| 44 virtual bool CanActivateWindow(Window* window) const = 0; | 47 virtual bool CanActivateWindow(Window* window) const = 0; |
| 45 | 48 |
| 46 protected: | 49 protected: |
| 47 virtual ~ActivationClient() {} | 50 virtual ~ActivationClient() {} |
| (...skipping 11 matching lines...) Expand all Loading... |
| 59 // TODO(beng): currently the UI framework (views) implements the actual | 62 // TODO(beng): currently the UI framework (views) implements the actual |
| 60 // close-on-deactivate component of this feature but it should be | 63 // close-on-deactivate component of this feature but it should be |
| 61 // possible to implement in the aura client. | 64 // possible to implement in the aura client. |
| 62 AURA_EXPORT void SetHideOnDeactivate(Window* window, bool hide_on_deactivate); | 65 AURA_EXPORT void SetHideOnDeactivate(Window* window, bool hide_on_deactivate); |
| 63 AURA_EXPORT bool GetHideOnDeactivate(Window* window); | 66 AURA_EXPORT bool GetHideOnDeactivate(Window* window); |
| 64 | 67 |
| 65 } // namespace clients | 68 } // namespace clients |
| 66 } // namespace aura | 69 } // namespace aura |
| 67 | 70 |
| 68 #endif // UI_AURA_CLIENT_ACTIVATION_CLIENT_H_ | 71 #endif // UI_AURA_CLIENT_ACTIVATION_CLIENT_H_ |
| OLD | NEW |