Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / mojo / common / message_pump_mojo.h
index 7b2c170..8b71316 100644 (file)
@@ -29,6 +29,11 @@ class MOJO_COMMON_EXPORT MessagePumpMojo : public base::MessagePump {
   // using |base::Bind()|).
   static scoped_ptr<base::MessagePump> Create();
 
+  // Returns the MessagePumpMojo instance of the current thread, if it exists.
+  static MessagePumpMojo* current();
+
+  static bool IsCurrent() { return !!current(); }
+
   // Registers a MessagePumpMojoHandler for the specified handle. Only one
   // handler can be registered for a specified handle.
   // NOTE: a value of 0 for |deadline| indicates an indefinite timeout.