OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2011 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 #include "base/compiler_specific.h" | |
6 #include "base/synchronization/waitable_event.h" | |
7 #include "remoting/host/plugin/policy_hack/nat_policy.h" | |
dmac
2011/08/11 18:42:55
should this include be first?
(same for other pla
awong
2011/08/11 19:04:07
Done.
| |
8 | |
9 namespace remoting { | |
10 namespace policy_hack { | |
11 | |
12 class NatPolicyWin : public NatPolicy { | |
13 public: | |
14 NatPolicyWin(const NatPolicy::NatEnabledCallback& nat_enabled_cb) | |
15 : nat_enabled_cb_(nat_enabled_cb) { | |
16 } | |
17 | |
18 virtual ~NatPolicyWin() { | |
19 } | |
20 | |
21 virtual void StartWatching() OVERRIDE { | |
22 nat_enabled_cb_.Run(false); | |
23 } | |
24 | |
25 virtual void StopWatching(base::WaitableEvent* done) OVERRIDE { | |
26 done->Signal(); | |
27 } | |
28 | |
29 private: | |
30 NatEnabledCallback nat_enabled_cb_; | |
31 }; | |
32 | |
33 NatPolicy* NatPolicy::Create(MessageLoop* message_loop, | |
34 const NatEnabledCallback& nat_enabled_cb) { | |
35 return new NatPolicyWin(nat_enabled_cb); | |
36 } | |
37 | |
38 } // namespace policy_hack | |
39 } // namespace remoting | |
OLD | NEW |