Index: ash/wm/window_util.cc |
diff --git a/ash/wm/window_util.cc b/ash/wm/window_util.cc |
index e34af8362785d40ffae45033ef5be342a0c0de2e..a5c694f8a68a0b5350c5aeaf70dcfbc5a128b0b2 100644 |
--- a/ash/wm/window_util.cc |
+++ b/ash/wm/window_util.cc |
@@ -7,7 +7,9 @@ |
#include <vector> |
#include "ash/ash_constants.h" |
+#include "ash/root_window_controller.h" |
#include "ash/shell.h" |
+#include "ash/shell_window_ids.h" |
#include "ash/wm/activation_controller.h" |
#include "ash/wm/window_properties.h" |
#include "ui/aura/client/activation_client.h" |
@@ -66,6 +68,19 @@ bool CanMaximizeWindow(const aura::Window* window) { |
return window->GetProperty(aura::client::kCanMaximizeKey); |
} |
+bool CanMinimizeWindow(const aura::Window* window) { |
+ internal::RootWindowController* controller = |
+ internal::RootWindowController::ForWindow(window); |
+ if (!controller) |
+ return false; |
+ aura::Window* lockscreen = controller->GetContainer( |
+ internal::kShellWindowId_LockScreenContainersContainer); |
+ if (lockscreen->Contains(window)) |
+ return false; |
+ |
+ return true; |
+} |
+ |
bool CanResizeWindow(const aura::Window* window) { |
return window->GetProperty(aura::client::kCanResizeKey); |
} |