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

Unified Diff: mash/wm/window_layout.cc

Issue 1527183003: Change mojo enums to be scoped enums in the generated C++ bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-binding-equals
Patch Set: Created 4 years, 12 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
Index: mash/wm/window_layout.cc
diff --git a/mash/wm/window_layout.cc b/mash/wm/window_layout.cc
index 1a590f5542f09cedc4274d00d4b58cae1ebef1d4..3cd6807f413896366e813efc5e8e7ebfef13a7b5 100644
--- a/mash/wm/window_layout.cc
+++ b/mash/wm/window_layout.cc
@@ -35,12 +35,12 @@ void WindowLayout::LayoutWindow(mus::Window* window) {
// Transient windows should be opened centered within their parent.
switch (show_state) {
- case mus::mojom::SHOW_STATE_MAXIMIZED:
- case mus::mojom::SHOW_STATE_IMMERSIVE:
- case mus::mojom::SHOW_STATE_PRESENTATION:
+ case mus::mojom::ShowState::MAXIMIZED:
+ case mus::mojom::ShowState::IMMERSIVE:
+ case mus::mojom::ShowState::PRESENTATION:
FitToContainer(window);
break;
- case mus::mojom::SHOW_STATE_RESTORED: {
+ case mus::mojom::ShowState::RESTORED: {
if (!user_set_bounds.IsEmpty()) {
// If the bounds are unchanged, this will do nothing.
window->SetBounds(user_set_bounds);
@@ -48,7 +48,7 @@ void WindowLayout::LayoutWindow(mus::Window* window) {
CenterWindow(window, preferred_size);
}
}
- case mus::mojom::SHOW_STATE_MINIMIZED:
+ case mus::mojom::ShowState::MINIMIZED:
break;
default:
NOTREACHED();
@@ -64,7 +64,7 @@ void WindowLayout::OnWindowSharedPropertyChanged(
// TODO(sky): this feels like the wrong place for this logic. Find a better
// place.
if (name == mus::mojom::WindowManager::kShowState_Property &&
- GetWindowShowState(window) == mus::mojom::SHOW_STATE_MAXIMIZED) {
+ GetWindowShowState(window) == mus::mojom::ShowState::MAXIMIZED) {
SetRestoreBounds(window, window->bounds());
}
LayoutManager::OnWindowSharedPropertyChanged(window, name, old_data,

Powered by Google App Engine
This is Rietveld 408576698