Index: remoting/protocol/clipboard_weak_ptr.h |
diff --git a/remoting/protocol/clipboard_weak_ptr.h b/remoting/protocol/clipboard_weak_ptr.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f638ee6671128e9c7d400181dd368aa6e0228896 |
--- /dev/null |
+++ b/remoting/protocol/clipboard_weak_ptr.h |
@@ -0,0 +1,35 @@ |
+// Copyright (c) 2012 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. |
+ |
+#ifndef REMOTING_PROTOCOL_CLIPBOARD_WEAK_PTR_H_ |
+#define REMOTING_PROTOCOL_CLIPBOARD_WEAK_PTR_H_ |
+ |
+#include "base/basictypes.h" |
+#include "base/compiler_specific.h" |
+#include "base/memory/weak_ptr.h" |
+#include "remoting/protocol/clipboard_stub.h" |
+ |
+namespace remoting { |
+namespace protocol { |
+ |
+// Forwards clipboard events to |clipboard_stub|, and supports weak pointers. |
+class ClipboardWeakPtr : public ClipboardStub, |
+ public base::SupportsWeakPtr<ClipboardWeakPtr> { |
+ public: |
+ ClipboardWeakPtr(ClipboardStub* clipboard_stub); |
+ virtual ~ClipboardWeakPtr(); |
+ |
+ // ClipboardStub interface. |
+ virtual void InjectClipboardEvent(const ClipboardEvent& event) OVERRIDE; |
+ |
+ private: |
+ ClipboardStub* clipboard_stub_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ClipboardWeakPtr); |
+}; |
+ |
+} // namespace protocol |
+} // namespace remoting |
+ |
+#endif // REMOTING_PROTOCOL_CLIPBOARD_WEAK_PTR_H_ |