| Index: remoting/host/plugin/policy_hack/nat_policy_win.cc
|
| diff --git a/remoting/host/plugin/policy_hack/nat_policy_win.cc b/remoting/host/plugin/policy_hack/nat_policy_win.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..111fab424aea266ee7d40d69d153580c62737e92
|
| --- /dev/null
|
| +++ b/remoting/host/plugin/policy_hack/nat_policy_win.cc
|
| @@ -0,0 +1,42 @@
|
| +// Copyright (c) 2011 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.
|
| +
|
| +#include "remoting/host/plugin/policy_hack/nat_policy.h"
|
| +
|
| +#include "base/compiler_specific.h"
|
| +#include "base/message_loop_proxy.h"
|
| +#include "base/synchronization/waitable_event.h"
|
| +
|
| +namespace remoting {
|
| +namespace policy_hack {
|
| +
|
| +class NatPolicyWin : public NatPolicy {
|
| + public:
|
| + NatPolicyWin() {
|
| + }
|
| +
|
| + virtual ~NatPolicyWin() {
|
| + }
|
| +
|
| + virtual void StartWatching(const NatEnabledCallback& nat_enabled_cb)
|
| + OVERRIDE {
|
| + nat_enabled_cb_ = nat_enabled_cb;
|
| + nat_enabled_cb_.Run(false);
|
| + }
|
| +
|
| + virtual void StopWatching(base::WaitableEvent* done) OVERRIDE {
|
| + nat_enabled_cb_.Reset();
|
| + done->Signal();
|
| + }
|
| +
|
| + private:
|
| + NatEnabledCallback nat_enabled_cb_;
|
| +};
|
| +
|
| +NatPolicy* NatPolicy::Create(base::MessageLoopProxy* message_loop_proxy) {
|
| + return new NatPolicyWin();
|
| +}
|
| +
|
| +} // namespace policy_hack
|
| +} // namespace remoting
|
|
|