[Android] Implement 3-way sensor fallback for Device Orientation.
[chromium-blink-merge.git] / ui / wm / core / transient_window_controller.cc
blobbb1945c09b2e89e75fe20f54ba3e618cfe39f034
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.
5 #include "ui/wm/core/transient_window_controller.h"
7 #include "ui/wm/core/transient_window_manager.h"
9 namespace wm {
11 TransientWindowController::TransientWindowController() {
14 TransientWindowController::~TransientWindowController() {
17 void TransientWindowController::AddTransientChild(aura::Window* parent,
18 aura::Window* child) {
19 TransientWindowManager::Get(parent)->AddTransientChild(child);
22 void TransientWindowController::RemoveTransientChild(aura::Window* parent,
23 aura::Window* child) {
24 TransientWindowManager::Get(parent)->RemoveTransientChild(child);
27 aura::Window* TransientWindowController::GetTransientParent(
28 aura::Window* window) {
29 return const_cast<aura::Window*>(GetTransientParent(
30 const_cast<const aura::Window*>(window)));
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;
40 } // namespace wm