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/always_on_top_controller.h" | 5 #include "ash/wm/always_on_top_controller.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 "ui/aura/client/aura_constants.h" | 9 #include "ui/aura/client/aura_constants.h" |
10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
11 | 11 |
12 namespace ash { | 12 namespace ash { |
13 namespace internal { | |
14 | 13 |
15 AlwaysOnTopController::AlwaysOnTopController() | 14 AlwaysOnTopController::AlwaysOnTopController() |
16 : always_on_top_container_(NULL) { | 15 : always_on_top_container_(NULL) { |
17 } | 16 } |
18 | 17 |
19 AlwaysOnTopController::~AlwaysOnTopController() { | 18 AlwaysOnTopController::~AlwaysOnTopController() { |
20 if (always_on_top_container_) | 19 if (always_on_top_container_) |
21 always_on_top_container_->RemoveObserver(this); | 20 always_on_top_container_->RemoveObserver(this); |
22 } | 21 } |
23 | 22 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 if (window->parent() != container) | 60 if (window->parent() != container) |
62 container->AddChild(window); | 61 container->AddChild(window); |
63 } | 62 } |
64 } | 63 } |
65 | 64 |
66 void AlwaysOnTopController::OnWindowDestroyed(aura::Window* window) { | 65 void AlwaysOnTopController::OnWindowDestroyed(aura::Window* window) { |
67 if (window == always_on_top_container_) | 66 if (window == always_on_top_container_) |
68 always_on_top_container_ = NULL; | 67 always_on_top_container_ = NULL; |
69 } | 68 } |
70 | 69 |
71 } // namespace internal | |
72 } // namespace ash | 70 } // namespace ash |
OLD | NEW |