OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ui/views/corewm/transient_window_controller.h" |
| 6 |
| 7 #include "ui/views/corewm/transient_window_manager.h" |
| 8 |
| 9 namespace views { |
| 10 namespace corewm { |
| 11 |
| 12 TransientWindowController::TransientWindowController() { |
| 13 } |
| 14 |
| 15 TransientWindowController::~TransientWindowController() { |
| 16 } |
| 17 |
| 18 void TransientWindowController::AddTransientChild(aura::Window* parent, |
| 19 aura::Window* child) { |
| 20 TransientWindowManager::Get(parent)->AddTransientChild(child); |
| 21 } |
| 22 |
| 23 void TransientWindowController::RemoveTransientChild(aura::Window* parent, |
| 24 aura::Window* child) { |
| 25 TransientWindowManager::Get(parent)->RemoveTransientChild(child); |
| 26 } |
| 27 |
| 28 aura::Window* TransientWindowController::GetTransientParent( |
| 29 aura::Window* window) { |
| 30 return const_cast<aura::Window*>(GetTransientParent( |
| 31 const_cast<const aura::Window*>(window))); |
| 32 } |
| 33 |
| 34 const aura::Window* TransientWindowController::GetTransientParent( |
| 35 const aura::Window* window) { |
| 36 const TransientWindowManager* window_manager = |
| 37 TransientWindowManager::Get(window); |
| 38 return window_manager ? window_manager->transient_parent() : NULL; |
| 39 } |
| 40 |
| 41 } // namespace corewm |
| 42 } // namespace views |
OLD | NEW |