| Index: third_party/WebKit/Source/platform/mojo/MojoHelper.h
|
| diff --git a/third_party/WebKit/Source/platform/mojo/MojoHelper.h b/third_party/WebKit/Source/platform/mojo/MojoHelper.h
|
| index 073e84ed9fe05d828ef33a839aefdce7d71df036..8f0f00d2dabc823478b68f84da6cb006c9c7f7e3 100644
|
| --- a/third_party/WebKit/Source/platform/mojo/MojoHelper.h
|
| +++ b/third_party/WebKit/Source/platform/mojo/MojoHelper.h
|
| @@ -5,6 +5,7 @@
|
| #ifndef MojoHelper_h
|
| #define MojoHelper_h
|
|
|
| +#include "base/message_loop/message_loop.h"
|
| #include "mojo/public/cpp/bindings/wtf_array.h"
|
| #include "platform/heap/HeapAllocator.h"
|
| #include <utility>
|
| @@ -26,4 +27,16 @@ struct TypeConverter<WTFArray<T>, blink::HeapVector<E>> {
|
|
|
| } // namespace mojo
|
|
|
| +namespace blink {
|
| +
|
| +// Used to get whether message loop is ready for current thread, to help
|
| +// blink::initialize() determining whether can initialize mojo stuff or not.
|
| +// TODO(leonhsl): http://crbug.com/660274 Remove this API by ensuring
|
| +// a message loop before calling blink::initialize().
|
| +inline bool canInitializeMojo() {
|
| + return base::MessageLoop::current();
|
| +}
|
| +
|
| +} // namespace blink
|
| +
|
| #endif // MojoHelper_h
|
|
|