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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 } | 213 } |
214 | 214 |
215 ui::wm::WindowType WmWindowMus::GetType() const { | 215 ui::wm::WindowType WmWindowMus::GetType() const { |
216 // If the WindowType was expicitly set, then it means |window_| was created | 216 // If the WindowType was expicitly set, then it means |window_| was created |
217 // by way of WmShellMus::NewWindow() and the type is locally defined. For | 217 // by way of WmShellMus::NewWindow() and the type is locally defined. For |
218 // windows created in other ways, say from the client, then we need to get | 218 // windows created in other ways, say from the client, then we need to get |
219 // the type from |window_| directly. | 219 // the type from |window_| directly. |
220 return is_wm_window_type_set_ ? wm_window_type_ : GetWmWindowType(window_); | 220 return is_wm_window_type_set_ ? wm_window_type_ : GetWmWindowType(window_); |
221 } | 221 } |
222 | 222 |
| 223 int WmWindowMus::GetAppType() const { |
| 224 // TODO: Need support for window property kAppType: http://crbug.com/651206. |
| 225 NOTIMPLEMENTED(); |
| 226 return 0; |
| 227 } |
| 228 |
| 229 void WmWindowMus::SetAppType(int app_type) const { |
| 230 // TODO: Need support for window property kAppType: http://crbug.com/651206. |
| 231 NOTIMPLEMENTED(); |
| 232 } |
| 233 |
223 bool WmWindowMus::IsBubble() { | 234 bool WmWindowMus::IsBubble() { |
224 return GetWindowType(window_) == ui::mojom::WindowType::BUBBLE; | 235 return GetWindowType(window_) == ui::mojom::WindowType::BUBBLE; |
225 } | 236 } |
226 | 237 |
227 ui::Layer* WmWindowMus::GetLayer() { | 238 ui::Layer* WmWindowMus::GetLayer() { |
228 // TODO(sky): this function should be nuked entirely. | 239 // TODO(sky): this function should be nuked entirely. |
229 NOTIMPLEMENTED(); | 240 NOTIMPLEMENTED(); |
230 return widget_ ? widget_->GetLayer() : nullptr; | 241 return widget_ ? widget_->GetLayer() : nullptr; |
231 } | 242 } |
232 | 243 |
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
967 } | 978 } |
968 | 979 |
969 void WmWindowMus::OnTransientChildRemoved(ui::Window* window, | 980 void WmWindowMus::OnTransientChildRemoved(ui::Window* window, |
970 ui::Window* transient) { | 981 ui::Window* transient) { |
971 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, | 982 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, |
972 OnTransientChildRemoved(this, Get(transient))); | 983 OnTransientChildRemoved(this, Get(transient))); |
973 } | 984 } |
974 | 985 |
975 } // namespace mus | 986 } // namespace mus |
976 } // namespace ash | 987 } // namespace ash |
OLD | NEW |