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

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

Issue 17078005: Move message_pump to base/message_loop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « base/message_loop/message_pump_default.cc ('k') | base/message_loop/message_pump_glib.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 BASE_MESSAGE_PUMP_DISPATCHER_H 5 #ifndef BASE_MESSAGE_LOOP_MESSAGE_PUMP_DISPATCHER_H
6 #define BASE_MESSAGE_PUMP_DISPATCHER_H 6 #define BASE_MESSAGE_LOOP_MESSAGE_PUMP_DISPATCHER_H
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/event_types.h" 9 #include "base/event_types.h"
10 10
11 namespace base { 11 namespace base {
12 12
13 // Dispatcher is used during a nested invocation of Run to dispatch events when 13 // Dispatcher is used during a nested invocation of Run to dispatch events when
14 // |RunLoop(dispatcher).Run()| is used. If |RunLoop().Run()| is invoked, 14 // |RunLoop(dispatcher).Run()| is used. If |RunLoop().Run()| is invoked,
15 // MessageLoop does not dispatch events (or invoke TranslateMessage), rather 15 // MessageLoop does not dispatch events (or invoke TranslateMessage), rather
16 // every message is passed to Dispatcher's Dispatch method for dispatch. It is 16 // every message is passed to Dispatcher's Dispatch method for dispatch. It is
17 // up to the Dispatcher whether or not to dispatch the event. 17 // up to the Dispatcher whether or not to dispatch the event.
18 // 18 //
19 // The nested loop is exited by either posting a quit, or returning false 19 // The nested loop is exited by either posting a quit, or returning false
20 // from Dispatch. 20 // from Dispatch.
21 class BASE_EXPORT MessagePumpDispatcher { 21 class BASE_EXPORT MessagePumpDispatcher {
22 public: 22 public:
23 virtual ~MessagePumpDispatcher() {} 23 virtual ~MessagePumpDispatcher() {}
24 24
25 // Dispatches the event. If true is returned processing continues as 25 // Dispatches the event. If true is returned processing continues as
26 // normal. If false is returned, the nested loop exits immediately. 26 // normal. If false is returned, the nested loop exits immediately.
27 virtual bool Dispatch(const NativeEvent& event) = 0; 27 virtual bool Dispatch(const NativeEvent& event) = 0;
28 }; 28 };
29 29
30 } // namespace base 30 } // namespace base
31 31
32 #endif // BASE_MESSAGE_PUMP_DISPATCHER_H 32 #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_glib.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698