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

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

Issue 2702423004: Validate incoming window properties. (Closed)
Patch Set: rebase to tot 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
Index: ui/wm/core/shadow_types.h
diff --git a/ui/wm/core/shadow_types.h b/ui/wm/core/shadow_types.h
index ef22af7adf394e4184149157a9fd2b4edab9ff5a..91ba36dec07a5cd50850e6297f863845403717b1 100644
--- a/ui/wm/core/shadow_types.h
+++ b/ui/wm/core/shadow_types.h
@@ -5,6 +5,7 @@
#ifndef UI_WM_CORE_SHADOW_TYPES_H_
#define UI_WM_CORE_SHADOW_TYPES_H_
+#include "base/callback_forward.h"
#include "ui/aura/window.h"
#include "ui/wm/wm_export.h"
@@ -30,6 +31,10 @@ enum class ShadowElevation {
WM_EXPORT void SetShadowElevation(aura::Window* window,
ShadowElevation elevation);
+// Returns a callback which will return true if the value passed to it is a
+// valid ShadowElevation value.
+WM_EXPORT base::RepeatingCallback<bool(int32_t)> ValidateShadowElevation();
sky 2017/02/23 21:02:25 Similar comment about exposing a function, not a c
Elliot Glaysher 2017/02/23 22:12:43 Done.
+
// A property key describing the drop shadow that should be displayed under the
// window. A null value is interpreted as using the default.
WM_EXPORT extern const aura::WindowProperty<ShadowElevation>* const

Powered by Google App Engine
This is Rietveld 408576698