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 #include "ui/views/widget/desktop_aura/desktop_focus_rules.h" | 5 #include "ui/views/widget/desktop_aura/desktop_focus_rules.h" |
6 | 6 |
7 #include "ui/aura/root_window.h" | |
8 #include "ui/aura/window.h" | 7 #include "ui/aura/window.h" |
| 8 #include "ui/aura/window_event_dispatcher.h" |
9 | 9 |
10 namespace views { | 10 namespace views { |
11 | 11 |
12 DesktopFocusRules::DesktopFocusRules(aura::Window* content_window) | 12 DesktopFocusRules::DesktopFocusRules(aura::Window* content_window) |
13 : content_window_(content_window) {} | 13 : content_window_(content_window) {} |
14 | 14 |
15 DesktopFocusRules::~DesktopFocusRules() {} | 15 DesktopFocusRules::~DesktopFocusRules() {} |
16 | 16 |
17 bool DesktopFocusRules::SupportsChildActivation(aura::Window* window) const { | 17 bool DesktopFocusRules::SupportsChildActivation(aura::Window* window) const { |
18 // In Desktop-Aura, only the content_window or children of the RootWindow are | 18 // In Desktop-Aura, only the content_window or children of the RootWindow are |
(...skipping 28 matching lines...) Expand all Loading... |
47 // In Desktop-Aura the content_window_'s parent is a dummy window and thus | 47 // In Desktop-Aura the content_window_'s parent is a dummy window and thus |
48 // should never be activated. We should return the content_window_ if it | 48 // should never be activated. We should return the content_window_ if it |
49 // can be activated in this case. | 49 // can be activated in this case. |
50 if (next_activatable_window == content_window_->parent() && | 50 if (next_activatable_window == content_window_->parent() && |
51 CanActivateWindow(content_window_)) | 51 CanActivateWindow(content_window_)) |
52 return content_window_; | 52 return content_window_; |
53 return next_activatable_window; | 53 return next_activatable_window; |
54 } | 54 } |
55 | 55 |
56 } // namespace views | 56 } // namespace views |
OLD | NEW |