MD Downloads: prevent search text from overlapping with the cancel search (X)
[chromium-blink-merge.git] / ui / events / platform / platform_event_observer.h
blob37aec638ea529b3316f5e529d8bea6ff3c9c1014
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
3 // found in the LICENSE file.
5 #ifndef UI_EVENTS_PLATFORM_PLATFORM_EVENT_OBSERVER_H_
6 #define UI_EVENTS_PLATFORM_PLATFORM_EVENT_OBSERVER_H_
8 #include "ui/events/events_export.h"
9 #include "ui/events/platform/platform_event_types.h"
11 namespace ui {
13 // PlatformEventObserver can be installed on a PlatformEventSource, and it
14 // receives all events that are dispatched to the dispatchers.
15 class EVENTS_EXPORT PlatformEventObserver {
16 public:
17 // This is called before the dispatcher receives the event.
18 virtual void WillProcessEvent(const PlatformEvent& event) = 0;
20 // This is called after the event has been dispatched to the dispatcher(s).
21 virtual void DidProcessEvent(const PlatformEvent& event) = 0;
23 protected:
24 virtual ~PlatformEventObserver() {}
27 } // namespace ui
29 #endif // UI_EVENTS_PLATFORM_PLATFORM_EVENT_OBSERVER_H_