| 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 "mash/wm/bridge/wm_root_window_controller_mus.h" | 5 #include "mash/wm/bridge/wm_root_window_controller_mus.h" |
| 6 | 6 |
| 7 #include "ash/wm/common/wm_root_window_controller_observer.h" | 7 #include "ash/wm/common/wm_root_window_controller_observer.h" |
| 8 #include "components/mus/public/cpp/window.h" | 8 #include "components/mus/public/cpp/window.h" |
| 9 #include "components/mus/public/cpp/window_property.h" | 9 #include "components/mus/public/cpp/window_property.h" |
| 10 #include "components/mus/public/cpp/window_tree_connection.h" | 10 #include "components/mus/public/cpp/window_tree_connection.h" |
| 11 #include "mash/wm/bridge/wm_globals_mus.h" | 11 #include "mash/wm/bridge/wm_globals_mus.h" |
| 12 #include "mash/wm/bridge/wm_shelf_mus.h" |
| 12 #include "mash/wm/bridge/wm_window_mus.h" | 13 #include "mash/wm/bridge/wm_window_mus.h" |
| 14 #include "mash/wm/container_ids.h" |
| 13 #include "mash/wm/root_window_controller.h" | 15 #include "mash/wm/root_window_controller.h" |
| 14 #include "ui/display/display.h" | 16 #include "ui/display/display.h" |
| 15 #include "ui/views/mus/native_widget_mus.h" | 17 #include "ui/views/mus/native_widget_mus.h" |
| 16 #include "ui/views/widget/widget.h" | 18 #include "ui/views/widget/widget.h" |
| 17 | 19 |
| 18 MUS_DECLARE_WINDOW_PROPERTY_TYPE(mash::wm::WmRootWindowControllerMus*); | 20 MUS_DECLARE_WINDOW_PROPERTY_TYPE(mash::wm::WmRootWindowControllerMus*); |
| 19 | 21 |
| 20 namespace mash { | 22 namespace mash { |
| 21 namespace wm { | 23 namespace wm { |
| 22 | 24 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 gfx::Point result = point; | 69 gfx::Point result = point; |
| 68 result -= GetDisplay().bounds().OffsetFromOrigin(); | 70 result -= GetDisplay().bounds().OffsetFromOrigin(); |
| 69 return target->GetRootWindow()->ConvertPointToTarget(target, result); | 71 return target->GetRootWindow()->ConvertPointToTarget(target, result); |
| 70 } | 72 } |
| 71 | 73 |
| 72 const display::Display& WmRootWindowControllerMus::GetDisplay() const { | 74 const display::Display& WmRootWindowControllerMus::GetDisplay() const { |
| 73 return root_window_controller_->display(); | 75 return root_window_controller_->display(); |
| 74 } | 76 } |
| 75 | 77 |
| 76 bool WmRootWindowControllerMus::HasShelf() { | 78 bool WmRootWindowControllerMus::HasShelf() { |
| 77 NOTIMPLEMENTED(); | 79 return GetShelf() != nullptr; |
| 78 return false; | |
| 79 } | 80 } |
| 80 | 81 |
| 81 ash::wm::WmGlobals* WmRootWindowControllerMus::GetGlobals() { | 82 ash::wm::WmGlobals* WmRootWindowControllerMus::GetGlobals() { |
| 82 return globals_; | 83 return globals_; |
| 83 } | 84 } |
| 84 | 85 |
| 85 ash::wm::WorkspaceWindowState | 86 ash::wm::WorkspaceWindowState |
| 86 WmRootWindowControllerMus::GetWorkspaceWindowState() { | 87 WmRootWindowControllerMus::GetWorkspaceWindowState() { |
| 87 NOTIMPLEMENTED(); | 88 NOTIMPLEMENTED(); |
| 88 return ash::wm::WORKSPACE_WINDOW_STATE_DEFAULT; | 89 return ash::wm::WORKSPACE_WINDOW_STATE_DEFAULT; |
| 89 } | 90 } |
| 90 | 91 |
| 91 ash::AlwaysOnTopController* | 92 ash::AlwaysOnTopController* |
| 92 WmRootWindowControllerMus::GetAlwaysOnTopController() { | 93 WmRootWindowControllerMus::GetAlwaysOnTopController() { |
| 93 NOTIMPLEMENTED(); | 94 return root_window_controller_->always_on_top_controller(); |
| 94 return nullptr; | |
| 95 } | 95 } |
| 96 | 96 |
| 97 ash::wm::WmShelf* WmRootWindowControllerMus::GetShelf() { | 97 ash::wm::WmShelf* WmRootWindowControllerMus::GetShelf() { |
| 98 NOTIMPLEMENTED(); | 98 return root_window_controller_->wm_shelf(); |
| 99 return nullptr; | |
| 100 } | 99 } |
| 101 | 100 |
| 102 ash::wm::WmWindow* WmRootWindowControllerMus::GetWindow() { | 101 ash::wm::WmWindow* WmRootWindowControllerMus::GetWindow() { |
| 103 return WmWindowMus::Get(root_window_controller_->root()); | 102 return WmWindowMus::Get(root_window_controller_->root()); |
| 104 } | 103 } |
| 105 | 104 |
| 106 void WmRootWindowControllerMus::ConfigureWidgetInitParamsForContainer( | 105 void WmRootWindowControllerMus::ConfigureWidgetInitParamsForContainer( |
| 107 views::Widget* widget, | 106 views::Widget* widget, |
| 108 int shell_container_id, | 107 int shell_container_id, |
| 109 views::Widget::InitParams* init_params) { | 108 views::Widget::InitParams* init_params) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 128 observers_.AddObserver(observer); | 127 observers_.AddObserver(observer); |
| 129 } | 128 } |
| 130 | 129 |
| 131 void WmRootWindowControllerMus::RemoveObserver( | 130 void WmRootWindowControllerMus::RemoveObserver( |
| 132 ash::wm::WmRootWindowControllerObserver* observer) { | 131 ash::wm::WmRootWindowControllerObserver* observer) { |
| 133 observers_.RemoveObserver(observer); | 132 observers_.RemoveObserver(observer); |
| 134 } | 133 } |
| 135 | 134 |
| 136 } // namespace wm | 135 } // namespace wm |
| 137 } // namespace mash | 136 } // namespace mash |
| OLD | NEW |