| 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_transient_window_observer.h" | 10 #include "ash/common/wm_transient_window_observer.h" |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 | 265 |
| 266 gfx::Rect WmWindowMus::ConvertRectToScreen(const gfx::Rect& rect) const { | 266 gfx::Rect WmWindowMus::ConvertRectToScreen(const gfx::Rect& rect) const { |
| 267 return gfx::Rect(ConvertPointToScreen(rect.origin()), rect.size()); | 267 return gfx::Rect(ConvertPointToScreen(rect.origin()), rect.size()); |
| 268 } | 268 } |
| 269 | 269 |
| 270 gfx::Rect WmWindowMus::ConvertRectFromScreen(const gfx::Rect& rect) const { | 270 gfx::Rect WmWindowMus::ConvertRectFromScreen(const gfx::Rect& rect) const { |
| 271 return gfx::Rect(ConvertPointFromScreen(rect.origin()), rect.size()); | 271 return gfx::Rect(ConvertPointFromScreen(rect.origin()), rect.size()); |
| 272 } | 272 } |
| 273 | 273 |
| 274 gfx::Size WmWindowMus::GetMinimumSize() const { | 274 gfx::Size WmWindowMus::GetMinimumSize() const { |
| 275 return widget_ ? widget_->GetMinimumSize() : gfx::Size(); | 275 return widget_ && !use_empty_minimum_size_for_testing_ |
| 276 ? widget_->GetMinimumSize() |
| 277 : gfx::Size(); |
| 276 } | 278 } |
| 277 | 279 |
| 278 gfx::Size WmWindowMus::GetMaximumSize() const { | 280 gfx::Size WmWindowMus::GetMaximumSize() const { |
| 279 return widget_ ? widget_->GetMaximumSize() : gfx::Size(); | 281 return widget_ ? widget_->GetMaximumSize() : gfx::Size(); |
| 280 } | 282 } |
| 281 | 283 |
| 282 bool WmWindowMus::GetTargetVisibility() const { | 284 bool WmWindowMus::GetTargetVisibility() const { |
| 283 // TODO: need animation support: http://crbug.com/615087. | 285 // TODO: need animation support: http://crbug.com/615087. |
| 284 NOTIMPLEMENTED(); | 286 NOTIMPLEMENTED(); |
| 285 return window_->visible(); | 287 return window_->visible(); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 NOTREACHED(); | 351 NOTREACHED(); |
| 350 return 0; | 352 return 0; |
| 351 } | 353 } |
| 352 | 354 |
| 353 void WmWindowMus::SetIntProperty(WmWindowProperty key, int value) { | 355 void WmWindowMus::SetIntProperty(WmWindowProperty key, int value) { |
| 354 if (key == WmWindowProperty::SHELF_ID) { | 356 if (key == WmWindowProperty::SHELF_ID) { |
| 355 NOTIMPLEMENTED(); | 357 NOTIMPLEMENTED(); |
| 356 return; | 358 return; |
| 357 } | 359 } |
| 358 | 360 |
| 361 if (key == WmWindowProperty::TOP_VIEW_INSET) { |
| 362 // TODO: need support for TOP_VIEW_INSET: http://crbug.com/615100. |
| 363 NOTIMPLEMENTED(); |
| 364 return; |
| 365 } |
| 366 |
| 359 NOTREACHED(); | 367 NOTREACHED(); |
| 360 } | 368 } |
| 361 | 369 |
| 362 ShelfItemDetails* WmWindowMus::GetShelfItemDetails() { | 370 ShelfItemDetails* WmWindowMus::GetShelfItemDetails() { |
| 363 NOTIMPLEMENTED(); // TODO: Add support; see crbug.com/634150 | 371 NOTIMPLEMENTED(); // TODO: Add support; see crbug.com/634150 |
| 364 return nullptr; | 372 return nullptr; |
| 365 } | 373 } |
| 366 | 374 |
| 367 void WmWindowMus::SetShelfItemDetails(const ShelfItemDetails& details) { | 375 void WmWindowMus::SetShelfItemDetails(const ShelfItemDetails& details) { |
| 368 NOTIMPLEMENTED(); // TODO: Add support; see crbug.com/634150 | 376 NOTIMPLEMENTED(); // TODO: Add support; see crbug.com/634150 |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 864 } | 872 } |
| 865 | 873 |
| 866 void WmWindowMus::OnTransientChildRemoved(ui::Window* window, | 874 void WmWindowMus::OnTransientChildRemoved(ui::Window* window, |
| 867 ui::Window* transient) { | 875 ui::Window* transient) { |
| 868 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, | 876 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, |
| 869 OnTransientChildRemoved(this, Get(transient))); | 877 OnTransientChildRemoved(this, Get(transient))); |
| 870 } | 878 } |
| 871 | 879 |
| 872 } // namespace mus | 880 } // namespace mus |
| 873 } // namespace ash | 881 } // namespace ash |
| OLD | NEW |