Enable password generation only if sync for passwords is enabled.
[chromium-blink-merge.git] / base / message_pump_wayland.h
blob89c9b8f3b5e15b84a5193da414a32e21bace5388
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_
7 #pragma once
9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_pump_glib.h"
11 #include "base/message_pump_observer.h"
13 namespace base {
15 namespace wayland {
16 union WaylandEvent;
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
22 // from Dispatch.
23 class MessagePumpDispatcher {
24 public:
25 enum DispatchStatus {
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
29 // terminate.
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;
36 protected:
37 virtual ~MessagePumpDispatcher() {}
40 typedef MessagePumpGlib MessagePumpForUI;
42 } // namespace base
44 #endif // BASE_MESSAGE_PUMP_WAYLAND_H_