| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "ui/wm/core/transient_window_controller.h" | |
| 6 | |
| 7 #include "ui/wm/core/transient_window_manager.h" | |
| 8 | |
| 9 namespace wm { | |
| 10 | |
| 11 TransientWindowController::TransientWindowController() { | |
| 12 } | |
| 13 | |
| 14 TransientWindowController::~TransientWindowController() { | |
| 15 } | |
| 16 | |
| 17 void TransientWindowController::AddTransientChild(aura::Window* parent, | |
| 18 aura::Window* child) { | |
| 19 TransientWindowManager::Get(parent)->AddTransientChild(child); | |
| 20 } | |
| 21 | |
| 22 void TransientWindowController::RemoveTransientChild(aura::Window* parent, | |
| 23 aura::Window* child) { | |
| 24 TransientWindowManager::Get(parent)->RemoveTransientChild(child); | |
| 25 } | |
| 26 | |
| 27 aura::Window* TransientWindowController::GetTransientParent( | |
| 28 aura::Window* window) { | |
| 29 return const_cast<aura::Window*>(GetTransientParent( | |
| 30 const_cast<const aura::Window*>(window))); | |
| 31 } | |
| 32 | |
| 33 const aura::Window* TransientWindowController::GetTransientParent( | |
| 34 const aura::Window* window) { | |
| 35 const TransientWindowManager* window_manager = | |
| 36 TransientWindowManager::Get(window); | |
| 37 return window_manager ? window_manager->transient_parent() : NULL; | |
| 38 } | |
| 39 | |
| 40 } // namespace wm | |
| OLD | NEW |