OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 SKY_TOOLS_DEBUGGER_FOCUS_RULES_H_ | 5 #ifndef SKY_TOOLS_DEBUGGER_FOCUS_RULES_H_ |
6 #define SKY_TOOLS_DEBUGGER_FOCUS_RULES_H_ | 6 #define SKY_TOOLS_DEBUGGER_FOCUS_RULES_H_ |
7 | 7 |
8 #include "mojo/services/window_manager/window_manager_app.h" | 8 #include "mojo/services/window_manager/window_manager_app.h" |
9 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
10 #include "ui/wm/core/focus_rules.h" | 10 #include "ui/wm/core/focus_rules.h" |
11 | 11 |
12 namespace sky { | 12 namespace sky { |
| 13 namespace debugger { |
13 | 14 |
14 class FocusRules : public wm::FocusRules { | 15 class FocusRules : public wm::FocusRules { |
15 public: | 16 public: |
16 FocusRules(mojo::WindowManagerApp* window_manager_app, mojo::View* content); | 17 FocusRules(mojo::WindowManagerApp* window_manager_app, mojo::View* content); |
17 virtual ~FocusRules(); | 18 virtual ~FocusRules(); |
18 | 19 |
19 private: | 20 private: |
20 // Overridden from wm::FocusRules: | 21 // Overridden from wm::FocusRules: |
21 bool IsToplevelWindow(aura::Window* window) const override; | 22 bool IsToplevelWindow(aura::Window* window) const override; |
22 bool CanActivateWindow(aura::Window* window) const override; | 23 bool CanActivateWindow(aura::Window* window) const override; |
23 bool CanFocusWindow(aura::Window* window) const override; | 24 bool CanFocusWindow(aura::Window* window) const override; |
24 aura::Window* GetToplevelWindow(aura::Window* window) const override; | 25 aura::Window* GetToplevelWindow(aura::Window* window) const override; |
25 aura::Window* GetActivatableWindow(aura::Window* window) const override; | 26 aura::Window* GetActivatableWindow(aura::Window* window) const override; |
26 aura::Window* GetFocusableWindow(aura::Window* window) const override; | 27 aura::Window* GetFocusableWindow(aura::Window* window) const override; |
27 aura::Window* GetNextActivatableWindow(aura::Window* ignore) const override; | 28 aura::Window* GetNextActivatableWindow(aura::Window* ignore) const override; |
28 | 29 |
29 mojo::View* content_; | 30 mojo::View* content_; |
30 mojo::WindowManagerApp* window_manager_app_; | 31 mojo::WindowManagerApp* window_manager_app_; |
31 | 32 |
32 DISALLOW_COPY_AND_ASSIGN(FocusRules); | 33 DISALLOW_COPY_AND_ASSIGN(FocusRules); |
33 }; | 34 }; |
34 | 35 |
| 36 } // namespace debugger |
35 } // namespace sky | 37 } // namespace sky |
36 | 38 |
37 #endif // SKY_TOOLS_DEBUGGER_FOCUS_RULES_H_ | 39 #endif // SKY_TOOLS_DEBUGGER_FOCUS_RULES_H_ |
OLD | NEW |