| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef REMOTING_BASE_SCOPED_THREAD_PROXY_H_ | 5 #ifndef REMOTING_BASE_SCOPED_THREAD_PROXY_H_ |
| 6 #define REMOTING_BASE_SCOPED_THREAD_PROXY_H_ | 6 #define REMOTING_BASE_SCOPED_THREAD_PROXY_H_ |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/callback_forward.h" |
| 9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
| 10 | 10 |
| 11 namespace remoting { | 11 namespace remoting { |
| 12 | 12 |
| 13 // ScopedThreadProxy is proxy for message loops that cancels all | 13 // ScopedThreadProxy is proxy for message loops that cancels all |
| 14 // pending tasks when it is destroyed. It can be used to post tasks | 14 // pending tasks when it is destroyed. It can be used to post tasks |
| 15 // for a non-refcounted object. Must be deleted on the thread it | 15 // for a non-refcounted object. Must be deleted on the thread it |
| 16 // belongs to. | 16 // belongs to. |
| 17 // | 17 // |
| 18 // The main difference from WeakPtr<> and ScopedRunnableMethodFactory<> | 18 // The main difference from WeakPtr<> and ScopedRunnableMethodFactory<> |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 class Core; | 64 class Core; |
| 65 | 65 |
| 66 scoped_refptr<Core> core_; | 66 scoped_refptr<Core> core_; |
| 67 | 67 |
| 68 DISALLOW_COPY_AND_ASSIGN(ScopedThreadProxy); | 68 DISALLOW_COPY_AND_ASSIGN(ScopedThreadProxy); |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 } // namespace remoting | 71 } // namespace remoting |
| 72 | 72 |
| 73 #endif // REMOTING_BASE_SCOPED_THREAD_PROXY_H_ | 73 #endif // REMOTING_BASE_SCOPED_THREAD_PROXY_H_ |
| OLD | NEW |