OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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 REMOTING_HOST_GNUBBY_CONNECTION_FACTORY_H_ |
| 6 #define REMOTING_HOST_GNUBBY_CONNECTION_FACTORY_H_ |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/single_thread_task_runner.h" |
| 10 |
| 11 namespace base { |
| 12 class SingleThreadTaskRunner; |
| 13 } // namespace base |
| 14 |
| 15 namespace net { |
| 16 class StreamSocket; |
| 17 } // namespace net |
| 18 |
| 19 namespace remoting { |
| 20 |
| 21 class GnubbyAuthHandler; |
| 22 class GnubbyConnection; |
| 23 |
| 24 // An interface used to instantiate GnubbyConnection objects. |
| 25 |
| 26 class GnubbyConnectionFactory { |
| 27 public: |
| 28 GnubbyConnectionFactory(); |
| 29 virtual ~GnubbyConnectionFactory(); |
| 30 |
| 31 // Create a new GnubbyConnection object. |
| 32 virtual GnubbyConnection* Create( |
| 33 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner, |
| 34 GnubbyAuthHandler* auth_handler, |
| 35 int connection_id, |
| 36 net::StreamSocket* socket) = 0; |
| 37 |
| 38 // Get the default GnubbyConnection factory. |
| 39 static GnubbyConnectionFactory* GetDefaultFactory(); |
| 40 |
| 41 private: |
| 42 DISALLOW_COPY_AND_ASSIGN(GnubbyConnectionFactory); |
| 43 }; |
| 44 |
| 45 } // namespace remoting |
| 46 |
| 47 #endif // REMOTING_HOST_GNUBBY_CONNECTION_FACTORY_H_ |
OLD | NEW |