| 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_VIEWS_COREWM_BASE_FOCUS_RULES_H_ | 5 #ifndef UI_WM_CORE_BASE_FOCUS_RULES_H_ |
| 6 #define UI_VIEWS_COREWM_BASE_FOCUS_RULES_H_ | 6 #define UI_WM_CORE_BASE_FOCUS_RULES_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "ui/views/corewm/focus_rules.h" | 10 #include "ui/wm/core/focus_rules.h" |
| 11 | 11 |
| 12 namespace views { | 12 namespace views { |
| 13 namespace corewm { | 13 namespace corewm { |
| 14 | 14 |
| 15 // A set of basic focus and activation rules. Specializations should most likely | 15 // A set of basic focus and activation rules. Specializations should most likely |
| 16 // subclass this and call up to these methods rather than reimplementing them. | 16 // subclass this and call up to these methods rather than reimplementing them. |
| 17 class VIEWS_EXPORT BaseFocusRules : public FocusRules { | 17 class WM_CORE_EXPORT BaseFocusRules : public FocusRules { |
| 18 protected: | 18 protected: |
| 19 BaseFocusRules(); | 19 BaseFocusRules(); |
| 20 virtual ~BaseFocusRules(); | 20 virtual ~BaseFocusRules(); |
| 21 | 21 |
| 22 // Returns true if the children of |window| can be activated. | 22 // Returns true if the children of |window| can be activated. |
| 23 virtual bool SupportsChildActivation(aura::Window* window) const = 0; | 23 virtual bool SupportsChildActivation(aura::Window* window) const = 0; |
| 24 | 24 |
| 25 // Returns true if |window| is considered visible for activation purposes. | 25 // Returns true if |window| is considered visible for activation purposes. |
| 26 virtual bool IsWindowConsideredVisibleForActivation( | 26 virtual bool IsWindowConsideredVisibleForActivation( |
| 27 aura::Window* window) const; | 27 aura::Window* window) const; |
| 28 | 28 |
| 29 // Overridden from FocusRules: | 29 // Overridden from FocusRules: |
| 30 virtual bool IsToplevelWindow(aura::Window* window) const OVERRIDE; | 30 virtual bool IsToplevelWindow(aura::Window* window) const OVERRIDE; |
| 31 virtual bool CanActivateWindow(aura::Window* window) const OVERRIDE; | 31 virtual bool CanActivateWindow(aura::Window* window) const OVERRIDE; |
| 32 virtual bool CanFocusWindow(aura::Window* window) const OVERRIDE; | 32 virtual bool CanFocusWindow(aura::Window* window) const OVERRIDE; |
| 33 virtual aura::Window* GetToplevelWindow(aura::Window* window) const OVERRIDE; | 33 virtual aura::Window* GetToplevelWindow(aura::Window* window) const OVERRIDE; |
| 34 virtual aura::Window* GetActivatableWindow( | 34 virtual aura::Window* GetActivatableWindow( |
| 35 aura::Window* window) const OVERRIDE; | 35 aura::Window* window) const OVERRIDE; |
| 36 virtual aura::Window* GetFocusableWindow(aura::Window* window) const OVERRIDE; | 36 virtual aura::Window* GetFocusableWindow(aura::Window* window) const OVERRIDE; |
| 37 virtual aura::Window* GetNextActivatableWindow( | 37 virtual aura::Window* GetNextActivatableWindow( |
| 38 aura::Window* ignore) const OVERRIDE; | 38 aura::Window* ignore) const OVERRIDE; |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 DISALLOW_COPY_AND_ASSIGN(BaseFocusRules); | 41 DISALLOW_COPY_AND_ASSIGN(BaseFocusRules); |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 } // namespace corewm | 44 } // namespace corewm |
| 45 } // namespace views | 45 } // namespace views |
| 46 | 46 |
| 47 #endif // UI_VIEWS_COREWM_BASE_FOCUS_RULES_H_ | 47 #endif // UI_WM_CORE_BASE_FOCUS_RULES_H_ |
| OLD | NEW |