Index: ash/mus/bridge/wm_window_mus.cc |
diff --git a/ash/mus/bridge/wm_window_mus.cc b/ash/mus/bridge/wm_window_mus.cc |
index 0418d4068f557cbe8801f3ac57dfa786223f7687..6cacd227501692b49bc54cd9c0066d5ecc97b77e 100644 |
--- a/ash/mus/bridge/wm_window_mus.cc |
+++ b/ash/mus/bridge/wm_window_mus.cc |
@@ -564,15 +564,19 @@ bool WmWindowMus::HasRestoreBounds() const { |
} |
bool WmWindowMus::CanMaximize() const { |
- return widget_ ? widget_->widget_delegate()->CanMaximize() : false; |
+ return (GetResizeBehavior(window_) & |
+ ::ui::mojom::kResizeBehaviorCanMaximize) != 0; |
} |
bool WmWindowMus::CanMinimize() const { |
- return widget_ ? widget_->widget_delegate()->CanMinimize() : false; |
+ return (GetResizeBehavior(window_) & |
+ ::ui::mojom::kResizeBehaviorCanMinimize) != 0; |
} |
bool WmWindowMus::CanResize() const { |
- return widget_ ? widget_->widget_delegate()->CanResize() : false; |
+ return window_ && |
+ (GetResizeBehavior(window_) & ::ui::mojom::kResizeBehaviorCanResize) != |
+ 0; |
} |
bool WmWindowMus::CanActivate() const { |