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

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

Issue 349933004: Revert of Revert "[Mac] Reland r276808 Use a native MessagePump instead of a MessagePumpDefault" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « base/message_loop/message_loop.cc ('k') | jingle/glue/chrome_async_socket_unittest.cc » ('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_LOOP_MESSAGE_PUMP_DEFAULT_H_ 5 #ifndef BASE_MESSAGE_LOOP_MESSAGE_PUMP_DEFAULT_H_
6 #define BASE_MESSAGE_LOOP_MESSAGE_PUMP_DEFAULT_H_ 6 #define BASE_MESSAGE_LOOP_MESSAGE_PUMP_DEFAULT_H_
7 7
8 #include "base/base_export.h"
8 #include "base/message_loop/message_pump.h" 9 #include "base/message_loop/message_pump.h"
9 #include "base/synchronization/waitable_event.h" 10 #include "base/synchronization/waitable_event.h"
10 #include "base/time/time.h" 11 #include "base/time/time.h"
11 12
12 namespace base { 13 namespace base {
13 14
14 class MessagePumpDefault : public MessagePump { 15 class BASE_EXPORT MessagePumpDefault : public MessagePump {
15 public: 16 public:
16 MessagePumpDefault(); 17 MessagePumpDefault();
17 virtual ~MessagePumpDefault(); 18 virtual ~MessagePumpDefault();
18 19
19 // MessagePump methods: 20 // MessagePump methods:
20 virtual void Run(Delegate* delegate) OVERRIDE; 21 virtual void Run(Delegate* delegate) OVERRIDE;
21 virtual void Quit() OVERRIDE; 22 virtual void Quit() OVERRIDE;
22 virtual void ScheduleWork() OVERRIDE; 23 virtual void ScheduleWork() OVERRIDE;
23 virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) OVERRIDE; 24 virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) OVERRIDE;
24 25
25 private: 26 private:
26 // This flag is set to false when Run should return. 27 // This flag is set to false when Run should return.
27 bool keep_running_; 28 bool keep_running_;
28 29
29 // Used to sleep until there is more work to do. 30 // Used to sleep until there is more work to do.
30 WaitableEvent event_; 31 WaitableEvent event_;
31 32
32 // The time at which we should call DoDelayedWork. 33 // The time at which we should call DoDelayedWork.
33 TimeTicks delayed_work_time_; 34 TimeTicks delayed_work_time_;
34 35
35 DISALLOW_COPY_AND_ASSIGN(MessagePumpDefault); 36 DISALLOW_COPY_AND_ASSIGN(MessagePumpDefault);
36 }; 37 };
37 38
38 } // namespace base 39 } // namespace base
39 40
40 #endif // BASE__MESSAGE_LOOPMESSAGE_PUMP_DEFAULT_H_ 41 #endif // BASE__MESSAGE_LOOPMESSAGE_PUMP_DEFAULT_H_
OLDNEW
« no previous file with comments | « base/message_loop/message_loop.cc ('k') | jingle/glue/chrome_async_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698