OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "remoting/host/clipboard.h" | 5 #include "remoting/host/clipboard.h" |
6 | 6 |
7 #include <X11/Xlib.h> | 7 #include <X11/Xlib.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "remoting/host/linux/x_server_clipboard.h" | 12 #include "remoting/host/linux/x_server_clipboard.h" |
13 #include "remoting/proto/event.pb.h" | 13 #include "remoting/proto/event.pb.h" |
14 #include "remoting/protocol/clipboard_stub.h" | 14 #include "remoting/protocol/clipboard_stub.h" |
15 | 15 |
16 namespace remoting { | 16 namespace remoting { |
17 | 17 |
18 // This code is expected to be called on the desktop thread only. | 18 // This code is expected to be called on the desktop thread only. |
19 class ClipboardX11 : public Clipboard, | 19 class ClipboardX11 : public Clipboard, |
20 public base::MessageLoopForIO::Watcher { | 20 public base::MessageLoopForIO::Watcher { |
21 public: | 21 public: |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 XNextEvent(display_, &event); | 125 XNextEvent(display_, &event); |
126 x_server_clipboard_.ProcessXEvent(&event); | 126 x_server_clipboard_.ProcessXEvent(&event); |
127 } | 127 } |
128 } | 128 } |
129 | 129 |
130 scoped_ptr<Clipboard> Clipboard::Create() { | 130 scoped_ptr<Clipboard> Clipboard::Create() { |
131 return scoped_ptr<Clipboard>(new ClipboardX11()); | 131 return scoped_ptr<Clipboard>(new ClipboardX11()); |
132 } | 132 } |
133 | 133 |
134 } // namespace remoting | 134 } // namespace remoting |
OLD | NEW |