| 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 #include "remoting/base/scoped_thread_proxy.h" | 5 #include "remoting/base/scoped_thread_proxy.h" |
| 6 | 6 |
| 7 #include "base/bind.h" |
| 8 |
| 7 namespace remoting { | 9 namespace remoting { |
| 8 | 10 |
| 9 class ScopedThreadProxy::Core : public base::RefCountedThreadSafe<Core> { | 11 class ScopedThreadProxy::Core : public base::RefCountedThreadSafe<Core> { |
| 10 public: | 12 public: |
| 11 Core(base::MessageLoopProxy* message_loop) | 13 Core(base::MessageLoopProxy* message_loop) |
| 12 : message_loop_(message_loop), | 14 : message_loop_(message_loop), |
| 13 canceled_(false) { | 15 canceled_(false) { |
| 14 } | 16 } |
| 15 | 17 |
| 16 void PostTask(const tracked_objects::Location& from_here, | 18 void PostTask(const tracked_objects::Location& from_here, |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 const base::Closure& closure, | 77 const base::Closure& closure, |
| 76 int64 delay_ms) { | 78 int64 delay_ms) { |
| 77 core_->PostDelayedTask(from_here, closure, delay_ms); | 79 core_->PostDelayedTask(from_here, closure, delay_ms); |
| 78 } | 80 } |
| 79 | 81 |
| 80 void ScopedThreadProxy::Detach() { | 82 void ScopedThreadProxy::Detach() { |
| 81 core_->Detach(); | 83 core_->Detach(); |
| 82 } | 84 } |
| 83 | 85 |
| 84 } // namespace remoting | 86 } // namespace remoting |
| OLD | NEW |