| 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/common/wm/always_on_top_controller.h" | 5 #include "ash/common/wm/always_on_top_controller.h" |
| 6 | 6 |
| 7 #include "ash/common/shell_window_ids.h" | |
| 8 #include "ash/common/wm/workspace/workspace_layout_manager.h" | 7 #include "ash/common/wm/workspace/workspace_layout_manager.h" |
| 9 #include "ash/common/wm_window.h" | 8 #include "ash/common/wm_window.h" |
| 10 #include "ash/common/wm_window_property.h" | 9 #include "ash/common/wm_window_property.h" |
| 10 #include "ash/public/cpp/shell_window_ids.h" |
| 11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
| 12 | 12 |
| 13 namespace ash { | 13 namespace ash { |
| 14 | 14 |
| 15 AlwaysOnTopController::AlwaysOnTopController(WmWindow* viewport) | 15 AlwaysOnTopController::AlwaysOnTopController(WmWindow* viewport) |
| 16 : always_on_top_container_(viewport) { | 16 : always_on_top_container_(viewport) { |
| 17 DCHECK_NE(kShellWindowId_DefaultContainer, viewport->GetShellWindowId()); | 17 DCHECK_NE(kShellWindowId_DefaultContainer, viewport->GetShellWindowId()); |
| 18 always_on_top_container_->SetLayoutManager( | 18 always_on_top_container_->SetLayoutManager( |
| 19 base::MakeUnique<WorkspaceLayoutManager>(viewport)); | 19 base::MakeUnique<WorkspaceLayoutManager>(viewport)); |
| 20 // Container should be empty. | 20 // Container should be empty. |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 } | 68 } |
| 69 | 69 |
| 70 void AlwaysOnTopController::OnWindowDestroying(WmWindow* window) { | 70 void AlwaysOnTopController::OnWindowDestroying(WmWindow* window) { |
| 71 if (window == always_on_top_container_) { | 71 if (window == always_on_top_container_) { |
| 72 always_on_top_container_->RemoveObserver(this); | 72 always_on_top_container_->RemoveObserver(this); |
| 73 always_on_top_container_ = nullptr; | 73 always_on_top_container_ = nullptr; |
| 74 } | 74 } |
| 75 } | 75 } |
| 76 | 76 |
| 77 } // namespace ash | 77 } // namespace ash |
| OLD | NEW |