Chromium Code Reviews| Index: ui/events/platform/platform_event_dispatcher.h |
| diff --git a/ui/events/platform/platform_event_dispatcher.h b/ui/events/platform/platform_event_dispatcher.h |
| index bda035d8f0f64f337d10d3fcf846afb62e0325a7..4a1706f26ed5ca802817ce8685f737e7e04334bf 100644 |
| --- a/ui/events/platform/platform_event_dispatcher.h |
| +++ b/ui/events/platform/platform_event_dispatcher.h |
| @@ -13,11 +13,10 @@ namespace ui { |
| // See documentation for |PlatformEventDispatcher::DispatchEvent()| for |
| // explanation of the meaning of the flags. |
| -enum PostDispatchAction { |
| - POST_DISPATCH_NONE = 0x0, |
|
sky
2014/10/20 20:58:37
I prefer the enum. It's more typical of how we do
|
| - POST_DISPATCH_PERFORM_DEFAULT = 0x1, |
| - POST_DISPATCH_STOP_PROPAGATION = 0x2, |
| -}; |
| +typedef uint32_t PostDispatchAction; |
| +const PostDispatchAction kPostDispatchNone = 0; |
| +const PostDispatchAction kPostDispatchPerformDefault = 1 << 0; |
| +const PostDispatchAction kPostDispatchStopPropagation = 1 << 1; |
| // PlatformEventDispatcher receives events from a PlatformEventSource and |
| // dispatches them. |
| @@ -28,11 +27,11 @@ class EVENTS_EXPORT PlatformEventDispatcher { |
| // Dispatches |event|. If this is not the default dispatcher, then the |
| // dispatcher can request that the default dispatcher gets a chance to |
| - // dispatch the event by setting POST_DISPATCH_PERFORM_DEFAULT to the return |
| + // dispatch the event by setting kPostDispatchPerformDefault to the return |
| // value. If the dispatcher has processed the event, and no other dispatcher |
| // should be allowed to dispatch the event, then the dispatcher should set |
| - // POST_DISPATCH_STOP_PROPAGATION flag on the return value. |
| - virtual uint32_t DispatchEvent(const PlatformEvent& event) = 0; |
| + // kPostDispatchStopPropagation flag on the return value. |
| + virtual PostDispatchAction DispatchEvent(const PlatformEvent& event) = 0; |
| protected: |
| virtual ~PlatformEventDispatcher() {} |