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

Side by Side Diff: base/message_pump_dispatcher.h

Issue 9958152: Consolidate win/x dispatchers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync, addressed comments Created 8 years, 8 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_unittest.cc ('k') | base/message_pump_win.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_PUMP_DISPATCHER_H
6 #define BASE_MESSAGE_PUMP_DISPATCHER_H
7 #pragma once
8
9 #include "base/base_export.h"
10 #include "base/event_types.h"
11
12 namespace base {
13
14 // Dispatcher is used during a nested invocation of Run to dispatch
15 // events when |MessageLoop::RunWithDispatcher| is invoked. If
16 // |MessageLoop::Run| is invoked, MessageLoop does not dispatch events
17 // (or invoke TranslateMessage), rather every message is passed to
18 // Dispatcher's Dispatch method for dispatch. It is up to the
19 // Dispatcher whether or not to dispatch the event.
20 //
21 // The nested loop is exited by either posting a quit, or returning false
22 // from Dispatch.
23 class BASE_EXPORT MessagePumpDispatcher {
24 public:
25 virtual ~MessagePumpDispatcher() {}
26
27 // Dispatches the event. If true is returned processing continues as
28 // normal. If false is returned, the nested loop exits immediately.
29 virtual bool Dispatch(const NativeEvent& event) = 0;
30 };
31
32 } // namespace base
33
34 #endif // BASE_MESSAGE_PUMP_DISPATCHER_H
OLDNEW
« no previous file with comments | « base/message_loop_unittest.cc ('k') | base/message_pump_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698