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

Side by Side Diff: remoting/host/clipboard_linux.cc

Issue 12760012: Rename EventExecutor to InputInjector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replace some missed occurrences and remove unused include. Created 7 years, 9 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
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/desktop_environment.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 ClipboardLinux::ClipboardLinux() 56 ClipboardLinux::ClipboardLinux()
57 : display_(NULL) { 57 : display_(NULL) {
58 } 58 }
59 59
60 ClipboardLinux::~ClipboardLinux() { 60 ClipboardLinux::~ClipboardLinux() {
61 Stop(); 61 Stop();
62 } 62 }
63 63
64 void ClipboardLinux::Start( 64 void ClipboardLinux::Start(
65 scoped_ptr<protocol::ClipboardStub> client_clipboard) { 65 scoped_ptr<protocol::ClipboardStub> client_clipboard) {
66 // TODO(lambroslambrou): Share the X connection with EventExecutor. 66 // TODO(lambroslambrou): Share the X connection with InputInjector.
67 display_ = XOpenDisplay(NULL); 67 display_ = XOpenDisplay(NULL);
68 if (!display_) { 68 if (!display_) {
69 LOG(ERROR) << "Couldn't open X display"; 69 LOG(ERROR) << "Couldn't open X display";
70 return; 70 return;
71 } 71 }
72 client_clipboard_.swap(client_clipboard); 72 client_clipboard_.swap(client_clipboard);
73 73
74 x_server_clipboard_.Init(display_, 74 x_server_clipboard_.Init(display_,
75 base::Bind(&ClipboardLinux::OnClipboardChanged, 75 base::Bind(&ClipboardLinux::OnClipboardChanged,
76 base::Unretained(this))); 76 base::Unretained(this)));
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 XNextEvent(display_, &event); 122 XNextEvent(display_, &event);
123 x_server_clipboard_.ProcessXEvent(&event); 123 x_server_clipboard_.ProcessXEvent(&event);
124 } 124 }
125 } 125 }
126 126
127 scoped_ptr<Clipboard> Clipboard::Create() { 127 scoped_ptr<Clipboard> Clipboard::Create() {
128 return scoped_ptr<Clipboard>(new ClipboardLinux()); 128 return scoped_ptr<Clipboard>(new ClipboardLinux());
129 } 129 }
130 130
131 } // namespace remoting 131 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/desktop_environment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698