Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(374)

Unified Diff: ash/mus/bridge/wm_window_mus.cc

Issue 2203003003: Get AcceleratorControllerTest working with mash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/mus/bridge/wm_shell_mus_test_api.h ('k') | ash/mus/property_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « ash/mus/bridge/wm_shell_mus_test_api.h ('k') | ash/mus/property_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698