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

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

Issue 2778733004: Add WindowPinType property on arua::Window (Closed)
Patch Set: Address review issues. 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
« no previous file with comments | « ui/aura/client/aura_constants.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
sky 2017/03/31 04:40:26 When you move the classes out of views you'll need
Peng 2017/03/31 18:09:22 Done.
+ base::Bind(&ValidateWindowPinType));
RegisterProperty(client::kTitleKey,
ui::mojom::WindowManager::kWindowTitle_Property);
}
« no previous file with comments | « ui/aura/client/aura_constants.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698