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

Unified Diff: components/exo/shell_surface.cc

Issue 2236583002: exo: Prevent maximize/minimize of shell surface in system modal container. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/shell_surface.cc
diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc
index c820038ac88d2363341be014881bbb19c4daffa6..72f11c53c45055919cd6cbcda9f83703788b3c8d 100644
--- a/components/exo/shell_surface.cc
+++ b/components/exo/shell_surface.cc
@@ -652,11 +652,13 @@ bool ShellSurface::CanResize() const {
}
bool ShellSurface::CanMaximize() const {
- return true;
+ // Shell surfaces in system modal container cannot be maximized.
+ return container_ != ash::kShellWindowId_SystemModalContainer;
}
bool ShellSurface::CanMinimize() const {
- return true;
+ // Shell surfaces in system modal container cannot be minimized.
+ return container_ != ash::kShellWindowId_SystemModalContainer;
}
base::string16 ShellSurface::GetWindowTitle() const {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698