| 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..54c5b8c32a323eaa7a136377a97a98da91274dfd 100644
|
| --- a/ui/wm/core/shadow_types.cc
|
| +++ b/ui/wm/core/shadow_types.cc
|
| @@ -4,12 +4,25 @@
|
|
|
| #include "ui/wm/core/shadow_types.h"
|
|
|
| +#include "base/callback.h"
|
| #include "ui/base/class_property.h"
|
|
|
| DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(WM_EXPORT, ::wm::ShadowElevation);
|
|
|
| namespace wm {
|
|
|
| +namespace {
|
| +
|
| +bool DoValidateShadowElevation(int32_t i) {
|
| + return i == int32_t(ShadowElevation::DEFAULT) ||
|
| + i == int32_t(ShadowElevation::NONE) ||
|
| + i == int32_t(ShadowElevation::SMALL) ||
|
| + i == int32_t(ShadowElevation::MEDIUM) ||
|
| + i == int32_t(ShadowElevation::LARGE);
|
| +}
|
| +
|
| +} // namespace
|
| +
|
| DEFINE_UI_CLASS_PROPERTY_KEY(ShadowElevation,
|
| kShadowElevationKey,
|
| ShadowElevation::DEFAULT);
|
| @@ -18,4 +31,8 @@ void SetShadowElevation(aura::Window* window, ShadowElevation elevation) {
|
| window->SetProperty(kShadowElevationKey, elevation);
|
| }
|
|
|
| +base::RepeatingCallback<bool(int32_t)> ValidateShadowElevation() {
|
| + return base::Bind(&DoValidateShadowElevation);
|
| +}
|
| +
|
| } // namespace wm
|
|
|