| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_HOST_PAIRING_REGISTRY_DELEGATE_H_ | 5 #ifndef REMOTING_HOST_PAIRING_REGISTRY_DELEGATE_H_ |
| 6 #define REMOTING_HOST_PAIRING_REGISTRY_DELEGATE_H_ | 6 #define REMOTING_HOST_PAIRING_REGISTRY_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "remoting/protocol/pairing_registry.h" | 11 #include "remoting/protocol/pairing_registry.h" |
| 11 | 12 |
| 12 namespace base { | 13 namespace base { |
| 13 class SingleThreadTaskRunner; | 14 class SingleThreadTaskRunner; |
| 14 } // namespace base | 15 } // namespace base |
| 15 | 16 |
| 16 namespace remoting { | 17 namespace remoting { |
| 17 // Returns a platform-specific pairing registry delegate that will save to | 18 // Returns a platform-specific pairing registry delegate that will save to |
| 18 // permanent storage. Returns nullptr on platforms that don't support pairing. | 19 // permanent storage. Returns nullptr on platforms that don't support pairing. |
| 19 scoped_ptr<protocol::PairingRegistry::Delegate> | 20 std::unique_ptr<protocol::PairingRegistry::Delegate> |
| 20 CreatePairingRegistryDelegate(); | 21 CreatePairingRegistryDelegate(); |
| 21 | 22 |
| 22 // Convenience function which returns a new PairingRegistry, using the delegate | 23 // Convenience function which returns a new PairingRegistry, using the delegate |
| 23 // returned by CreatePairingRegistryDelegate(). The passed |task_runner| is used | 24 // returned by CreatePairingRegistryDelegate(). The passed |task_runner| is used |
| 24 // to run the delegate's methods asynchronously. | 25 // to run the delegate's methods asynchronously. |
| 25 scoped_refptr<protocol::PairingRegistry> CreatePairingRegistry( | 26 scoped_refptr<protocol::PairingRegistry> CreatePairingRegistry( |
| 26 scoped_refptr<base::SingleThreadTaskRunner> task_runner); | 27 scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
| 27 | 28 |
| 28 } // namespace remoting | 29 } // namespace remoting |
| 29 | 30 |
| 30 #endif // REMOTING_HOST_PAIRING_REGISTRY_DELEGATE_H_ | 31 #endif // REMOTING_HOST_PAIRING_REGISTRY_DELEGATE_H_ |
| OLD | NEW |