Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: base/message_loop/message_pump_dispatcher.h

Issue 1647803004: Move base to DEPS (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/message_loop/message_pump_default.cc ('k') | base/message_loop/message_pump_io_ios.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 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.
4
5 #ifndef BASE_MESSAGE_LOOP_MESSAGE_PUMP_DISPATCHER_H_
6 #define BASE_MESSAGE_LOOP_MESSAGE_PUMP_DISPATCHER_H_
7
8 #include <stdint.h>
9
10 #include "base/base_export.h"
11 #include "base/event_types.h"
12
13 namespace base {
14
15 // Dispatcher is used during a nested invocation of Run to dispatch events when
16 // |RunLoop(dispatcher).Run()| is used. If |RunLoop().Run()| is invoked,
17 // MessageLoop does not dispatch events (or invoke TranslateMessage), rather
18 // every message is passed to Dispatcher's Dispatch method for dispatch. It is
19 // up to the Dispatcher whether or not to dispatch the event.
20 //
21 // The nested loop is exited by either posting a quit, or setting the
22 // POST_DISPATCH_QUIT_LOOP flag on the return value from Dispatch.
23 class BASE_EXPORT MessagePumpDispatcher {
24 public:
25 enum PostDispatchAction {
26 POST_DISPATCH_NONE = 0x0,
27 POST_DISPATCH_QUIT_LOOP = 0x1,
28 POST_DISPATCH_PERFORM_DEFAULT = 0x2,
29 };
30
31 virtual ~MessagePumpDispatcher() {}
32
33 // Dispatches the event. The return value can have more than one
34 // PostDispatchAction flags OR'ed together. If POST_DISPATCH_PERFORM_DEFAULT
35 // is set in the returned value, then the message-pump performs the default
36 // action. If POST_DISPATCH_QUIT_LOOP is set, in the return value, then the
37 // nested loop exits immediately.
38 virtual uint32_t Dispatch(const NativeEvent& event) = 0;
39 };
40
41 } // namespace base
42
43 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_DISPATCHER_H_
OLDNEW
« no previous file with comments | « base/message_loop/message_pump_default.cc ('k') | base/message_loop/message_pump_io_ios.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698