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_CORE_FOCUS_RULES_H_ | 5 #ifndef UI_WM_CORE_FOCUS_RULES_H_ |
6 #define UI_WM_CORE_FOCUS_RULES_H_ | 6 #define UI_WM_CORE_FOCUS_RULES_H_ |
7 | 7 |
8 #include "ui/wm/core/wm_core_export.h" | 8 #include "ui/wm/wm_export.h" |
9 | 9 |
10 namespace aura { | 10 namespace aura { |
11 class Window; | 11 class Window; |
12 } | 12 } |
13 | 13 |
14 namespace wm { | 14 namespace wm { |
15 | 15 |
16 // Implemented by an object that establishes the rules about what can be | 16 // Implemented by an object that establishes the rules about what can be |
17 // focused or activated. | 17 // focused or activated. |
18 class WM_CORE_EXPORT FocusRules { | 18 class WM_EXPORT FocusRules { |
19 public: | 19 public: |
20 virtual ~FocusRules() {} | 20 virtual ~FocusRules() {} |
21 | 21 |
22 // Returns true if |window| is a toplevel window. Whether or not a window | 22 // Returns true if |window| is a toplevel window. Whether or not a window |
23 // is considered toplevel is determined by a similar set of rules that | 23 // is considered toplevel is determined by a similar set of rules that |
24 // govern activation and focus. Not all toplevel windows are activatable, | 24 // govern activation and focus. Not all toplevel windows are activatable, |
25 // call CanActivateWindow() to determine if a window can be activated. | 25 // call CanActivateWindow() to determine if a window can be activated. |
26 virtual bool IsToplevelWindow(aura::Window* window) const = 0; | 26 virtual bool IsToplevelWindow(aura::Window* window) const = 0; |
27 // Returns true if |window| can be activated or focused. | 27 // Returns true if |window| can be activated or focused. |
28 virtual bool CanActivateWindow(aura::Window* window) const = 0; | 28 virtual bool CanActivateWindow(aura::Window* window) const = 0; |
(...skipping 28 matching lines...) Expand all Loading... |
57 // - it is being destroyed. | 57 // - it is being destroyed. |
58 // - it is being explicitly deactivated. | 58 // - it is being explicitly deactivated. |
59 // |ignore| cannot be NULL. | 59 // |ignore| cannot be NULL. |
60 virtual aura::Window* GetNextActivatableWindow( | 60 virtual aura::Window* GetNextActivatableWindow( |
61 aura::Window* ignore) const = 0; | 61 aura::Window* ignore) const = 0; |
62 }; | 62 }; |
63 | 63 |
64 } // namespace wm | 64 } // namespace wm |
65 | 65 |
66 #endif // UI_WM_CORE_FOCUS_RULES_H_ | 66 #endif // UI_WM_CORE_FOCUS_RULES_H_ |
OLD | NEW |