| Index: base/message_loop/message_loop_proxy_impl.h
|
| diff --git a/base/message_loop/message_loop_proxy_impl.h b/base/message_loop/message_loop_proxy_impl.h
|
| index 0fe629f9d140c0244128e49598308a9a48d15366..150c441a7580649ffa6e95456beb955aa61bb038 100644
|
| --- a/base/message_loop/message_loop_proxy_impl.h
|
| +++ b/base/message_loop/message_loop_proxy_impl.h
|
| @@ -21,7 +21,14 @@ class IncomingTaskQueue;
|
| // MessageLoop.
|
| class BASE_EXPORT MessageLoopProxyImpl : public MessageLoopProxy {
|
| public:
|
| - explicit MessageLoopProxyImpl(
|
| + static MessageLoopProxyImpl* Create(
|
| + scoped_refptr<IncomingTaskQueue> incoming_queue);
|
| +
|
| + // Creates a proxy for lazy initialization. This type of MessageLoopProxy
|
| + // is intended to be created for the message loop that is to be initialized
|
| + // lazily (i.e. created by CreateForLazyInit()). See the comment at
|
| + // MessageLoop::CreateForLazyInit() for more details.
|
| + static MessageLoopProxyImpl* CreateForLazyInit(
|
| scoped_refptr<IncomingTaskQueue> incoming_queue);
|
|
|
| // MessageLoopProxy implementation
|
| @@ -33,8 +40,15 @@ class BASE_EXPORT MessageLoopProxyImpl : public MessageLoopProxy {
|
| base::TimeDelta delay) override;
|
| bool RunsTasksOnCurrentThread() const override;
|
|
|
| + // Initialize this message loop proxy on the current thread.
|
| + // It is not valid to call this unless this proxy is created by
|
| + // CreateForLazyInit().
|
| + void LazyInit();
|
| +
|
| private:
|
| friend class RefCountedThreadSafe<MessageLoopProxyImpl>;
|
| + MessageLoopProxyImpl(scoped_refptr<IncomingTaskQueue> incoming_queue,
|
| + bool lazy_init);
|
| ~MessageLoopProxyImpl() override;
|
|
|
| // THe incoming queue receiving all posted tasks.
|
|
|