| Index: remoting/test/fake_network_manager.h
|
| diff --git a/remoting/test/fake_network_manager.h b/remoting/test/fake_network_manager.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..cc74569f6d08c2ccd2a160a5c25c9c872cc0dbf3
|
| --- /dev/null
|
| +++ b/remoting/test/fake_network_manager.h
|
| @@ -0,0 +1,37 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef REMOTING_TEST_FAKE_NETWORK_MANAGER_H_
|
| +#define REMOTING_TEST_FAKE_NETWORK_MANAGER_H_
|
| +
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "base/memory/weak_ptr.h"
|
| +#include "third_party/libjingle/source/talk/base/network.h"
|
| +
|
| +namespace remoting {
|
| +
|
| +// FakeNetworkManager always returns one interface with the IP address
|
| +// specified in the constructor.
|
| +class FakeNetworkManager : public talk_base::NetworkManager {
|
| + public:
|
| + FakeNetworkManager(const talk_base::IPAddress& address);
|
| + virtual ~FakeNetworkManager();
|
| +
|
| + // talk_base::NetworkManager interface.
|
| + virtual void StartUpdating() OVERRIDE;
|
| + virtual void StopUpdating() OVERRIDE;
|
| + virtual void GetNetworks(NetworkList* networks) const OVERRIDE;
|
| +
|
| + protected:
|
| + void SendNetworksChangedSignal();
|
| +
|
| + bool started_;
|
| + scoped_ptr<talk_base::Network> network_;
|
| +
|
| + base::WeakPtrFactory<FakeNetworkManager> weak_factory_;
|
| +};
|
| +
|
| +} // namespace remoting
|
| +
|
| +#endif // REMOTING_TEST_FAKE_NETWORK_MANAGER_H_
|
|
|