Chromium Code Reviews| Index: remoting/jingle_glue/jingle_thread.h |
| diff --git a/remoting/jingle_glue/jingle_thread.h b/remoting/jingle_glue/jingle_thread.h |
| index a7201e1bd0ceb8143cd747e3758c37b5d376dc03..11807b2253da305014b19d6d7f934dbb91590894 100644 |
| --- a/remoting/jingle_glue/jingle_thread.h |
| +++ b/remoting/jingle_glue/jingle_thread.h |
| @@ -1,4 +1,4 @@ |
| -// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| @@ -31,6 +31,22 @@ class TaskPump : public talk_base::MessageHandler, |
| virtual void OnMessage(talk_base::Message* pmsg); |
| }; |
| +class JingleThreadMessageLoop : public MessageLoop { |
|
Wez
2011/07/01 20:33:00
Isn't this really a Jingle-aware MessageLoop, so n
Sergey Ulanov
2011/07/01 21:14:28
It's a MessageLoop that runs tasks on a libjingle
Wez
2011/07/01 21:49:28
OK, understood.
|
| + public: |
| + JingleThreadMessageLoop(talk_base::Thread* thread); |
| + virtual ~JingleThreadMessageLoop(); |
| + |
| + void Initialize(); |
| + |
| + private: |
| + // AutoRunState sets |state_| for this message loop. It needs to be |
| + // created here because we never call Run() or RunAllPending() for |
|
Wez
2011/07/01 20:33:00
nit: It's not being created here, this is just the
Sergey Ulanov
2011/07/01 21:14:28
Moved the comment.
Wez
2011/07/01 21:49:28
Yes, but what I'm suggesting is that since we are
Sergey Ulanov
2011/07/01 22:40:54
Done.
|
| + // the thread. |
| + scoped_ptr<AutoRunState> jingle_message_loop_state_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(JingleThreadMessageLoop); |
| +}; |
| + |
| // TODO(sergeyu): This class should be changed to inherit from Chromiums |
| // base::Thread instead of libjingle's thread. |
| class JingleThread : public talk_base::Thread, |
| @@ -56,9 +72,6 @@ class JingleThread : public talk_base::Thread, |
| TaskPump* task_pump(); |
| private: |
| - class JingleMessageLoop; |
| - class JingleMessagePump; |
| - |
| virtual void OnMessage(talk_base::Message* msg); |
| TaskPump* task_pump_; |