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

Unified Diff: remoting/host/plugin/policy_hack/nat_policy_mac.mm

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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/plugin/policy_hack/nat_policy_mac.mm
diff --git a/remoting/host/plugin/policy_hack/nat_policy_mac.mm b/remoting/host/plugin/policy_hack/nat_policy_mac.mm
new file mode 100644
index 0000000000000000000000000000000000000000..abddd8f766459897af77938cf3dee5e693a0853c
--- /dev/null
+++ b/remoting/host/plugin/policy_hack/nat_policy_mac.mm
@@ -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 NatPolicyMac : public NatPolicy {
+ public:
+ NatPolicyMac() {
+ }
+
+ virtual ~NatPolicyMac() {
+ }
+
+ 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 NatPolicyMac();
+}
+
+} // namespace policy_hack
+} // namespace remoting
« no previous file with comments | « remoting/host/plugin/policy_hack/nat_policy_linux.cc ('k') | remoting/host/plugin/policy_hack/nat_policy_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698