| 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/mus/bridge/wm_window_mus.h" | 5 #include "ash/mus/bridge/wm_window_mus.h" |
| 6 | 6 |
| 7 #include "ash/common/wm/container_finder.h" | 7 #include "ash/common/wm/container_finder.h" |
| 8 #include "ash/common/wm/window_state.h" | 8 #include "ash/common/wm/window_state.h" |
| 9 #include "ash/common/wm_layout_manager.h" | 9 #include "ash/common/wm_layout_manager.h" |
| 10 #include "ash/common/wm_window_observer.h" | 10 #include "ash/common/wm_window_observer.h" |
| 11 #include "ash/common/wm_window_property.h" | 11 #include "ash/common/wm_window_property.h" |
| 12 #include "ash/mus/bridge/mus_layout_manager_adapter.h" | 12 #include "ash/mus/bridge/mus_layout_manager_adapter.h" |
| 13 #include "ash/mus/bridge/wm_root_window_controller_mus.h" | 13 #include "ash/mus/bridge/wm_root_window_controller_mus.h" |
| 14 #include "ash/mus/bridge/wm_shell_mus.h" | 14 #include "ash/mus/bridge/wm_shell_mus.h" |
| 15 #include "ash/mus/property_util.h" | 15 #include "ash/mus/property_util.h" |
| 16 #include "services/ui/public/cpp/property_type_converters.h" | 16 #include "services/ui/public/cpp/property_type_converters.h" |
| 17 #include "services/ui/public/cpp/window.h" | 17 #include "services/ui/public/cpp/window.h" |
| 18 #include "services/ui/public/cpp/window_property.h" | 18 #include "services/ui/public/cpp/window_property.h" |
| 19 #include "services/ui/public/cpp/window_tree_client.h" | 19 #include "services/ui/public/cpp/window_tree_client.h" |
| 20 #include "services/ui/public/interfaces/window_manager.mojom.h" | 20 #include "services/ui/public/interfaces/window_manager.mojom.h" |
| 21 #include "ui/aura/mus/mus_util.h" | 21 #include "ui/aura/mus/mus_util.h" |
| 22 #include "ui/base/hit_test.h" | 22 #include "ui/base/hit_test.h" |
| 23 #include "ui/display/display.h" | 23 #include "ui/display/display.h" |
| 24 #include "ui/views/view.h" |
| 24 #include "ui/views/widget/widget.h" | 25 #include "ui/views/widget/widget.h" |
| 25 #include "ui/views/widget/widget_delegate.h" | 26 #include "ui/views/widget/widget_delegate.h" |
| 26 | 27 |
| 27 MUS_DECLARE_WINDOW_PROPERTY_TYPE(ash::mus::WmWindowMus*); | 28 MUS_DECLARE_WINDOW_PROPERTY_TYPE(ash::mus::WmWindowMus*); |
| 28 | 29 |
| 29 // TODO(sky): fully implement this. Making DVLOG as too spammy to be useful. | 30 // TODO(sky): fully implement this. Making DVLOG as too spammy to be useful. |
| 30 #undef NOTIMPLEMENTED | 31 #undef NOTIMPLEMENTED |
| 31 #define NOTIMPLEMENTED() DVLOG(1) << "notimplemented" | 32 #define NOTIMPLEMENTED() DVLOG(1) << "notimplemented" |
| 32 | 33 |
| 33 namespace { | 34 namespace { |
| (...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 void WmWindowMus::SetChildrenUseExtendedHitRegion() { | 701 void WmWindowMus::SetChildrenUseExtendedHitRegion() { |
| 701 children_use_extended_hit_region_ = true; | 702 children_use_extended_hit_region_ = true; |
| 702 } | 703 } |
| 703 | 704 |
| 704 void WmWindowMus::SetDescendantsStayInSameRootWindow(bool value) { | 705 void WmWindowMus::SetDescendantsStayInSameRootWindow(bool value) { |
| 705 // TODO: this logic feeds into SetBoundsInScreen(), which is not implemented: | 706 // TODO: this logic feeds into SetBoundsInScreen(), which is not implemented: |
| 706 // http://crbug.com/615552. | 707 // http://crbug.com/615552. |
| 707 NOTIMPLEMENTED(); | 708 NOTIMPLEMENTED(); |
| 708 } | 709 } |
| 709 | 710 |
| 711 std::unique_ptr<views::View> WmWindowMus::CreateViewWithRecreatedLayers() { |
| 712 // TODO: need real implementation, http://crbug.com/629497. |
| 713 std::unique_ptr<views::View> view(new views::View); |
| 714 return view; |
| 715 } |
| 716 |
| 710 void WmWindowMus::AddObserver(WmWindowObserver* observer) { | 717 void WmWindowMus::AddObserver(WmWindowObserver* observer) { |
| 711 observers_.AddObserver(observer); | 718 observers_.AddObserver(observer); |
| 712 } | 719 } |
| 713 | 720 |
| 714 void WmWindowMus::RemoveObserver(WmWindowObserver* observer) { | 721 void WmWindowMus::RemoveObserver(WmWindowObserver* observer) { |
| 715 observers_.RemoveObserver(observer); | 722 observers_.RemoveObserver(observer); |
| 716 } | 723 } |
| 717 | 724 |
| 718 bool WmWindowMus::HasObserver(const WmWindowObserver* observer) const { | 725 bool WmWindowMus::HasObserver(const WmWindowObserver* observer) const { |
| 719 return observers_.HasObserver(observer); | 726 return observers_.HasObserver(observer); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 774 void WmWindowMus::OnWindowDestroying(::ui::Window* window) { | 781 void WmWindowMus::OnWindowDestroying(::ui::Window* window) { |
| 775 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroying(this)); | 782 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroying(this)); |
| 776 } | 783 } |
| 777 | 784 |
| 778 void WmWindowMus::OnWindowDestroyed(::ui::Window* window) { | 785 void WmWindowMus::OnWindowDestroyed(::ui::Window* window) { |
| 779 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroyed(this)); | 786 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroyed(this)); |
| 780 } | 787 } |
| 781 | 788 |
| 782 } // namespace mus | 789 } // namespace mus |
| 783 } // namespace ash | 790 } // namespace ash |
| OLD | NEW |