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

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

Issue 2754963002: Update cros network info bubble (Closed)
Patch Set: more clean up 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/wm/core/shadow_types.cc
diff --git a/ui/wm/core/shadow_types.cc b/ui/wm/core/shadow_types.cc
index 3f53d1b40659824c1efee68e2ebbcb59be583a71..fc205e72374b88839da9efcc37f2b84ee6f31e0f 100644
--- a/ui/wm/core/shadow_types.cc
+++ b/ui/wm/core/shadow_types.cc
@@ -19,11 +19,16 @@ void SetShadowElevation(aura::Window* window, ShadowElevation elevation) {
}
bool IsValidShadowElevation(int64_t value) {
- return value == int64_t(ShadowElevation::DEFAULT) ||
- value == int64_t(ShadowElevation::NONE) ||
- value == int64_t(ShadowElevation::SMALL) ||
- value == int64_t(ShadowElevation::MEDIUM) ||
- value == int64_t(ShadowElevation::LARGE);
+ switch (static_cast<ShadowElevation>(value)) {
+ case ShadowElevation::DEFAULT:
+ case ShadowElevation::NONE:
+ case ShadowElevation::TINY:
+ case ShadowElevation::SMALL:
+ case ShadowElevation::MEDIUM:
+ case ShadowElevation::LARGE:
+ return true;
+ }
+ return false;
}
} // namespace wm

Powered by Google App Engine
This is Rietveld 408576698