Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(574)

Side by Side Diff: remoting/host/plugin/policy_hack/nat_policy_win.cc

Issue 7599017: Framework to allow Chromoting host to respect NAT traversal policy in linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with Sergey's MessageLoopProxy change Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 "remoting/host/plugin/policy_hack/nat_policy.h"
6
7 #include "base/compiler_specific.h"
8 #include "base/message_loop_proxy.h"
9 #include "base/synchronization/waitable_event.h"
10
11 namespace remoting {
12 namespace policy_hack {
13
14 class NatPolicyWin : public NatPolicy {
15 public:
16 NatPolicyWin() {
17 }
18
19 virtual ~NatPolicyWin() {
20 }
21
22 virtual void StartWatching(const NatEnabledCallback& nat_enabled_cb)
23 OVERRIDE {
24 nat_enabled_cb_ = nat_enabled_cb;
25 nat_enabled_cb_.Run(false);
26 }
27
28 virtual void StopWatching(base::WaitableEvent* done) OVERRIDE {
29 nat_enabled_cb_.Reset();
30 done->Signal();
31 }
32
33 private:
34 NatEnabledCallback nat_enabled_cb_;
35 };
36
37 NatPolicy* NatPolicy::Create(base::MessageLoopProxy* message_loop_proxy) {
38 return new NatPolicyWin();
39 }
40
41 } // namespace policy_hack
42 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/plugin/policy_hack/nat_policy_mac.mm ('k') | remoting/jingle_glue/jingle_info_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698