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

Unified Diff: components/exo/shell_surface.cc

Issue 2237093002: exo: Prevent maximize/minimize of shell surface in system modal container. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
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 63323c44156d76c381d4de6c92596693be7d8cea..53fde45c616be093a537672034fe8a30532a8911 100644
--- a/components/exo/shell_surface.cc
+++ b/components/exo/shell_surface.cc
@@ -651,11 +651,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