| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_window.h" | 5 #include "ash/common/wm_window.h" |
| 6 | 6 |
| 7 #include "ash/aura/aura_layout_manager_adapter.h" | 7 #include "ash/aura/aura_layout_manager_adapter.h" |
| 8 #include "ash/aura/wm_shell_aura.h" | 8 #include "ash/aura/wm_shell_aura.h" |
| 9 #include "ash/common/ash_constants.h" | 9 #include "ash/common/ash_constants.h" |
| 10 #include "ash/common/wm/window_state.h" | 10 #include "ash/common/wm/window_state.h" |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 } | 571 } |
| 572 | 572 |
| 573 void WmWindow::StackChildAbove(WmWindow* child, WmWindow* target) { | 573 void WmWindow::StackChildAbove(WmWindow* child, WmWindow* target) { |
| 574 window_->StackChildAbove(GetAuraWindow(child), GetAuraWindow(target)); | 574 window_->StackChildAbove(GetAuraWindow(child), GetAuraWindow(target)); |
| 575 } | 575 } |
| 576 | 576 |
| 577 void WmWindow::StackChildBelow(WmWindow* child, WmWindow* target) { | 577 void WmWindow::StackChildBelow(WmWindow* child, WmWindow* target) { |
| 578 window_->StackChildBelow(GetAuraWindow(child), GetAuraWindow(target)); | 578 window_->StackChildBelow(GetAuraWindow(child), GetAuraWindow(target)); |
| 579 } | 579 } |
| 580 | 580 |
| 581 void WmWindow::SetPinned(bool trusted) { | |
| 582 if (WmShell::Get()->IsRunningInMash()) { | |
| 583 // TODO: fix, see http://crbug.com/622486. With aura-mus pinning may just | |
| 584 // work. | |
| 585 NOTIMPLEMENTED(); | |
| 586 return; | |
| 587 } | |
| 588 wm::PinWindow(window_, trusted); | |
| 589 } | |
| 590 | |
| 591 void WmWindow::SetAlwaysOnTop(bool value) { | 581 void WmWindow::SetAlwaysOnTop(bool value) { |
| 592 window_->SetProperty(aura::client::kAlwaysOnTopKey, value); | 582 window_->SetProperty(aura::client::kAlwaysOnTopKey, value); |
| 593 } | 583 } |
| 594 | 584 |
| 595 bool WmWindow::IsAlwaysOnTop() const { | 585 bool WmWindow::IsAlwaysOnTop() const { |
| 596 return window_->GetProperty(aura::client::kAlwaysOnTopKey); | 586 return window_->GetProperty(aura::client::kAlwaysOnTopKey); |
| 597 } | 587 } |
| 598 | 588 |
| 599 void WmWindow::Hide() { | 589 void WmWindow::Hide() { |
| 600 window_->Hide(); | 590 window_->Hide(); |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 observer.OnTransientChildAdded(this, Get(transient)); | 784 observer.OnTransientChildAdded(this, Get(transient)); |
| 795 } | 785 } |
| 796 | 786 |
| 797 void WmWindow::OnTransientChildRemoved(aura::Window* window, | 787 void WmWindow::OnTransientChildRemoved(aura::Window* window, |
| 798 aura::Window* transient) { | 788 aura::Window* transient) { |
| 799 for (auto& observer : transient_observers_) | 789 for (auto& observer : transient_observers_) |
| 800 observer.OnTransientChildRemoved(this, Get(transient)); | 790 observer.OnTransientChildRemoved(this, Get(transient)); |
| 801 } | 791 } |
| 802 | 792 |
| 803 } // namespace ash | 793 } // namespace ash |
| OLD | NEW |