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

Unified Diff: components/exo/display.cc

Issue 2688483003: exo: Refactor ShellSurface and WaylandRemoteShell (Closed)
Patch Set: Revert unnecessary changes Created 3 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 | « 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 e3554d02f4145f7fef009daa4407f62f2b08c820..4216d8af9a2a8c148c081b031a15fa8bdf161880 100644
--- a/components/exo/display.cc
+++ b/components/exo/display.cc
@@ -141,8 +141,9 @@ std::unique_ptr<ShellSurface> Display::CreateShellSurface(Surface* surface) {
}
return base::MakeUnique<ShellSurface>(
- surface, nullptr, gfx::Rect(), true /* activatable */,
- false /* can_minimize */, ash::kShellWindowId_DefaultContainer);
+ surface, nullptr, ShellSurface::BoundsMode::SHELL, gfx::Point(),
+ true /* activatable */, false /* can_minimize */,
+ ash::kShellWindowId_DefaultContainer);
}
std::unique_ptr<ShellSurface> Display::CreatePopupShellSurface(
@@ -162,18 +163,18 @@ std::unique_ptr<ShellSurface> Display::CreatePopupShellSurface(
return nullptr;
}
- // Determine the initial bounds for popup. |position| is relative to the
- // parent's main surface origin and initial bounds are in screen coordinates.
+ // |position| is relative to the parent's main surface origin, and |origin| is
+ // in screen coordinates.
gfx::Point origin = position;
wm::ConvertPointToScreen(
ShellSurface::GetMainSurface(parent->GetWidget()->GetNativeWindow())
->window(),
&origin);
- gfx::Rect initial_bounds(origin, gfx::Size(1, 1));
return base::MakeUnique<ShellSurface>(
- surface, parent, initial_bounds, false /* activatable */,
- false /* can_minimize */, ash::kShellWindowId_DefaultContainer);
+ surface, parent, ShellSurface::BoundsMode::FIXED, origin,
+ false /* activatable */, false /* can_minimize */,
+ ash::kShellWindowId_DefaultContainer);
}
std::unique_ptr<ShellSurface> Display::CreateRemoteShellSurface(
@@ -190,9 +191,9 @@ std::unique_ptr<ShellSurface> Display::CreateRemoteShellSurface(
// 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 */, can_minimize,
- container);
+ return base::MakeUnique<ShellSurface>(
+ surface, nullptr, ShellSurface::BoundsMode::CLIENT, gfx::Point(),
+ 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