| 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/aura/wm_window_aura.h" | 5 #include "ash/aura/wm_window_aura.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_root_window_controller_aura.h" | 8 #include "ash/aura/wm_root_window_controller_aura.h" |
| 9 #include "ash/aura/wm_shell_aura.h" | 9 #include "ash/aura/wm_shell_aura.h" |
| 10 #include "ash/common/ash_constants.h" | 10 #include "ash/common/ash_constants.h" |
| (...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 683 mouse_extend.Scale(kResizeOutsideBoundsScaleForTouch); | 683 mouse_extend.Scale(kResizeOutsideBoundsScaleForTouch); |
| 684 window_->SetEventTargeter(base::WrapUnique( | 684 window_->SetEventTargeter(base::WrapUnique( |
| 685 new ::wm::EasyResizeWindowTargeter(window_, mouse_extend, touch_extend))); | 685 new ::wm::EasyResizeWindowTargeter(window_, mouse_extend, touch_extend))); |
| 686 } | 686 } |
| 687 | 687 |
| 688 void WmWindowAura::SetDescendantsStayInSameRootWindow(bool value) { | 688 void WmWindowAura::SetDescendantsStayInSameRootWindow(bool value) { |
| 689 window_->SetProperty(kStayInSameRootWindowKey, true); | 689 window_->SetProperty(kStayInSameRootWindowKey, true); |
| 690 } | 690 } |
| 691 | 691 |
| 692 std::unique_ptr<views::View> WmWindowAura::CreateViewWithRecreatedLayers() { | 692 std::unique_ptr<views::View> WmWindowAura::CreateViewWithRecreatedLayers() { |
| 693 std::unique_ptr<wm::WindowMirrorView> view(new wm::WindowMirrorView(this)); | 693 return base::WrapUnique(new wm::WindowMirrorView(this)); |
| 694 view->Init(); | |
| 695 return std::move(view); | |
| 696 } | 694 } |
| 697 | 695 |
| 698 void WmWindowAura::AddObserver(WmWindowObserver* observer) { | 696 void WmWindowAura::AddObserver(WmWindowObserver* observer) { |
| 699 observers_.AddObserver(observer); | 697 observers_.AddObserver(observer); |
| 700 } | 698 } |
| 701 | 699 |
| 702 void WmWindowAura::RemoveObserver(WmWindowObserver* observer) { | 700 void WmWindowAura::RemoveObserver(WmWindowObserver* observer) { |
| 703 observers_.RemoveObserver(observer); | 701 observers_.RemoveObserver(observer); |
| 704 } | 702 } |
| 705 | 703 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 OnTransientChildAdded(this, Get(transient))); | 822 OnTransientChildAdded(this, Get(transient))); |
| 825 } | 823 } |
| 826 | 824 |
| 827 void WmWindowAura::OnTransientChildRemoved(aura::Window* window, | 825 void WmWindowAura::OnTransientChildRemoved(aura::Window* window, |
| 828 aura::Window* transient) { | 826 aura::Window* transient) { |
| 829 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, | 827 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, |
| 830 OnTransientChildRemoved(this, Get(transient))); | 828 OnTransientChildRemoved(this, Get(transient))); |
| 831 } | 829 } |
| 832 | 830 |
| 833 } // namespace ash | 831 } // namespace ash |
| OLD | NEW |