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

Unified Diff: ui/aura/mus/property_converter.cc

Issue 2778733004: Add WindowPinType property on arua::Window (Closed)
Patch Set: WIP Created 3 years, 9 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: ui/aura/mus/property_converter.cc
diff --git a/ui/aura/mus/property_converter.cc b/ui/aura/mus/property_converter.cc
index c9a4138b3388c92d333a5cdbd3690d8599e6ed9a..e6ae0cc68cd9fd611211f16f6b32cd7645235d8d 100644
--- a/ui/aura/mus/property_converter.cc
+++ b/ui/aura/mus/property_converter.cc
@@ -49,6 +49,12 @@ bool ValidateShowState(int64_t value) {
value == int64_t(ui::mojom::ShowState::FULLSCREEN);
}
+bool ValidateWindowPinType(int64_t value) {
+ return value == int64_t(ui::mojom::WindowPinType::NONE) ||
+ value == int64_t(ui::mojom::WindowPinType::PINNED) ||
+ value == int64_t(ui::mojom::WindowPinType::TRUSTED_PINNED);
+}
+
} // namespace
PropertyConverter::PrimitiveProperty::PrimitiveProperty() {}
@@ -89,6 +95,9 @@ PropertyConverter::PropertyConverter() {
base::Bind(&ValidateShowState));
RegisterProperty(client::kWindowIconKey,
ui::mojom::WindowManager::kWindowIcon_Property);
+ RegisterProperty(client::kWindowPinTypeKey,
+ ui::mojom::WindowManager::kWindowPinType_Property,
+ base::Bind(&ValidateWindowPinType));
RegisterProperty(client::kTitleKey,
ui::mojom::WindowManager::kWindowTitle_Property);
}

Powered by Google App Engine
This is Rietveld 408576698