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

Unified Diff: components/exo/display.cc

Issue 2548653005: exo: Add initial support for service side decorations. (Closed)
Patch Set: fix typo 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 | « no previous file | components/exo/pointer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/display.cc
diff --git a/components/exo/display.cc b/components/exo/display.cc
index af2a2ad9f67f83e7e2a9bc233dda5a851059f753..fe97bc8c2446e2c0dc9d3fc0248ac61ce6754c21 100644
--- a/components/exo/display.cc
+++ b/components/exo/display.cc
@@ -113,9 +113,9 @@ std::unique_ptr<ShellSurface> Display::CreateShellSurface(Surface* surface) {
return nullptr;
}
- return base::MakeUnique<ShellSurface>(surface, nullptr, gfx::Rect(),
- true /* activatable */,
- ash::kShellWindowId_DefaultContainer);
+ return base::MakeUnique<ShellSurface>(
+ surface, nullptr, gfx::Rect(), true /* activatable */,
+ false /* can_minimize */, ash::kShellWindowId_DefaultContainer);
}
std::unique_ptr<ShellSurface> Display::CreatePopupShellSurface(
@@ -144,9 +144,9 @@ std::unique_ptr<ShellSurface> Display::CreatePopupShellSurface(
&origin);
gfx::Rect initial_bounds(origin, gfx::Size(1, 1));
- return base::MakeUnique<ShellSurface>(surface, parent, initial_bounds,
- false /* activatable */,
- ash::kShellWindowId_DefaultContainer);
+ return base::MakeUnique<ShellSurface>(
+ surface, parent, initial_bounds, false /* activatable */,
+ false /* can_minimize */, ash::kShellWindowId_DefaultContainer);
}
std::unique_ptr<ShellSurface> Display::CreateRemoteShellSurface(
@@ -160,8 +160,12 @@ std::unique_ptr<ShellSurface> Display::CreateRemoteShellSurface(
return nullptr;
}
+ // Remote shell surfaces in system modal container cannot be minimized.
+ bool can_minimize = container != ash::kShellWindowId_SystemModalContainer;
+
return base::MakeUnique<ShellSurface>(surface, nullptr, gfx::Rect(1, 1),
- true /* activatable */, container);
+ true /* activatable */, can_minimize,
+ container);
}
std::unique_ptr<SubSurface> Display::CreateSubSurface(Surface* surface,
« no previous file with comments | « no previous file | components/exo/pointer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698