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

Unified Diff: base/message_loop.h

Issue 7583053: Add MessageLoopProxy::current (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No need for MessageLoopProxy destruction observer. Created 9 years, 4 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
« no previous file with comments | « base/files/file_path_watcher_win.cc ('k') | base/message_loop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop.h
diff --git a/base/message_loop.h b/base/message_loop.h
index 9355ec957b0d856fb344202ec20401f5a0b3ecfb..976c5cebca1c4aa153f0d223e121abc8ad2ed3fa 100644
--- a/base/message_loop.h
+++ b/base/message_loop.h
@@ -13,6 +13,7 @@
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/memory/ref_counted.h"
+#include "base/message_loop_proxy.h"
#include "base/message_pump.h"
#include "base/observer_list.h"
#include "base/synchronization/lock.h"
@@ -271,6 +272,11 @@ class BASE_EXPORT MessageLoop : public base::MessagePump::Delegate {
}
const std::string& thread_name() const { return thread_name_; }
+ // Gets the message loop proxy associated with this message loop proxy
+ scoped_refptr<base::MessageLoopProxy> message_loop_proxy() {
+ return message_loop_proxy_.get();
+ }
+
// Enables or disables the recursive task processing. This happens in the case
// of recursive message loops. Some unwanted message loop may occurs when
// using common controls or printer functions. By default, recursive task
@@ -573,6 +579,9 @@ class BASE_EXPORT MessageLoop : public base::MessagePump::Delegate {
ObserverList<TaskObserver> task_observers_;
+ // The message loop proxy associated with this message loop, if one exists.
+ scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
+
private:
DISALLOW_COPY_AND_ASSIGN(MessageLoop);
};
« no previous file with comments | « base/files/file_path_watcher_win.cc ('k') | base/message_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698