Chromium Code Reviews| 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..3b2fed557135d4c821f7cb707783232fb157c2dc 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,15 @@ 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(); |
| +} |
| +} |
|
kinuko
2016/11/08 11:35:12
nit: // namespace blink
leonhsl(Using Gerrit)
2016/11/08 12:22:39
Done.
|
| + |
| #endif // MojoHelper_h |