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 #include "athena/wm/window_manager_impl.h" | 5 #include "athena/wm/window_manager_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "athena/common/container_priorities.h" | 9 #include "athena/common/container_priorities.h" |
10 #include "athena/screen/public/screen_manager.h" | 10 #include "athena/screen/public/screen_manager.h" |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 // instead of exitting. | 234 // instead of exitting. |
235 if (new_window->type() == ui::wm::WINDOW_TYPE_NORMAL) | 235 if (new_window->type() == ui::wm::WINDOW_TYPE_NORMAL) |
236 SetInOverview(false); | 236 SetInOverview(false); |
237 } | 237 } |
238 | 238 |
239 void WindowManagerImpl::OnWindowDestroying(aura::Window* window) { | 239 void WindowManagerImpl::OnWindowDestroying(aura::Window* window) { |
240 if (window == container_) | 240 if (window == container_) |
241 container_.reset(); | 241 container_.reset(); |
242 } | 242 } |
243 | 243 |
| 244 void WindowManagerImpl::OnWindowStackingChanged(aura::Window* window) { |
| 245 // TODO(skuhne): Use |window_list_provider_->IsValidWindow(window)| instead. |
| 246 if (window->type() == ui::wm::WINDOW_TYPE_NORMAL) { |
| 247 FOR_EACH_OBSERVER(WindowManagerObserver, |
| 248 observers_, |
| 249 OnActivityOrderHasChanged()); |
| 250 } |
| 251 } |
| 252 |
244 bool WindowManagerImpl::IsCommandEnabled(int command_id) const { | 253 bool WindowManagerImpl::IsCommandEnabled(int command_id) const { |
245 return true; | 254 return true; |
246 } | 255 } |
247 | 256 |
248 bool WindowManagerImpl::OnAcceleratorFired(int command_id, | 257 bool WindowManagerImpl::OnAcceleratorFired(int command_id, |
249 const ui::Accelerator& accelerator) { | 258 const ui::Accelerator& accelerator) { |
250 switch (command_id) { | 259 switch (command_id) { |
251 case CMD_TOGGLE_OVERVIEW: | 260 case CMD_TOGGLE_OVERVIEW: |
252 ToggleOverview(); | 261 ToggleOverview(); |
253 break; | 262 break; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 DCHECK(!instance); | 375 DCHECK(!instance); |
367 } | 376 } |
368 | 377 |
369 // static | 378 // static |
370 WindowManager* WindowManager::GetInstance() { | 379 WindowManager* WindowManager::GetInstance() { |
371 DCHECK(instance); | 380 DCHECK(instance); |
372 return instance; | 381 return instance; |
373 } | 382 } |
374 | 383 |
375 } // namespace athena | 384 } // namespace athena |
OLD | NEW |