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

Unified Diff: trunk/src/base/message_loop/message_pump_mac.h

Issue 19737005: Revert 212948 "Made MessagePump a non-thread safe class." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: trunk/src/base/message_loop/message_pump_mac.h
===================================================================
--- trunk/src/base/message_loop/message_pump_mac.h (revision 212951)
+++ trunk/src/base/message_loop/message_pump_mac.h (working copy)
@@ -63,7 +63,6 @@
friend class MessagePumpScopedAutoreleasePool;
public:
MessagePumpCFRunLoopBase();
- virtual ~MessagePumpCFRunLoopBase();
// Subclasses should implement the work they need to do in MessagePump::Run
// in the DoRun method. MessagePumpCFRunLoopBase::Run calls DoRun directly.
@@ -76,6 +75,8 @@
virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) OVERRIDE;
protected:
+ virtual ~MessagePumpCFRunLoopBase();
+
// Accessors for private data members to be used by subclasses.
CFRunLoopRef run_loop() const { return run_loop_; }
int nesting_level() const { return nesting_level_; }
@@ -198,11 +199,13 @@
class MessagePumpCFRunLoop : public MessagePumpCFRunLoopBase {
public:
MessagePumpCFRunLoop();
- virtual ~MessagePumpCFRunLoop();
virtual void DoRun(Delegate* delegate) OVERRIDE;
virtual void Quit() OVERRIDE;
+ protected:
+ virtual ~MessagePumpCFRunLoop();
+
private:
virtual void EnterExitRunLoop(CFRunLoopActivity activity) OVERRIDE;
@@ -217,11 +220,13 @@
class MessagePumpNSRunLoop : public MessagePumpCFRunLoopBase {
public:
BASE_EXPORT MessagePumpNSRunLoop();
- virtual ~MessagePumpNSRunLoop();
virtual void DoRun(Delegate* delegate) OVERRIDE;
virtual void Quit() OVERRIDE;
+ protected:
+ virtual ~MessagePumpNSRunLoop();
+
private:
// A source that doesn't do anything but provide something signalable
// attached to the run loop. This source will be signalled when Quit
@@ -241,7 +246,6 @@
class MessagePumpUIApplication : public MessagePumpCFRunLoopBase {
public:
MessagePumpUIApplication();
- virtual ~MessagePumpUIApplication();
virtual void DoRun(Delegate* delegate) OVERRIDE;
virtual void Quit() OVERRIDE;
@@ -249,6 +253,9 @@
// call |Attach()| to set up a delegate. It is an error to call |Run()|.
virtual void Attach(Delegate* delegate);
+ protected:
+ virtual ~MessagePumpUIApplication();
+
private:
RunLoop* run_loop_;
@@ -260,11 +267,13 @@
class MessagePumpNSApplication : public MessagePumpCFRunLoopBase {
public:
MessagePumpNSApplication();
- virtual ~MessagePumpNSApplication();
virtual void DoRun(Delegate* delegate) OVERRIDE;
virtual void Quit() OVERRIDE;
+ protected:
+ virtual ~MessagePumpNSApplication();
+
private:
// False after Quit is called.
bool keep_running_;
@@ -281,9 +290,10 @@
class MessagePumpCrApplication : public MessagePumpNSApplication {
public:
MessagePumpCrApplication();
- virtual ~MessagePumpCrApplication();
protected:
+ virtual ~MessagePumpCrApplication() {}
+
// Returns nil if NSApp is currently in the middle of calling
// -sendEvent. Requires NSApp implementing CrAppProtocol.
virtual NSAutoreleasePool* CreateAutoreleasePool() OVERRIDE;
« no previous file with comments | « trunk/src/base/message_loop/message_pump_libevent_unittest.cc ('k') | trunk/src/base/message_loop/message_pump_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698