| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_EVENTS_PLATFORM_PLATFORM_EVENT_DISPATCHER_H_ | 5 #ifndef UI_EVENTS_PLATFORM_PLATFORM_EVENT_DISPATCHER_H_ |
| 6 #define UI_EVENTS_PLATFORM_PLATFORM_EVENT_DISPATCHER_H_ | 6 #define UI_EVENTS_PLATFORM_PLATFORM_EVENT_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "ui/events/events_export.h" | 9 #include "ui/events/events_export.h" |
| 10 #include "ui/events/platform/platform_event_types.h" | 10 #include "ui/events/platform/platform_event_types.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 public: | 25 public: |
| 26 // Returns whether this dispatcher wants to dispatch |event|. | 26 // Returns whether this dispatcher wants to dispatch |event|. |
| 27 virtual bool CanDispatchEvent(const PlatformEvent& event) = 0; | 27 virtual bool CanDispatchEvent(const PlatformEvent& event) = 0; |
| 28 | 28 |
| 29 // Dispatches |event|. If this is not the default dispatcher, then the | 29 // Dispatches |event|. If this is not the default dispatcher, then the |
| 30 // dispatcher can request that the default dispatcher gets a chance to | 30 // dispatcher can request that the default dispatcher gets a chance to |
| 31 // dispatch the event by setting POST_DISPATCH_PERFORM_DEFAULT to the return | 31 // dispatch the event by setting POST_DISPATCH_PERFORM_DEFAULT to the return |
| 32 // value. If the dispatcher has processed the event, and no other dispatcher | 32 // value. If the dispatcher has processed the event, and no other dispatcher |
| 33 // should be allowed to dispatch the event, then the dispatcher should set | 33 // should be allowed to dispatch the event, then the dispatcher should set |
| 34 // POST_DISPATCH_STOP_PROPAGATION flag on the return value. | 34 // POST_DISPATCH_STOP_PROPAGATION flag on the return value. |
| 35 virtual uint32_t DispatchEvent(const PlatformEvent& event) = 0; | 35 virtual PostDispatchAction DispatchEvent(const PlatformEvent& event) = 0; |
| 36 | 36 |
| 37 protected: | 37 protected: |
| 38 virtual ~PlatformEventDispatcher() {} | 38 virtual ~PlatformEventDispatcher() {} |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 } // namespace ui | 41 } // namespace ui |
| 42 | 42 |
| 43 #endif // UI_EVENTS_PLATFORM_PLATFORM_EVENT_DISPATCHER_H_ | 43 #endif // UI_EVENTS_PLATFORM_PLATFORM_EVENT_DISPATCHER_H_ |
| OLD | NEW |