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

Unified Diff: ui/wm/core/shadow_types.cc

Issue 2702423004: Validate incoming window properties. (Closed)
Patch Set: sky comments 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
« ui/wm/core/shadow_types.h ('K') | « ui/wm/core/shadow_types.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/core/shadow_types.cc
diff --git a/ui/wm/core/shadow_types.cc b/ui/wm/core/shadow_types.cc
index bf08bbec57e5b72081f292049f2ed898906fac4c..4f3e6f9a975bac8d040a43ff358aa664ed43f1d1 100644
--- a/ui/wm/core/shadow_types.cc
+++ b/ui/wm/core/shadow_types.cc
@@ -18,4 +18,12 @@ void SetShadowElevation(aura::Window* window, ShadowElevation elevation) {
window->SetProperty(kShadowElevationKey, elevation);
}
+bool IsValidShadowElevation(int64_t i) {
+ return i == int64_t(ShadowElevation::DEFAULT) ||
+ i == int64_t(ShadowElevation::NONE) ||
+ i == int64_t(ShadowElevation::SMALL) ||
+ i == int64_t(ShadowElevation::MEDIUM) ||
+ i == int64_t(ShadowElevation::LARGE);
+}
+
} // namespace wm
« ui/wm/core/shadow_types.h ('K') | « ui/wm/core/shadow_types.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698