Chromium Code Reviews| 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( |
|
rvargas (doing something else)
2015/03/26 02:19:27
return scoped ptr
kinuko
2015/04/13 02:02:59
Removed this ctor.
|
| + 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( |
|
rvargas (doing something else)
2015/03/26 02:19:27
nit: Make this the default (Create) and hint that
kinuko
2015/04/13 02:02:59
Done.
|
| 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(); |
|
rvargas (doing something else)
2015/03/26 02:19:27
Init() ?
kinuko
2015/04/13 02:02:59
Done.
|
| + |
| private: |
| friend class RefCountedThreadSafe<MessageLoopProxyImpl>; |
| + MessageLoopProxyImpl(scoped_refptr<IncomingTaskQueue> incoming_queue, |
| + bool lazy_init); |
| ~MessageLoopProxyImpl() override; |
| // THe incoming queue receiving all posted tasks. |