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

Unified Diff: cc/layers/event_listener_properties.h

Issue 1577263004: Communicate whether passive event listeners exist to cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_wheel_passive_listeners
Patch Set: Fix Android/ChromeOS build problems with bit packed enum class Created 4 years, 11 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: cc/layers/event_listener_properties.h
diff --git a/cc/layers/event_listener_properties.h b/cc/layers/event_listener_properties.h
new file mode 100644
index 0000000000000000000000000000000000000000..a80a180b847c2bf980e352370229f12ea7482ea1
--- /dev/null
+++ b/cc/layers/event_listener_properties.h
@@ -0,0 +1,41 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_LAYERS_EVENT_LISTENER_PROPERTIES_H_
+#define CC_LAYERS_EVENT_LISTENER_PROPERTIES_H_
+
+namespace cc {
+
+enum class EventListenerProperties : uint8_t {
+ NONE = 0x0,
+ BLOCKING = 0x1,
+ PASSIVE = 0x2,
+ MAX = PASSIVE | BLOCKING
+};
+
+inline EventListenerProperties operator&(EventListenerProperties a,
+ EventListenerProperties b) {
+ return EventListenerProperties(static_cast<uint8_t>(a) &
+ static_cast<uint8_t>(b));
+}
+
+inline EventListenerProperties& operator&=(EventListenerProperties& a,
+ EventListenerProperties b) {
+ return a = a & b;
+}
+
+inline EventListenerProperties operator|(EventListenerProperties a,
+ EventListenerProperties b) {
+ return EventListenerProperties(static_cast<uint8_t>(a) |
+ static_cast<uint8_t>(b));
+}
+
+inline EventListenerProperties& operator|=(EventListenerProperties& a,
+ EventListenerProperties b) {
+ return a = a | b;
+}
+
+} // namespace cc
+
+#endif // CC_LAYERS_EVENT_LISTENER_PROPERTIES_H_
« no previous file with comments | « cc/debug/debug_rect_history.cc ('k') | cc/layers/layer.h » ('j') | cc/layers/layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698