| 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 "ash/wm/ash_focus_rules.h" | 5 #include "ash/wm/ash_focus_rules.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
| 9 #include "ash/wm/window_state.h" | 9 #include "ash/wm/window_state.h" |
| 10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 //////////////////////////////////////////////////////////////////////////////// | 48 //////////////////////////////////////////////////////////////////////////////// |
| 49 // AshFocusRules, public: | 49 // AshFocusRules, public: |
| 50 | 50 |
| 51 AshFocusRules::AshFocusRules() { | 51 AshFocusRules::AshFocusRules() { |
| 52 } | 52 } |
| 53 | 53 |
| 54 AshFocusRules::~AshFocusRules() { | 54 AshFocusRules::~AshFocusRules() { |
| 55 } | 55 } |
| 56 | 56 |
| 57 //////////////////////////////////////////////////////////////////////////////// | 57 //////////////////////////////////////////////////////////////////////////////// |
| 58 // AshFocusRules, views::corewm::FocusRules: | 58 // AshFocusRules, ::wm::FocusRules: |
| 59 | 59 |
| 60 bool AshFocusRules::SupportsChildActivation(aura::Window* window) const { | 60 bool AshFocusRules::SupportsChildActivation(aura::Window* window) const { |
| 61 if (window->id() == internal::kShellWindowId_DefaultContainer) | 61 if (window->id() == internal::kShellWindowId_DefaultContainer) |
| 62 return true; | 62 return true; |
| 63 | 63 |
| 64 for (size_t i = 0; i < arraysize(kWindowContainerIds); i++) { | 64 for (size_t i = 0; i < arraysize(kWindowContainerIds); i++) { |
| 65 if (window->id() == kWindowContainerIds[i]) | 65 if (window->id() == kWindowContainerIds[i]) |
| 66 return true; | 66 return true; |
| 67 } | 67 } |
| 68 return false; | 68 return false; |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 if (*i != ignore && | 159 if (*i != ignore && |
| 160 window_state->CanActivate() && | 160 window_state->CanActivate() && |
| 161 !window_state->IsMinimized()) | 161 !window_state->IsMinimized()) |
| 162 return *i; | 162 return *i; |
| 163 } | 163 } |
| 164 return NULL; | 164 return NULL; |
| 165 } | 165 } |
| 166 | 166 |
| 167 } // namespace wm | 167 } // namespace wm |
| 168 } // namespace ash | 168 } // namespace ash |
| OLD | NEW |