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

Unified Diff: mash/wm/property_util.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/property_util.cc
diff --git a/mash/wm/property_util.cc b/mash/wm/property_util.cc
index 5224e3989e14d99bc4db6cdcf7c03ac35036216b..9f5447fd8e318e6e50e62db40d8f12c2531f5953 100644
--- a/mash/wm/property_util.cc
+++ b/mash/wm/property_util.cc
@@ -27,7 +27,7 @@ mus::mojom::ShowState GetWindowShowState(const mus::Window* window) {
window->GetSharedProperty<int32_t>(
mus::mojom::WindowManager::kShowState_Property));
}
- return mus::mojom::SHOW_STATE_RESTORED;
+ return mus::mojom::ShowState::RESTORED;
}
void SetWindowUserSetBounds(mus::Window* window, const gfx::Rect& bounds) {
@@ -68,17 +68,16 @@ mojom::Container GetRequestedContainer(const mus::Window* window) {
return static_cast<mojom::Container>(
window->GetSharedProperty<int32_t>(mojom::kWindowContainer_Property));
}
- return mojom::CONTAINER_USER_WINDOWS;
+ return mojom::Container::USER_WINDOWS;
}
-mus::mojom::ResizeBehavior GetResizeBehavior(const mus::Window* window) {
+int32_t GetResizeBehavior(const mus::Window* window) {
if (window->HasSharedProperty(
mus::mojom::WindowManager::kResizeBehavior_Property)) {
- return static_cast<mus::mojom::ResizeBehavior>(
- window->GetSharedProperty<int32_t>(
- mus::mojom::WindowManager::kResizeBehavior_Property));
+ return window->GetSharedProperty<int32_t>(
+ mus::mojom::WindowManager::kResizeBehavior_Property);
}
- return mus::mojom::RESIZE_BEHAVIOR_NONE;
+ return mus::mojom::kResizeBehaviorNone;
}
void SetRestoreBounds(mus::Window* window, const gfx::Rect& bounds) {
@@ -116,7 +115,7 @@ mus::mojom::WindowType GetWindowType(
mojo::TypeConverter<int32_t, const std::vector<uint8_t>>::Convert(
iter->second));
}
- return mus::mojom::WINDOW_TYPE_POPUP;
+ return mus::mojom::WindowType::POPUP;
}
} // namespace wm

Powered by Google App Engine
This is Rietveld 408576698