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

Side by Side Diff: remoting/host/plugin/policy_hack/nat_policy.h

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: silly compiler. 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 #ifndef REMOTING_HOST_PLUGIN_POLICY_HACK_NAT_POLICY_H_
6 #define REMOTING_HOST_PLUGIN_POLICY_HACK_NAT_POLICY_H_
7
8 #include "base/callback.h"
9
10 namespace base {
11 class WaitableEvent;
12 } // namespace base
13
14 namespace remoting {
15 namespace policy_hack {
dmac 2011/08/10 21:39:00 is a policy_hack namespace really necessary within
awong 2011/08/11 01:23:29 yes.
16
17 // Watches the policy files for a change to the remote access host NAT
18 // policies.
19 class NatPolicy {
20 public:
21 // Called with the current status of whether or not NAT traversal is enabled.
22 typedef base::Callback<void(bool)> NatEnabledCallback;
23
24 NatPolicy() {}
25 virtual ~NatPolicy() {}
26
27 // This guarantees that the policy_update_cb is called at least once with the
28 // current policy.
29 virtual void StartWatching() = 0;
30
31 virtual void StopWatching(base::WaitableEvent* done) = 0;
32
33 // Implemented by each platform.
34 static NatPolicy* Create(const NatEnabledCallback& policy_update_cb);
35 };
36
37 } // namespace policy_hack
38 } // namespace remoting
39
40 #endif // REMOTING_HOST_PLUGIN_POLICY_HACK_NAT_POLICY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698