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

Unified Diff: ash/aura/wm_window_aura.cc

Issue 2542493002: Replace kCanMaximize/Minimize/Resize with kResizeBehavior. (Closed)
Patch Set: Cleanup, fixes, and refinements. Created 4 years 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
Index: ash/aura/wm_window_aura.cc
diff --git a/ash/aura/wm_window_aura.cc b/ash/aura/wm_window_aura.cc
index b252189934ef7417522dd527db52a0bb3830fd59..a64bbe20c702fb3ca0e8722034eee0937c304d57 100644
--- a/ash/aura/wm_window_aura.cc
+++ b/ash/aura/wm_window_aura.cc
@@ -25,6 +25,7 @@
#include "ash/wm/window_state_aura.h"
#include "ash/wm/window_util.h"
#include "base/memory/ptr_util.h"
+#include "services/ui/public/interfaces/window_manager_constants.mojom.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/client/focus_client.h"
#include "ui/aura/client/window_parenting_client.h"
@@ -633,15 +634,18 @@ bool WmWindowAura::HasRestoreBounds() const {
}
bool WmWindowAura::CanMaximize() const {
- return window_->GetProperty(aura::client::kCanMaximizeKey);
+ return window_->GetProperty(aura::client::kResizeBehaviorKey) &
+ ui::mojom::kResizeBehaviorCanMaximize;
}
bool WmWindowAura::CanMinimize() const {
- return window_->GetProperty(aura::client::kCanMinimizeKey);
+ return window_->GetProperty(aura::client::kResizeBehaviorKey) &
+ ui::mojom::kResizeBehaviorCanMinimize;
}
bool WmWindowAura::CanResize() const {
- return window_->GetProperty(aura::client::kCanResizeKey);
+ return window_->GetProperty(aura::client::kResizeBehaviorKey) &
+ ui::mojom::kResizeBehaviorCanResize;
}
bool WmWindowAura::CanActivate() const {

Powered by Google App Engine
This is Rietveld 408576698