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/shelf/shelf_item_types.h" | 7 #include "ash/common/shelf/shelf_item_types.h" |
8 #include "ash/common/wm/container_finder.h" | 8 #include "ash/common/wm/container_finder.h" |
9 #include "ash/common/wm/window_positioning_utils.h" | 9 #include "ash/common/wm/window_positioning_utils.h" |
10 #include "ash/common/wm/window_state.h" | 10 #include "ash/common/wm/window_state.h" |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 void WmWindowMus::SetAppType(int app_type) const { | 240 void WmWindowMus::SetAppType(int app_type) const { |
241 // TODO: Need support for window property kAppType: http://crbug.com/651206. | 241 // TODO: Need support for window property kAppType: http://crbug.com/651206. |
242 NOTIMPLEMENTED(); | 242 NOTIMPLEMENTED(); |
243 } | 243 } |
244 | 244 |
245 bool WmWindowMus::IsBubble() { | 245 bool WmWindowMus::IsBubble() { |
246 return GetWindowType(window_) == ui::mojom::WindowType::BUBBLE; | 246 return GetWindowType(window_) == ui::mojom::WindowType::BUBBLE; |
247 } | 247 } |
248 | 248 |
249 ui::Layer* WmWindowMus::GetLayer() { | 249 ui::Layer* WmWindowMus::GetLayer() { |
250 // TODO(sky): this function should be nuked entirely. | 250 // TODO: http://crbug.com/652877. |
251 NOTIMPLEMENTED(); | 251 NOTIMPLEMENTED(); |
252 return widget_ ? widget_->GetLayer() : nullptr; | 252 return widget_ ? widget_->GetLayer() : nullptr; |
253 } | 253 } |
254 | 254 |
| 255 bool WmWindowMus::GetLayerTargetVisibility() { |
| 256 // TODO: http://crbug.com/652877. |
| 257 NOTIMPLEMENTED(); |
| 258 return GetTargetVisibility(); |
| 259 } |
| 260 |
| 261 bool WmWindowMus::GetLayerVisible() { |
| 262 // TODO: http://crbug.com/652877. |
| 263 NOTIMPLEMENTED(); |
| 264 return IsVisible(); |
| 265 } |
| 266 |
255 display::Display WmWindowMus::GetDisplayNearestWindow() { | 267 display::Display WmWindowMus::GetDisplayNearestWindow() { |
256 // TODO(sky): deal with null rwc. | 268 // TODO(sky): deal with null rwc. |
257 return GetRootWindowControllerMus()->GetDisplay(); | 269 return GetRootWindowControllerMus()->GetDisplay(); |
258 } | 270 } |
259 | 271 |
260 bool WmWindowMus::HasNonClientArea() { | 272 bool WmWindowMus::HasNonClientArea() { |
261 return widget_ ? true : false; | 273 return widget_ ? true : false; |
262 } | 274 } |
263 | 275 |
264 int WmWindowMus::GetNonClientComponent(const gfx::Point& location) { | 276 int WmWindowMus::GetNonClientComponent(const gfx::Point& location) { |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 void WmWindowMus::StackChildAbove(WmWindow* child, WmWindow* target) { | 745 void WmWindowMus::StackChildAbove(WmWindow* child, WmWindow* target) { |
734 GetMusWindow(child)->Reorder(GetMusWindow(target), | 746 GetMusWindow(child)->Reorder(GetMusWindow(target), |
735 ui::mojom::OrderDirection::ABOVE); | 747 ui::mojom::OrderDirection::ABOVE); |
736 } | 748 } |
737 | 749 |
738 void WmWindowMus::StackChildBelow(WmWindow* child, WmWindow* target) { | 750 void WmWindowMus::StackChildBelow(WmWindow* child, WmWindow* target) { |
739 GetMusWindow(child)->Reorder(GetMusWindow(target), | 751 GetMusWindow(child)->Reorder(GetMusWindow(target), |
740 ui::mojom::OrderDirection::BELOW); | 752 ui::mojom::OrderDirection::BELOW); |
741 } | 753 } |
742 | 754 |
| 755 void WmWindowMus::SetPinned(bool trusted) { |
| 756 // http://crbug.com/622486. |
| 757 NOTIMPLEMENTED(); |
| 758 } |
| 759 |
743 void WmWindowMus::SetAlwaysOnTop(bool value) { | 760 void WmWindowMus::SetAlwaysOnTop(bool value) { |
744 mus::SetAlwaysOnTop(window_, value); | 761 mus::SetAlwaysOnTop(window_, value); |
745 } | 762 } |
746 | 763 |
747 bool WmWindowMus::IsAlwaysOnTop() const { | 764 bool WmWindowMus::IsAlwaysOnTop() const { |
748 return mus::IsAlwaysOnTop(window_); | 765 return mus::IsAlwaysOnTop(window_); |
749 } | 766 } |
750 | 767 |
751 void WmWindowMus::Hide() { | 768 void WmWindowMus::Hide() { |
752 window_->SetVisible(false); | 769 window_->SetVisible(false); |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1003 } | 1020 } |
1004 | 1021 |
1005 void WmWindowMus::OnTransientChildRemoved(ui::Window* window, | 1022 void WmWindowMus::OnTransientChildRemoved(ui::Window* window, |
1006 ui::Window* transient) { | 1023 ui::Window* transient) { |
1007 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, | 1024 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, |
1008 OnTransientChildRemoved(this, Get(transient))); | 1025 OnTransientChildRemoved(this, Get(transient))); |
1009 } | 1026 } |
1010 | 1027 |
1011 } // namespace mus | 1028 } // namespace mus |
1012 } // namespace ash | 1029 } // namespace ash |
OLD | NEW |