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

Unified Diff: ash/aura/wm_window_aura.cc

Issue 2542493002: Replace kCanMaximize/Minimize/Resize with kResizeBehavior. (Closed)
Patch Set: Fix int->bool compile issue. 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
« no previous file with comments | « ash/accelerators/accelerator_controller_unittest.cc ('k') | ash/common/wm/window_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ce8d0e5491dd3ec4a3c631a252a25e6a1d58907d 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) != 0;
}
bool WmWindowAura::CanMinimize() const {
- return window_->GetProperty(aura::client::kCanMinimizeKey);
+ return (window_->GetProperty(aura::client::kResizeBehaviorKey) &
+ ui::mojom::kResizeBehaviorCanMinimize) != 0;
}
bool WmWindowAura::CanResize() const {
- return window_->GetProperty(aura::client::kCanResizeKey);
+ return (window_->GetProperty(aura::client::kResizeBehaviorKey) &
+ ui::mojom::kResizeBehaviorCanResize) != 0;
}
bool WmWindowAura::CanActivate() const {
« no previous file with comments | « ash/accelerators/accelerator_controller_unittest.cc ('k') | ash/common/wm/window_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698