OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef TOOLS_ANDROID_FORWARDER2_FORWARDER_H_ |
| 6 #define TOOLS_ANDROID_FORWARDER2_FORWARDER_H_ |
| 7 |
| 8 #include "base/compiler_specific.h" |
| 9 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "tools/android/forwarder2/socket.h" |
| 12 #include "tools/android/forwarder2/thread.h" |
| 13 |
| 14 namespace forwarder { |
| 15 |
| 16 class Forwarder : public Thread { |
| 17 public: |
| 18 Forwarder(scoped_ptr<Socket> socket1, scoped_ptr<Socket> socket2); |
| 19 virtual ~Forwarder(); |
| 20 |
| 21 // This object self deletes after running, so one cannot join. |
| 22 // Thread: |
| 23 virtual void Join() OVERRIDE; |
| 24 |
| 25 protected: |
| 26 // Thread: |
| 27 // This object self deletes after running. |
| 28 virtual void Run() OVERRIDE; |
| 29 |
| 30 private: |
| 31 scoped_ptr<Socket> socket1_; |
| 32 scoped_ptr<Socket> socket2_; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(Forwarder); |
| 35 }; |
| 36 |
| 37 } // namespace forwarder |
| 38 |
| 39 #endif // TOOLS_ANDROID_FORWARDER2_FORWARDER_H_ |
OLD | NEW |