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_WIDGET_DESKTOP_FOCUS_RULES_H_ | 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_FOCUS_RULES_H_ |
6 #define UI_VIEWS_WIDGET_DESKTOP_FOCUS_RULES_H_ | 6 #define UI_VIEWS_WIDGET_DESKTOP_FOCUS_RULES_H_ |
7 | 7 |
| 8 #include "base/macros.h" |
8 #include "ui/wm/core/base_focus_rules.h" | 9 #include "ui/wm/core/base_focus_rules.h" |
9 | 10 |
10 namespace views { | 11 namespace views { |
11 | 12 |
12 class DesktopFocusRules : public wm::BaseFocusRules { | 13 class DesktopFocusRules : public wm::BaseFocusRules { |
13 public: | 14 public: |
14 explicit DesktopFocusRules(aura::Window* content_window); | 15 explicit DesktopFocusRules(aura::Window* content_window); |
15 ~DesktopFocusRules() override; | 16 ~DesktopFocusRules() override; |
16 | 17 |
17 private: | 18 private: |
18 // Overridden from wm::BaseFocusRules: | 19 // Overridden from wm::BaseFocusRules: |
19 bool CanActivateWindow(aura::Window* window) const override; | 20 bool CanActivateWindow(aura::Window* window) const override; |
20 bool SupportsChildActivation(aura::Window* window) const override; | 21 bool SupportsChildActivation(aura::Window* window) const override; |
21 bool IsWindowConsideredVisibleForActivation( | 22 bool IsWindowConsideredVisibleForActivation( |
22 aura::Window* window) const override; | 23 aura::Window* window) const override; |
23 aura::Window* GetToplevelWindow(aura::Window* window) const override; | 24 aura::Window* GetToplevelWindow(aura::Window* window) const override; |
24 aura::Window* GetNextActivatableWindow(aura::Window* window) const override; | 25 aura::Window* GetNextActivatableWindow(aura::Window* window) const override; |
25 | 26 |
26 // The content window. This is an activatable window even though it is a | 27 // The content window. This is an activatable window even though it is a |
27 // child. | 28 // child. |
28 aura::Window* content_window_; | 29 aura::Window* content_window_; |
29 | 30 |
30 DISALLOW_COPY_AND_ASSIGN(DesktopFocusRules); | 31 DISALLOW_COPY_AND_ASSIGN(DesktopFocusRules); |
31 }; | 32 }; |
32 | 33 |
33 } // namespace views | 34 } // namespace views |
34 | 35 |
35 #endif // UI_VIEWS_WIDGET_DESKTOP_FOCUS_RULES_H_ | 36 #endif // UI_VIEWS_WIDGET_DESKTOP_FOCUS_RULES_H_ |
OLD | NEW |