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

Unified Diff: ash/wm/window_util.cc

Issue 12220026: ash: Do not allow minimizing windows in login screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add-test Created 7 years, 10 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/wm/window_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « ash/wm/window_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698