1 // Copyright (c) 2011 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 BASE_MESSAGE_PUMP_WAYLAND_H_
6 #define BASE_MESSAGE_PUMP_WAYLAND_H_
9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_pump_glib.h"
11 #include "base/message_pump_observer.h"
19 // The documentation for this class is in message_pump_glib.h
21 // The nested loop is exited by either posting a quit, or returning false
23 class MessagePumpDispatcher
{
26 EVENT_IGNORED
, // The event was not processed.
27 EVENT_PROCESSED
, // The event has been processed.
28 EVENT_QUIT
// The event was processed and the message-loop should
32 // Dispatches the event. If true is returned processing continues as
33 // normal. If false is returned, the nested loop exits immediately.
34 virtual DispatchStatus
Dispatch(wayland::WaylandEvent
* event
) = 0;
37 virtual ~MessagePumpDispatcher() {}
40 typedef MessagePumpGlib MessagePumpForUI
;
44 #endif // BASE_MESSAGE_PUMP_WAYLAND_H_